/* ============================================================
   Vienna EUDC 2027 — Homepage
   Pixel-accurate rebuild of the Figma "Home-desktop" frame
   (1700 × 3259). Every element is positioned by its exact
   Figma coordinate. Colors, type, and shadows are 1:1.
   ============================================================ */

/* ---------- Fonts (self-hosted Metropolis) ---------- */
@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/metropolis-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/metropolis-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Metropolis";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/metropolis-600-normal.woff2") format("woff2");
}

/* ---------- Design tokens (sampled from Figma) ---------- */
:root {
  --maroon:   #360d02;  /* page background            */
  --gold:     #ab8028;  /* primary gold text / lines  */
  --gold-dim: #754400;  /* dimmed gold / placeholders */
  --magenta:  #630033;  /* active-form buttons        */
  --darkred:  #631c00;  /* send button / icon badges  */
  --grey:     #c4c4c4;  /* media placeholders         */

  --shadow-card:  12px 12px 12px -5px rgba(20, 20, 20, .5);
  --shadow-photo: 12px 12px 12px -5px rgba(28,  6, 0, .5);
  --shadow-field: inset 7px 10px 11.9px rgba(0, 0, 0, .25);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: hidden; overflow-y: scroll; }   /* x-hidden clips the gold lines' bleed into the side margins; y-scroll keeps a stable gutter */
html, body {
  background: var(--maroon);
  font-family: "Metropolis", system-ui, sans-serif;
}

/* ---------- Responsive scaling wrapper ---------- */
/* The stage is the exact 1700px-wide canvas. A tiny script
   (in index.html) scales it down to fit narrower viewports
   while preserving the design's exact proportions.          */
.scale-wrap {
  width: 1700px;
  margin: 0 auto;
  transform-origin: top center;
}

.stage {
  position: relative;
  width: 1700px;
  height: 3279px;
  background: var(--maroon);
  overflow: visible;   /* let the gold lines bleed into the side margins on wide screens; html{overflow-x:hidden} clips the page */
}

.stage > * { position: absolute; }

/* Section wrappers (mobile grids): on desktop they generate no box at all,
   so their children keep their exact stage coordinates; the mobile media
   query turns them into flow/grid containers. */
.sec, .fitem, .mitem { display: contents; }

/* Generic helpers */
/* Gold lines run from the content's left edge to the viewport's right edge:
   1462px (238→1700) + the side-margin width scale.js publishes as --nav-off. */
