/* ─────────────────────────────────────────────
   SUPER MALITA BROTHERS — STYLESHEET
   Structured top to bottom matching page layout.
   Fonts: Cormorant Garamond (serif headings),
          Jost (sans body text).
   Colours: all defined as CSS variables in :root.
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ─────────────────────────────────────────────
   RESET & VARIABLES
   Box-sizing reset and all design tokens:
   colours, fonts, border radius.
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --olive:       #3D5228;
  --olive-mid:   #5C7A3A;
  --olive-light: #8FA86A;
  --olive-pale:  #EFF4E6;
  --olive-mist:  #F7F9F3;
  --gold:        #B8943F;
  --gold-light:  #D4AE6A;
  --gold-pale:   #F5EDD8;
  --dark:        #141810;
  --dark-mid:    #1E2416;
  --cream:       #FAF8F3;
  --text:        #1A1A18;
  --text-muted:  #6B6B5F;
  --border:      rgba(61,82,40,0.15);
  --serif:       'Cormorant Garamond', Georgia, serif;
  --sans:        'Jost', sans-serif;
  --radius:      8px;
  --radius-lg:   14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}

/* ─────────────────────────────────────────────
   NAVIGATION
   Sticky top bar with logo, nav links,
   location tag and language switcher.
───────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 2.5rem;
  background: rgba(250,248,243,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}
.logo { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: 0.03em; }
.logo span { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { font-size: 13px; color: var(--text-muted); text-decoration: none; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; transition: color 0.2s; }
.nav-links a:hover { color: var(--olive); }
.lang-switcher { display: flex; gap: 2px; background: var(--olive-pale); border: 0.5px solid var(--border); border-radius: 20px; padding: 3px; }
.lang-btn { background: none; border: none; padding: 4px 11px; border-radius: 16px; font-size: 11px; cursor: pointer; color: var(--text-muted); font-family: var(--sans); font-weight: 400; letter-spacing: 0.08em; transition: background 0.2s, color 0.2s; }
.lang-btn.active { background: var(--olive); color: #fff; }

/* ─────────────────────────────────────────────
   HERO
   Full-width dark intro section with eyebrow,
   headline and sub text. Olive radial glow.
───────────────────────────────────────────── */
.hero {
  background: var(--dark);
  color: #fff;
  padding: 6rem 2.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(92,122,58,0.25) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1.75rem; font-weight: 400;
}
.hero-eyebrow::before,
.hero-eyebrow::after { content: ''; display: block; width: 28px; height: 0.5px; background: var(--gold); }
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 5.5vw, 62px); font-weight: 300; line-height: 1.15; margin-bottom: 1.25rem; letter-spacing: 0.01em; }
.hero h1 em { color: var(--gold-light); font-style: italic; }
.hero-sub { font-size: 15px; color: #999; max-width: 440px; margin: 0 auto; font-weight: 300; }

/* ─────────────────────────────────────────────
   STATS BAR
   Three numbers in a single dark row.
   Stays horizontal on mobile too.
───────────────────────────────────────────── */
.stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  background: var(--dark-mid);
}
.stat {
  flex: 1;
  padding: 1.1rem 0.75rem;
  text-align: center;
  border-right: 0.5px solid rgba(255,255,255,0.07);
}
.stat:last-child { border-right: none; }
.stat-num { font-family: var(--serif); font-size: 36px; font-weight: 400; color: var(--gold-light); line-height: 1; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; font-weight: 300; }
.stat-sub { font-size: 13px; color: #666; margin-top: 3px; font-style: italic; font-family: var(--serif); }

/* ─────────────────────────────────────────────
   SECTION COMMONS
   Shared padding, max-width container,
   and the large serif section eyebrow style.
───────────────────────────────────────────── */
.section { padding: 5rem 2.5rem; }
.section-inner { max-width: 980px; margin: 0 auto; }
.section-eyebrow {
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-weight: 400;
}
.section-title { font-family: var(--serif); font-size: clamp(26px, 3.5vw, 40px); font-weight: 400; line-height: 1.2; margin-bottom: 1.5rem; }

/* ─────────────────────────────────────────────
   BEST AT — "OUR CRAFT"
   Dark background grid of 4 specialty cards.
   Gold underline on each card.
───────────────────────────────────────────── */
.best-at { background: var(--dark); color: #fff; }
.best-at .section-eyebrow { color: var(--gold-light); }
.best-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: rgba(255,255,255,0.06); border: 0.5px solid rgba(255,255,255,0.08); border-radius: var(--radius-lg); overflow: hidden; margin-top: 0; }
.best-item { background: var(--dark-mid); padding: 2rem 1.5rem; position: relative; }
.best-item::after { content: ''; position: absolute; bottom: 0; left: 1.5rem; right: 1.5rem; height: 1.5px; background: linear-gradient(90deg, var(--gold), transparent); }
.best-num { font-family: var(--serif); font-size: 42px; color: rgba(184,148,63,0.2); line-height: 1; margin-bottom: 0.75rem; }
.best-item h3 { font-family: var(--serif); font-size: 18px; font-weight: 400; color: #fff; margin-bottom: 0.4rem; }
.best-item p { font-size: 13px; color: #888; line-height: 1.6; font-weight: 300; }
.tolerance-badge { display: inline-block; margin-top: 0.75rem; background: rgba(184,148,63,0.15); border: 0.5px solid rgba(184,148,63,0.4); color: var(--gold-light); font-size: 11px; padding: 3px 10px; border-radius: 10px; letter-spacing: 0.06em; }

/* ─────────────────────────────────────────────
   SERVICES — "WHAT WE DO"
   3-column grid of flip cards. Front shows
   icon + text; hover reveals a photo on back.
───────────────────────────────────────────── */
.services-section { background: var(--olive-mist); }
.services-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 1.75rem; font-style: italic; font-family: var(--serif); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.service-card { border-radius: var(--radius-lg); }
.flip-svc { perspective: 800px; cursor: pointer; }
.svc-inner {
  position: relative;
  width: 100%;
  min-height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4,0.2,0.2,1);
}
.flip-svc:hover .svc-inner { transform: rotateY(180deg); }
.svc-front,
.svc-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.svc-front { background: #fff; border: 0.5px solid var(--border); }
.svc-back {
  background-size: cover;
  background-position: center;
  background-color: var(--olive);
  transform: rotateY(180deg);
  justify-content: flex-end;
  padding: 1.25rem;
}
.svc-back-label {
  font-family: var(--serif);
  font-size: 18px;
  color: #fff;
  background: rgba(20,24,16,0.65);
  padding: 6px 12px;
  border-radius: var(--radius);
  display: inline-block;
}
.service-icon-wrap { width: 44px; height: 44px; background: var(--olive-pale); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 1rem; }
.service-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 0.4rem; }
.service-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ─────────────────────────────────────────────
   ABOUT — "WHO WE ARE"
   Two-column layout: bio text on left,
   brother profile cards on right.
───────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-text p { font-size: 15px; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.languages-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.lang-pill { background: var(--gold-pale); border: 0.5px solid rgba(184,148,63,0.3); color: var(--gold); font-size: 12px; padding: 4px 12px; border-radius: 20px; font-weight: 400; }
.brothers { display: flex; flex-direction: column; gap: 16px; }
.brother-card { background: var(--olive-pale); border: 0.5px solid rgba(61,82,40,0.2); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; gap: 1rem; align-items: flex-start; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--olive); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--serif); font-size: 18px; font-weight: 500; flex-shrink: 0; }
.brother-info h4 { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--olive); }
.brother-info .title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin: 2px 0 6px; }
.brother-info p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ─────────────────────────────────────────────
   REFERENCES
   Auto-fill square photo grid. Images are
   loaded from images/ref*.jpg — missing
   ones are hidden via JS.
