/* ==========================================================================
   FUNK UNIVERSE — shared stylesheet
   Everything common to every page lives here. Page-specific sections stay
   in a <style> block on the page itself.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #060606;
  --surface:    #0e0e0e;
  --surface2:   #111;
  --line:       rgba(255,255,255,0.07);
  --line-focus: rgba(255,255,255,0.3);
  --silver:     #c8c8c8;
  --white:      #f0ede8;
  --muted:      #7a7a7a;
  --muted-dim:  #555;
  --error:      #ff6b6b;
  --font-h:     'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-b:     'Barlow', system-ui, -apple-system, sans-serif;
  --nav-h:      4.6rem;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-b);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Anchor targets clear the fixed nav instead of hiding under it. */
:target { scroll-margin-top: calc(var(--nav-h) + 1rem); }
[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }

img { max-width: 100%; }

/* `hidden` must win over the layout `display` a component sets on itself,
   otherwise a hidden .field still shows because .field is display:flex. */
[hidden] { display: none !important; }

/* ── FOCUS VISIBILITY ──────────────────────────────────────────────────────
   The site hides the native cursor on desktop, so keyboard users get no
   pointer feedback at all. A strong focus ring is essential here. */
:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 1000;
  background: var(--white);
  color: var(--bg);
  font-family: var(--font-h);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .8rem 1.6rem;
  border-radius: 0 0 3px 3px;
  transition: transform .2s;
}
.skip-link:focus { transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── CUSTOM CURSOR (desktop pointer devices only) ── */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor { cursor: none; }
  body.custom-cursor a,
  body.custom-cursor button,
  body.custom-cursor label,
  body.custom-cursor select,
  body.custom-cursor .faq-tab { cursor: none; }
}

.cursor, .cursor-ring { display: none; }

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .2s, height .2s;
}
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .3s, height .3s, border-color .3s;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring,
body:has(label:hover) .cursor-ring {
  width: 54px; height: 54px;
  border-color: rgba(255,255,255,0.7);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 600;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 3rem;
  background: linear-gradient(to bottom, rgba(6,6,6,0.97) 60%, transparent);
}

.nav-wordmark {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--silver);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-wordmark:hover { color: var(--white); }

.nav-right { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  font-family: var(--font-h);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-link:hover { color: var(--white); }

/* Marks the page you are currently on. */
.nav-link[aria-current="page"] {
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 2px;
}

.nav-cta {
  font-family: var(--font-h);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--white);
  padding: 0.55rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  cursor: pointer;
  padding: 10px;          /* keeps the tap target at 44px */
  margin: -10px;
  position: relative;
  z-index: 601;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--white);
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── MOBILE DRAWER ── */
.drawer {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 590;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.4rem;
  padding: 5rem 1.5rem 3rem;
  overflow-y: auto;
  /* `visibility` keeps the closed drawer's links out of the tab order —
     opacity alone leaves them focusable behind the page. */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .4s, visibility 0s .4s;
}
.drawer.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity .4s, visibility 0s 0s;
}
.drawer a {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  text-align: center;   /* keeps wrapped items like "Start Your Label" centred */
  opacity: 0; transform: translateY(22px);
  transition: opacity .4s, transform .4s, color .2s;
}
.drawer.open a { opacity: 1; transform: none; }
.drawer.open a:nth-child(1) { transition-delay: .04s; }
.drawer.open a:nth-child(2) { transition-delay: .08s; }
.drawer.open a:nth-child(3) { transition-delay: .12s; }
.drawer.open a:nth-child(4) { transition-delay: .16s; }
.drawer.open a:nth-child(5) { transition-delay: .20s; }
.drawer.open a:nth-child(6) { transition-delay: .24s; }
.drawer.open a:nth-child(7) { transition-delay: .28s; }
.drawer a:hover { color: var(--muted); }
.drawer a[aria-current="page"] { color: var(--muted-dim); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  font-family: var(--font-h);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  background: var(--white);
  padding: 1rem 2.4rem;
  border-radius: 2px;
  border: none;
  cursor: pointer;
  transition: background .25s, transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, opacity .25s;
}
.btn:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(255,255,255,.11);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line);
}
.btn-ghost:hover:not(:disabled) {
  background: transparent;
  border-color: rgba(255,255,255,.28);
  box-shadow: none;
}