.divider { height: 3px; background: var(--gold); width: calc(1462px + var(--nav-off, 0px)); left: 238px; }
.section-title {
  position: absolute;
  color: var(--gold);
  font-size: 24px;
  line-height: 24px;
  font-weight: 400;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   NAV
   ============================================================ */
/* logo.svg is a 134×139 canvas (7px of shadow-padding each side of the 120-unit
   crest); rendered at native size with left:111 the gold crest fills exactly
   118→238 so it touches the nav line (no gap). */
.logo {
  left: 111px; top: 35px; width: 134px; height: 139px;
  z-index: 6;
  filter: drop-shadow(0 12px 9px rgba(20, 20, 20, .45));
}
.nav-line { top: 94.5px; height: 5px; width: 1462px; left: 238px;
  background: var(--gold); z-index: 6; }

.nav-tab {
  top: 41px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 20px; line-height: 20px;
  color: var(--gold); text-decoration: none; white-space: nowrap;
  z-index: 6;
}
.nav-tab.dim { color: var(--gold-dim); }   /* dimmed but clickable → coming-soon.html */
/* Six even 204px slots fill 238→1462, the content right edge (same grid as
   site.css .ntab1–6), so the last tab's right edge is flush with the page
   content (e.g. the contact form). The gold lines bleed on past to the edge. */
.nav-tab { width: 204px; }
.nav-tournament  { left: 238px; }
.nav-partners    { left: 442px; }
.nav-personnel   { left: 646px; }
.nav-participants{ left: 850px; }
.nav-training    { left: 1054px; }
.nav-contact     { left: 1258px; }

/* Fixed header: lives outside the scaled stage, so the browser pins it on the
   compositor thread (no scroll jitter) and the bar + shadow span the full
   viewport width. The page's inline scaler sizes it (95×scale) and
   scales/centres .nav-inner to line up with the stage. */
.site-nav { position: fixed; top: 0; left: 0; right: 0; height: 95px;
  background: var(--maroon); box-shadow: var(--shadow-card); z-index: 50; }
.site-nav .nav-inner { position: absolute; left: 0; top: 0; width: 1700px;
  transform-origin: top left; }
.site-nav .nav-inner > * { position: absolute; }
/* Full-viewport gold nav line: drawn on the (full-width, unclipped) fixed bar
   so it reaches the screen's right edge. It starts at the scaled content-left
   and seamlessly extends the in-stage .nav-line out to the margin. Fallbacks
   (scale 1 / nav-off 0) make it correct before scale.js runs. */
.site-nav::after {
  content: ""; position: absolute; z-index: 6;
  left: calc(var(--nav-off, 0px) + 238px * var(--scale, 1)); right: 0;
  top: calc(94.5px * var(--scale, 1)); height: calc(5px * var(--scale, 1));
  background: var(--gold);
}

/* Mobile-only header elements (wordmark logo, meatball menu button) and the
   menu overlay: present in the markup, dormant on desktop. Styled in the
   MOBILE section at the end of this file. */
.logo-m, .mnav-btn { display: none; }
.mnav { display: none; }

/* ============================================================
   HERO
   ============================================================ */
/* SVG hero (viewBox 1225×890): badges + FB/IG logos are baked in, so the
   separate badge PNGs were removed from the markup (.badge CSS now dormant). */
.hero { left: 238px; top: 95px; width: 1225px; height: 890px; z-index: 1; }

/* Invisible click targets over the FB/IG logos baked into hero.svg.
   Disc centres measured in the 1225×890 art (FB 398,712 r≈46; IG 503,768 r≈28);
   hero sits at stage 238,95, so stage = 238+svgX, 95+svgY. border-radius clips
   the hit area to the circle so corner clicks fall through to the artwork. */
.hero-link    { position: absolute; z-index: 3; border-radius: 50%; }
.hero-link-fb { left: 590px; top: 761px; width: 92px; height: 92px; }
.hero-link-ig { left: 713px; top: 835px; width: 56px; height: 56px; }

/* ============================================================
   ABOUT EUDC
   ============================================================ */
.about-title   { left: 239px; top: 1068px; }
.about-divider { top: 1099px; }
.about-body {
  left: 238px; top: 1139px; width: 600px;
  color: var(--gold); font-size: 20px; line-height: 24px; font-weight: 400;
}
.about-photo-1 { left: 862px;  top: 1139px; width: 184px; height: 350px;
  box-shadow: var(--shadow-photo); }
.about-photo-2 { position: absolute; left: 1070px; top: 1139px; width: 392px; height: 350px;
  box-shadow: var(--shadow-photo); }
/* transparent wrapper: the <img> keeps its own absolute (desktop) / static
   (mobile) positioning; the <picture> only swaps the source per breakpoint. */
.about-photo-2-pic { display: contents; }
/* Photographer credit, right edge flush under the right photo's right edge
   (Figma 1:906). Box spans the photo (left 1070, width 392) and text is
   right-aligned, so the right edge lines up regardless of rendered font width. */
.about-credit { left: 1070px; top: 1497px; width: 392px; text-align: right;
  color: var(--gold); font-size: 14px; line-height: 16px; font-weight: 400; }

/* ============================================================
   ACTIVE FORMS
   ============================================================ */
.active-title   { left: 239px; top: 1591px; }
.active-divider { top: 1622px; }

.form-box {
  position: absolute;
  top: 1662px; width: 288px; height: 68px;
  background: var(--magenta);
  box-shadow: var(--shadow-card);
  text-decoration: none;
}
.form-box .inner {
  position: absolute; inset: 6px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.form-box .label {
  color: var(--gold); font-size: 20px; line-height: 28px;
  font-weight: 400; text-transform: uppercase; text-align: center;
}
.form-box-1 { left: 239px; }
.form-box-2 { left: 551px; }

.form-date {
  position: absolute;
  top: 1742px; width: 276px;
  color: var(--gold); font-size: 16px; line-height: 16px; font-weight: 400;
}
.form-date-1 { left: 245px; }
.form-date-2 { left: 557px; }

/* Placeholder shown by content-loader.js when no forms are active. */
.form-empty {
  position: absolute;
  left: 239px; top: 1681px; width: 600px;
  color: var(--gold); font-size: 20px; line-height: 28px; font-weight: 400;
}

/* ============================================================
   SOCIAL MEDIA UPDATES
   ============================================================ */
.social-title   { left: 239px; top: 1842px; }
.social-divider { top: 1873px; }

.social-icon { position: absolute; top: 1858px; width: 28px; height: 28px; z-index: 3;
  filter: drop-shadow(8px 8px 9px rgba(0, 0, 0, .25)); }
.social-icon-fb { left: 1397px; }
.social-icon-ig { left: 1435px; }

.media-card {
  position: absolute;
  top: 1913px; width: 288px; height: 360px;
  background: var(--grey);
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-card);
}
.media-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-card-1 { left: 238px; }
.media-card-2 { left: 550px; }
.media-card-3 { left: 862px; }
.media-card-4 { left: 1174px; }

.media-date {
  position: absolute;
  top: 2289px; width: 288px;
  color: var(--gold); font-size: 20px; line-height: 20px; font-weight: 400;
}
.media-date-1 { left: 238px; }
.media-date-2 { left: 550px; }
.media-date-3 { left: 862px; }
.media-date-4 { left: 1174px; }

/* ============================================================
   CONTACT US
   ============================================================ */
.contact-title   { left: 238px; top: 2393px; }
.contact-divider { top: 2424px; }

/* The <form> is a transparent full-stage layer so its fields can be
   positioned by their exact Figma coordinates. pointer-events pass
   through the empty areas to elements beneath; fields re-enable them. */
form { position: absolute; inset: 0; pointer-events: none; }
.field, .send-btn { pointer-events: auto; }

.field {
  position: absolute;
  background: var(--maroon);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-field);
  color: var(--gold);
  font-family: inherit; font-size: 20px; line-height: 20px; font-weight: 400;
  padding: 0 16px;
  resize: none;
  outline: none;
}
.field::placeholder { color: var(--gold-dim); opacity: 1; }
.field-name    { left: 238px; top: 2461px; width: 600px; height: 60px; }
.field-company { left: 238px; top: 2541px; width: 600px; height: 60px; }
.field-email   { left: 238px; top: 2621px; width: 600px; height: 60px; }
.field-message {
  left: 862px; top: 2461px; width: 600px; height: 220px;
  padding: 20px 16px;
}