───────────────────────────────────────────── */
.references-section { background: var(--olive-mist); }
.refs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.ref-tile {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--olive-pale);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ref-tile:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(61,82,40,0.2); }

/* ─────────────────────────────────────────────
   CHECK THIS OUT
   Dark section with 3 flip cards showing
   render vs real photo on hover.
───────────────────────────────────────────── */
.checkthis-section { background: var(--dark); }
.checkthis-section .section-eyebrow { color: var(--gold-light); }
.checkthis-title { color: #fff; margin-bottom: 2rem; }
.flip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flip-card { perspective: 900px; cursor: pointer; }
.flip-inner {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4,0.2,0.2,1);
}
.flip-card:hover .flip-inner { transform: rotateY(180deg); }
.flip-front,
.flip-back {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--olive);
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back { transform: rotateY(180deg); background-color: var(--olive-mid); }
.flip-front::after,
.flip-back::after {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(20,24,16,0.6); color: var(--gold-light);
  padding: 3px 8px; border-radius: 4px;
}
.flip-front::after { content: 'render'; }
.flip-back::after { content: 'real'; }

/* ─────────────────────────────────────────────
   CONTACT
   Two-column: left has eyebrow, contact
   details and Szeged map; right has the form.
───────────────────────────────────────────── */
.contact-section { background: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: start; }
.contact-eyebrow {
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.4;
}
.contact-detail { display: flex; align-items: center; gap: 10px; margin-bottom: 0.75rem; font-size: 14px; color: var(--text-muted); }
.contact-detail strong { color: var(--text); font-weight: 400; }
.contact-icon { width: 32px; height: 32px; background: var(--olive-pale); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.map-wrap { margin-top: 1.25rem; border-radius: var(--radius-lg); overflow: hidden; border: 0.5px solid var(--border); }
.szeged-map { width: 100%; height: 240px; border: none; display: block; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
.form-group input,
.form-group textarea { width: 100%; padding: 11px 14px; border: 0.5px solid rgba(61,82,40,0.25); border-radius: var(--radius); background: var(--olive-mist); color: var(--text); font-size: 14px; font-family: var(--sans); font-weight: 300; transition: border-color 0.2s; }
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--olive-mid); }
.form-group textarea { min-height: 110px; resize: vertical; }
.file-upload-label { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0.5px dashed rgba(61,82,40,0.35); border-radius: var(--radius); background: var(--olive-mist); color: var(--text-muted); font-size: 14px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.file-upload-label:hover { border-color: var(--olive-mid); background: var(--olive-pale); }
.file-upload-label input[type="file"] { display: none; }
.file-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; font-style: italic; }
.btn-submit { background: var(--olive); color: #fff; border: none; padding: 13px 32px; border-radius: var(--radius); font-size: 14px; font-family: var(--sans); font-weight: 400; letter-spacing: 0.06em; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: var(--olive-mid); }
.sent-msg { display: none; color: var(--olive); font-size: 14px; margin-top: 0.75rem; font-style: italic; font-family: var(--serif); }

/* ─────────────────────────────────────────────
   PIXEL ART
   Dark strip at page bottom with two canvases
   drawn by drawPixelArt() in main.js.
───────────────────────────────────────────── */
.mario-section { background: var(--dark); padding: 3rem 2.5rem; text-align: center; }
.pixel-art-wrap { display: inline-flex; gap: 2.5rem; align-items: flex-end; justify-content: center; }
canvas.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.pixel-label { display: none; }

/* ─────────────────────────────────────────────
   FOOTER
   Dark bar with logo, contact summary
   and copyright line.
───────────────────────────────────────────── */
footer { background: var(--dark); color: #fff; padding: 2.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; border-top: 1px solid rgba(184,148,63,0.2); }
.footer-logo { font-family: var(--serif); font-size: 17px; }
.footer-logo span { color: var(--gold); }
footer p { font-size: 12px; color: #666; }

/* ─────────────────────────────────────────────
   STICKER POPUP
   Fixed gold circle in bottom-right corner.
   Rotated, clickable, scrolls to contact.
───────────────────────────────────────────── */
.sticker-popup {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  background: var(--gold);
  border-radius: 50% 50% 50% 8px;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(184,148,63,0.4);
  transform: rotate(-8deg);
  transition: transform 0.2s, box-shadow 0.2s;
  user-select: none;
}
.sticker-popup:hover { transform: rotate(-4deg) scale(1.06); box-shadow: 0 6px 28px rgba(184,148,63,0.5); }
.sticker-inner { text-align: center; padding: 10px; }
.sticker-star { font-size: 16px; line-height: 1; margin-bottom: 3px; }
.sticker-text { font-family: var(--serif); font-size: 13px; font-weight: 600; line-height: 1.25; color: #fff; }
.sticker-cta { font-size: 10px; margin-top: 4px; color: rgba(255,255,255,0.85); letter-spacing: 0.06em; text-transform: uppercase; }
.sticker-close { position: absolute; top: 4px; right: 8px; background: none; border: none; color: rgba(255,255,255,0.7); font-size: 13px; cursor: pointer; line-height: 1; padding: 2px; }
.sticker-close:hover { color: #fff; }

/* ─────────────────────────────────────────────
   RESPONSIVE — mobile breakpoint ≤ 720px
   Stacks grids, hides nav links, shrinks
   padding. Stats stay single-row on mobile.
───────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav { padding: 0.8rem 1.25rem; }
  .nav-links { display: none; }
  .section { padding: 3.5rem 1.25rem; }
  .hero { padding: 4rem 1.25rem 3.5rem; }
  .stats { flex-direction: row; flex-wrap: nowrap; }
  .stat { padding: 0.75rem 0.4rem; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10px; }
  .stat-sub { font-size: 10px; }
  .best-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .flip-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; text-align: center; }
}