/* ── INLINE SVG ICONS ──────────────────────────────────────────────────────
   These replace the Font Awesome CDN stylesheet and its webfont downloads:
   ~15 icons site-wide did not justify a render-blocking request. */
.i {
  width: 1em; height: 1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.i-spin { animation: iconSpin .9s linear infinite; }
@keyframes iconSpin { to { transform: rotate(360deg); } }

/* ── SHARED TEXT ── */
.rule { width: 100%; height: 1px; background: var(--line); }

.eyebrow {
  font-family: var(--font-h);
  font-weight: 400; font-size: .66rem;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.4rem;
}
.big-text {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: .95; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white); margin-bottom: 1.6rem;
}
.body-text {
  font-size: .88rem; color: var(--muted);
  line-height: 1.75; max-width: 46ch;
}
.body-text strong { color: var(--white); font-weight: 400; }

/* ── SHARED FORM FIELDS ── */
.field-group { display: flex; flex-direction: column; gap: 1.4rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label {
  font-family: var(--font-h); font-size: .62rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}

/* Radio groups are wrapped in a fieldset so the question is announced with
   each option. `display: block` avoids the flex/legend quirks. */
fieldset { border: none; padding: 0; min-width: 0; }
fieldset.field { display: block; }
legend {
  font-family: var(--font-h); font-size: .62rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  padding: 0; margin-bottom: .7rem;
}
.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--white);
  font-family: var(--font-b); font-weight: 300;
  font-size: 1rem;            /* 16px stops iOS Safari zooming on focus */
  padding: .85rem 1rem;
  outline: none;
  width: 100%;
  transition: border-color .25s, background .25s;
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-dim); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--line-focus);
  background: rgba(255,255,255,.02);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a7a7a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.field select option { background: var(--surface2); color: var(--white); }

/* Inline validation — replaces blocking alert() dialogs. */
.field.invalid input,
.field.invalid select,
.field.invalid textarea,
.field.invalid .country-wrap input { border-color: var(--error); }
.field-error {
  display: none;
  font-family: var(--font-h);
  font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--error);
}
.field.invalid .field-error { display: block; }

/* Form-level status message */
.form-status {
  display: none;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  font-family: var(--font-h);
  font-size: .74rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.form-status.show { display: block; }
.form-status.success { border-color: rgba(255,255,255,.25); color: var(--white); }
.form-status.error   { border-color: rgba(255,107,107,.4); color: var(--error); }

/* Spam honeypot — hidden from humans, tempting to bots. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
  width: 80px; height: auto;
  filter: brightness(.4) contrast(1.2);
  mix-blend-mode: screen;
}
footer p {
  font-family: var(--font-h);
  font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.footer-links {
  display: flex; gap: 2rem;
  list-style: none; flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--font-h);
  font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color .2s;
}
.footer-links a:hover { color: var(--white); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.in { opacity: 1; transform: none; will-change: auto; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ── REDUCED MOTION ──
   Also restores the native cursor: a lagging custom cursor is exactly the
   kind of motion this setting exists to switch off. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body.custom-cursor { cursor: auto; }
  .cursor, .cursor-ring { display: none !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── RESPONSIVE ──
   The nav collapses at 1024px rather than 900px: six links plus the CTA
   used to overlap the wordmark in the 900–1100px band. */
@media (max-width: 1024px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-link, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 900px) {
  footer {
    padding: 2rem 1.5rem;
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }
  /* Footer links used to be hidden on mobile, which removed the only
     in-page route to the other pages. They wrap instead now. */
  .footer-links { justify-content: center; gap: 1.2rem 1.6rem; }
}

@media (max-width: 480px) {
  .btn { width: 100%; }
}