.send-btn {
  position: absolute;
  left: 1278px; top: 2705px; width: 184px; height: 68px;
  background: var(--darkred);
  border: none;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-family: inherit;
}
.send-btn .inner {
  position: absolute; inset: 6px;
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 24px; line-height: 24px;
  font-weight: 400; text-transform: uppercase;
}
.send-btn:disabled { cursor: default; opacity: .6; }

/* Honeypot — visually gone and out of the tab order, but bots fill it. */
.hp-field {
  position: absolute; left: -9999px; top: 0;
  width: 1px; height: 1px; opacity: 0;
}

/* GDPR consent — top-aligned with Send (both start at top:2705) so the checkbox top
   meets the button top, per Figma 115:3229; the 24px box centres the label on the box. */
.field-consent {
  position: absolute; left: 238px; top: 2705px; width: 1000px; height: 24px;
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  color: var(--gold-dim); font-size: 18px; line-height: 22px;
  cursor: pointer;
}
/* custom gold checkbox (gold border, gold fill + maroon check when ticked). */
.field-consent input {
  flex: none; width: 24px; height: 24px; margin: 0; position: relative;
  -webkit-appearance: none; appearance: none;
  background: transparent; border: 2px solid var(--gold); cursor: pointer;
}
.field-consent input:checked { background: var(--gold); }
.field-consent input:checked::after {
  content: ""; position: absolute; left: 7px; top: 2px; width: 6px; height: 12px;
  border: solid var(--maroon); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.field-consent input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Inline submit feedback. */
.form-status {
  position: absolute; left: 238px; top: 2781px; width: 1000px;
  pointer-events: auto;
  margin: 0; min-height: 26px;
  color: var(--gold); font-size: 20px; line-height: 26px;
}
.form-status.is-error   { color: #ff9b9b; }
.form-status.is-success { color: var(--gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-text {
  left: 237px; top: 3060px; width: 416px;
  color: var(--gold); font-size: 24px; line-height: 28px; font-weight: 400;
  white-space: pre-line;
}
.footer-text a { color: var(--gold); text-decoration: none; }
.footer-text a:hover { text-decoration: underline; }

.footer-spirals { left: 653px; top: 2997px; width: 865px; height: 282px; z-index: 1; }

/* ============================================================
   MOBILE (<768px) — 1:1 rebuild of the Figma "Home-Mobile"
   frame 77:2761 (430px canvas, 8px side margins, 414px column).
   Sections flow vertically; the hero is not part of the mobile
   design. The header/menu block mirrors site.css — keep the two
   in sync, like the tokens. Frame y-coords are quoted minus the
   24px iOS status-bar mock.
   ============================================================ */
@media (max-width: 767px) {

  /* ---- stage: 430px canvas, sections flow in DOM order ---- */
  .mobile-ready .stage {
    width: 430px;
    padding-top: 20px;                /* + first section's 44px = y64 */
    height: auto !important;          /* the single sanctioned !important:
                                         the desktop height is fixed; mobile
                                         height comes from the flow */
  }
  .mobile-ready .stage > * { position: static; }
  .mobile-ready .sec, .mobile-ready .fitem, .mobile-ready .mitem {
    display: block; position: static; }

  /* ---- header (Figma "Nav bar": 430×53, wordmark + meatball) ---- */
  .mobile-ready .site-nav .nav-inner { width: 430px; }
  .mobile-ready .site-nav .logo,
  .mobile-ready .site-nav .nav-tab { display: none; }
  /* full-bleed: extend past the 430px canvas by the letterbox margin (in canvas
     px, so ÷ --scale) so the line reaches both screen edges when the stage is
     centred/letterboxed at wide mobile widths; html{overflow-x:hidden} clips it. */
  .mobile-ready .site-nav .nav-line { top: 50px; height: 3px;
    left: calc(-1 * var(--nav-off, 0px) / var(--scale, 1));
    width: calc(430px + 2 * var(--nav-off, 0px) / var(--scale, 1)); }
  .mobile-ready .site-nav::after { content: none; }   /* mobile uses the repositioned .nav-line above */
  .mobile-ready .logo-m { display: block; position: absolute; left: 8px; top: 12px;
    width: 131px; height: 29px; }
  .mobile-ready .logo-m img { width: 100%; height: 100%; display: block; }
  .mobile-ready .mnav-btn { display: flex; position: absolute; left: 366px; top: 0;
    width: 64px; height: 50px; align-items: center; justify-content: flex-end;
    gap: 4px; padding: 0 8px 0 0; background: none; border: none; cursor: pointer; }
  .mnav-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

  /* ---- menu overlay (see site.css for the annotated original) ---- */
  .mobile-ready .mnav { position: fixed; inset: 0; z-index: 60;
    background: var(--maroon); overflow-y: auto; display: block; }
  .mobile-ready .mnav[hidden] { display: none; }
  .mnav-inner { position: relative; width: 430px; transform-origin: top left;
    transform: translateX(var(--nav-off, 0px)) scale(var(--scale, 1)); }
  .mnav-inner .logo-m { display: block; position: absolute; left: 8px; top: 12px;
    width: 131px; height: 29px; }
  .mnav-inner .mnav-close { display: flex; position: absolute; left: 366px; top: 0;
    width: 64px; height: 50px; align-items: center; justify-content: flex-end;
    gap: 4px; padding: 0 8px 0 0; background: none; border: none; cursor: pointer; }
  .mnav-inner .mnav-line { position: absolute; left: 0; top: 50px;
    width: 430px; height: 3px; background: var(--gold); }
  .mnav-list { padding-top: 61px; }   /* bar-line bottom (53) + 8px = inter-row gap */
  .mrow { display: flex; align-items: center; height: 34px; margin-bottom: 8px;
    padding: 0 8px; border-bottom: 1px solid var(--gold);
    font-weight: 500; font-size: 20px; color: var(--gold);
    text-decoration: none; text-transform: uppercase; }
  .mrow.dim { color: var(--gold-dim); }   /* dimmed but clickable → coming-soon.html */
  .mrow.active { background: var(--gold); color: var(--maroon); }
  html.mnav-open, .mnav-open body { overflow: hidden; }

  /* ---- hero: not part of the mobile design ----
     delete these two rules to bring it back at column width */
  .mobile-ready .hero, .mobile-ready .badge, .mobile-ready .hero-link { display: none; }

  /* ---- section title bars (title + divider) ---- */
  .mobile-ready .section-title { position: static; margin: 44px 8px 0;
    padding-top: 10px; font-size: 20px; line-height: 20px; font-weight: 500;
    white-space: normal; overflow-wrap: break-word; }
  /* full-bleed line: negative side margins (the letterbox in canvas px, ÷ --scale)
     pull it past the 430px canvas to both screen edges, matching the nav line. */
  .mobile-ready .divider { position: static; width: auto; height: 3px;
    margin: 4px calc(-1 * var(--nav-off, 0px) / var(--scale, 1)) 0; }

  /* ---- about ---- */
  .mobile-ready .about-body { position: static; width: auto; margin: 24px 8px 0;
    font-size: 14px; line-height: 18px; font-weight: 500; }
  /* the mobile frame shows one wide photo crop — photo-1 returns by
     deleting its display:none */
  .mobile-ready .about-photo-1 { display: none; }
  .mobile-ready .about-photo-2 { position: static; display: block;
    width: 414px; height: 164px; margin: 24px 8px 0; object-fit: cover;
    border: 2px solid var(--gold); box-shadow: none; }
  .mobile-ready .about-credit { position: static; width: auto; margin: 6px 8px 0;
    font-size: 12px; line-height: 16px; }

  /* ---- active forms (2-col grid of box+date items) ---- */
  .mobile-ready .forms { display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px; margin: 20px 8px 0; }
  .mobile-ready .form-box { position: static; display: block; width: auto;
    height: 48px; background: var(--darkred); box-shadow: none; }
  .mobile-ready .form-box .inner { position: static; display: flex;
    margin: 4px; height: 40px; }
  .mobile-ready .form-box .label { font-size: 16px; line-height: 20px; }
  .mobile-ready .form-date { position: static; width: auto; margin-top: 12px;
    font-size: 12px; line-height: 12px; }
  .mobile-ready .form-empty { position: static; grid-column: 1 / -1;
    width: auto; font-size: 16px; line-height: 22px; }

  /* ---- social media (icons in the title row, 3-col card grid) ---- */
  .mobile-ready .social-bar { display: flex; align-items: flex-end;
    gap: 7px; margin: 44px 8px 0; }
  .mobile-ready .social-bar .section-title { flex: 1; margin: 0; }
  .mobile-ready .social-icon { position: static; width: 20px; height: 20px;
    filter: none; }
  .mobile-ready .social-icon img { width: 100%; height: 100%; display: block; }
  .mobile-ready .media { display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin: 28px 8px 0; }
  .mobile-ready .media-card { position: static; width: auto; height: 147px;
    border-width: 2px; box-shadow: none; }
  .mobile-ready .media-date { position: static; width: auto; margin-top: 16px;
    font-size: 12px; line-height: 12px; }
  /* the frame shows three cards — delete to show the fourth again */
  .mobile-ready .mitem:nth-child(4) { display: none; }

  /* ---- contact form (stacked fields; consent + status kept) ---- */
  .mobile-ready form { position: static; pointer-events: auto; display: block;
    margin: 24px 8px 0; }
  .mobile-ready .field { position: static; display: block; width: 100%;
    height: 40px; margin-bottom: 20px; font-size: 16px; line-height: 16px;
    font-weight: 500; }
  .mobile-ready .field-message { height: 160px; }
  .mobile-ready .field-consent { position: static; width: auto;
    margin-bottom: 16px; font-size: 12px; line-height: 16px; }
  .mobile-ready .send-btn { position: static; display: block;
    margin-left: auto; width: 127px; height: 48px; box-shadow: none; }
  .mobile-ready .send-btn .inner { position: static; display: flex;
    margin: 4px; height: 40px; font-size: 16px; line-height: 16px; }
  .mobile-ready .form-status { position: static; width: auto; margin-top: 12px;
    font-size: 14px; line-height: 18px; min-height: 18px; }
  /* keep the honeypot off-screen (the blanket static must not reveal it) */
  .mobile-ready .hp-field { position: absolute; }

  /* ---- footer (Figma Home-Mobile 124:1367) ----
     Side-by-side: text block on the left, the deco (its own 241×136 mobile crop)
     bottom-right. No footer wrapper here, so the deco anchors to the stage's
     bottom-right and the text block reserves the band height. The <img> src is
     swapped to the mobile crop via `content:`. */
  /* static (not relative) so the desktop left:237px/top:2977px don't leak in as
     offsets; full-width block with the text indented 8px. The deco ::after is
     absolute, so it anchors to the positioned stage and lands at the page's
     bottom-right (the wide desktop spirals <img> is hidden). */
  .mobile-ready .footer-text { position: static; width: auto;
    box-sizing: border-box;
    margin: 108px 0 0;          /* Figma 124:978: contact-form bottom → deco band top */
    padding: 23px 0 0 8px;      /* text sits 23px below the band top (text top − deco top) */
    min-height: 136px;          /* deco band height; the 6-line text fits inside */
    font-size: 14px; line-height: 16px; }   /* Figma mobile footer (124:978) */
  .mobile-ready .footer-spirals { display: none; }
  /* right:negative --edge-bleed pushes the deco past the letterbox to the true
     viewport corner on mid-width screens (538–767px); 0 on real phones */
  .mobile-ready .footer-text::after { content: ""; position: absolute;
    right: calc(-1 * var(--edge-bleed, 0px)); bottom: 0; width: 241px; height: 136px;
    background: url("../img/footer-spirals-m.png") center / contain no-repeat; }
}
