/* ============================================================
   THE FACTION — shared site stylesheet (chrome / deep-space theme)
   One fixed WebGL starfield + chrome 3D wordmark (scene.js) sits
   behind every page; HUD-style chrome/glass panels float over it.
   Fonts: Michroma (display/headings) + Chakra Petch (body)
          + Share Tech Mono (nav/labels/mono accents)
   ============================================================ */

:root {
  color-scheme: dark;

  /* core surfaces */
  --bg: #050505;
  --bg-alt: #0a0a0b;
  --surface: #0c0c0dd9;
  --text: #ececec;
  --text-muted: #bfc2c8;
  --line: rgba(255, 255, 255, 0.16);
  --line-gold: rgba(255, 255, 255, 0.3);

  /* chrome accent (replaces the old gold accent, same variable names
     so every page's existing inline var(--gold)/var(--chrome) usage
     just picks up the new palette automatically) */
  --gold: #ffffff;
  --gold-light: #ffffff;
  --gold-deep: #55585e;
  --chrome-light: #ffffff;
  --chrome-mid: #a9adb3;
  --chrome-deep: #2a2c30;
  --clay: #bfc2c8;
  --steel: #bfc2c8;
  --peach: #ffb4a8;

  --metal-gradient: linear-gradient(180deg, #ffffff 0%, #d9dce0 28%, #7c8087 47%, #0e0f11 51%, #55585e 66%, #c9ccd1 84%, #ffffff 100%);
  --chrome-gradient: linear-gradient(135deg, #ffffff, #8a8d93 22%, #1a1b1d 45%, #d0d3d7 62%, #4c4f54 80%, #f5f6f7);

  /* Flatter, all-light chrome for solid buttons — same metallic family
     as --metal-gradient but with no dark midline, so button labels
     stay readable instead of fading into a dark band. */
  --btn-chrome: linear-gradient(180deg, #ffffff 0%, #eef0f3 18%, #cfd3d8 42%, #f8f9fa 58%, #d6d9dd 80%, #ffffff 100%);

  --glow-soft: rgba(255, 255, 255, 0.3);
  --glow-strong: rgba(255, 255, 255, 0.55);

  --display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --body-font: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Fixed 3D scene + scanline overlay (behind everything) ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: radial-gradient(120% 80% at 50% 100%, #2a2a2c 0%, #101011 45%, var(--bg) 80%);
}

.scan {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.2) 2px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.7) 100%);
}

/* Everything else sits above the scene/scanlines */
header.site-header, .hero, section.block, footer.site-footer { position: relative; z-index: 2; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text);
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.05;
  background: var(--metal-gradient);
  background-size: 100% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(255,255,255,0.3));
  animation: sheen 7s ease-in-out infinite alternate;
}

h2 {
  font-size: clamp(24px, 4vw, 40px);
  background: var(--metal-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3 { font-size: 17px; }

@keyframes sheen { from { background-position: 0 0; } to { background-position: 0 100%; } }

@media (prefers-reduced-motion: reduce) {
  h1 { animation: none; }
}

/* Visually-hidden text (kept for screen readers / SEO) */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Hero wordmark: the real logo artwork in place of styled text,
   used on the homepage hero in place of a plain text h1. */
.hero-logo {
  display: block;
  width: min(92vw, 640px);
  aspect-ratio: 1600 / 843;
  margin: 0 auto 16px;
  background: #ffffff;
  /* .hero-logo is an h1, which the base h1 rule above clips to its
     own text (and colors transparent) for the chrome-sheen effect —
     explicitly reset both here so this element shows a flat white
     fill across its full masked shape instead. */
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: transparent;
  -webkit-mask: url('img/logo.png') center / contain no-repeat;
  mask: url('img/logo.png') center / contain no-repeat;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(255,255,255,0.3));
}

p { margin: 0 0 16px; color: var(--text-muted); }

a.inline-link, p a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line-gold); }
a.inline-link:hover, p a:hover { color: #fff; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

/* ---------- Cursor glow (desktop only, added by site.js) ---------- */

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  margin-top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-soft), transparent 70%);
  pointer-events: none;
  z-index: 15;
  mix-blend-mode: screen;
  will-change: transform;
}

/* ---------- Header / Nav ---------- */

header.site-header {
  background: linear-gradient(#050505cc, #05050566);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1080px;
  margin: 0 auto;
  gap: 16px;
  flex-wrap: nowrap;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

/* Logo: the real wordmark image, filled with the chrome gradient via
   a CSS mask (so its colors always match the site's metal palette)
   and given a bevel via drop-shadow for a subtle 3D edge. No text
   node inside — size is fixed so it never collides with nav items. */
.mark {
  display: inline-block;
  flex-shrink: 0;
  width: 112px;
  aspect-ratio: 1600 / 843;
  background: #ffffff;
  -webkit-mask: url('img/logo.png') center / contain no-repeat;
  mask: url('img/logo.png') center / contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.4)) drop-shadow(0 3px 7px rgba(0,0,0,0.65));
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.mark:hover { filter: drop-shadow(0 1px 0 rgba(255,255,255,0.55)) drop-shadow(0 3px 9px rgba(0,0,0,0.75)) brightness(1.08); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

nav.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 24px);
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav.site-nav a:hover { color: var(--text); text-decoration: none; }
nav.site-nav a.current:not(.btn) { color: var(--gold); border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
nav.site-nav a.btn.current { box-shadow: 0 0 0 2px var(--gold), 0 0 16px var(--glow-soft); }

/* ---------- Mobile nav: hamburger + dropdown instead of the full row ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--chrome-mid);
  background: transparent;
  flex-shrink: 0;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--metal-gradient);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 24px;
  min-width: 190px;
  background: #0a0a0bf2;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 60;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.nav-dropdown.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav-dropdown a { display: block; padding: 12px; border-radius: 8px; color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; text-decoration: none; }
.nav-dropdown a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-dropdown a.current { color: var(--gold); background: rgba(255,255,255,0.08); }
.nav-dropdown a.btn-primary { margin-top: 6px; text-align: center; color: #060606; padding: 12px; }

@media (max-width: 640px) {
  nav.site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 641px) {
  .nav-dropdown { display: none; }
}

.btn {
  display: inline-block;
  position: relative;
  overflow: hidden;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: box-shadow 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  will-change: transform;
}

.btn-primary {
  background: var(--btn-chrome);
  color: #060606;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.5) inset, 0 10px 32px var(--glow-soft);
  border: 1px solid rgba(255,255,255,0.5);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 1px #fff inset, 0 16px 44px var(--glow-strong); text-decoration: none; }

.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--chrome-mid); }
.btn-outline:hover { background: rgba(255,255,255,0.08); box-shadow: 0 0 20px var(--glow-soft); text-decoration: none; }

nav.site-nav .btn { padding: 8px 18px; font-size: 11px; }
nav.site-nav a.btn-primary { color: #060606; }

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  padding: 100px 24px 90px;
  text-align: center;
}

.hero p.lead, .hero p.tag {
  max-width: 460px;
  margin: 22px auto 0;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.hero .btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* ---------- Marquee band ---------- */

.band {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: #05050599;
  backdrop-filter: blur(6px);
}
.band .band-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  padding-block: 14px;
  animation: slide 32s linear infinite;
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chrome-mid);
}
.band i { color: var(--text); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .band .band-track { animation: none; } }

/* ---------- Section blocks ---------- */

section.block { padding: 64px 24px; }
section.block.alt { background: var(--bg-alt); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 32px;
}

@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.12s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover {
  border-color: var(--chrome-mid);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 24px var(--glow-soft);
}

.card .badge {
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: var(--btn-chrome);
  color: #060606;
  font-family: var(--display);
  font-size: 15px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 0 16px var(--glow-soft);
}

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Forms (Apply page) ---------- */

.form-card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 32px;
  border-radius: 20px;
  border: 1px solid var(--line-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  text-align: center;
}

.form-card form { text-align: left; }

.form-card label {
  display: block;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--mono);
}

.form-card .optional { color: var(--clay); font-weight: 400; text-transform: none; letter-spacing: 0; }

.form-card input[type=text],
.form-card input[type=tel],
.form-card input[type=email] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
  background: #0a0a0b;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus { outline: none; border-color: var(--chrome-mid); box-shadow: 0 0 0 3px var(--glow-soft); }

.hp-wrap { display: none; }

.form-card button[type=submit] {
  width: 100%;
  padding: 13px;
  margin-top: 6px;
  background: var(--btn-chrome);
  color: #060606;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--display);
  cursor: pointer;
  box-shadow: 0 0 18px var(--glow-soft);
  transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.form-card button[type=submit]:hover { filter: brightness(1.12); box-shadow: 0 0 28px var(--glow-strong); }
.form-card button[type=submit]:disabled { opacity: 0.6; cursor: default; }

.error-box {
  background: rgba(255,180,168,0.12);
  color: var(--peach);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: left;
  border: 1px solid rgba(255,180,168,0.35);
  word-break: break-word;
}

.thanks-card { display: none; }
.thanks-card .badge {
  width: 48px; height: 48px; line-height: 48px; margin: 0 auto 16px;
  background: var(--btn-chrome); color: #060606; font-weight: 400;
  font-size: 18px; border-radius: 12px; font-family: var(--display);
  box-shadow: 0 0 20px var(--glow-soft);
}
.continue-note { color: var(--text-muted); font-size: 12px; margin-top: 18px; }

/* ---------- Blog ---------- */

.post-list { margin-top: 32px; }
.post-item { padding: 24px 0; border-bottom: 1px solid var(--line); }
.post-item:first-child { padding-top: 0; }

.post-date {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.post-item h3 { margin-bottom: 8px; font-size: 20px; }
.post-item h3 a { color: var(--text); background: none; -webkit-text-fill-color: initial; }
.post-item h3 a:hover { color: #fff; }

/* ---------- Instagram auto-sync grid ---------- */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.ig-card {
  display: block;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.12s ease-out;
}

.ig-card:hover {
  border-color: var(--chrome-mid);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px var(--glow-soft);
  text-decoration: none;
}

.ig-card .ig-thumb { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; }

.ig-card .ig-caption {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ig-note { color: var(--clay); font-size: 13px; margin-bottom: 32px; }

article.post-body { max-width: 680px; margin: 0 auto; }
article.post-body img { max-width: 100%; border-radius: 10px; margin: 24px 0; }

/* ---------- Footer ---------- */

footer.site-footer {
  background: #050505cc;
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  padding: 48px 24px 28px;
  margin-top: 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}

footer.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }

footer.site-footer .foot-brand .mark { width: 140px; margin-bottom: 14px; display: inline-block; }
footer.site-footer a { color: var(--text-muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--text); }

footer.site-footer .foot-links {
  display: flex;
  gap: 20px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.fine-print {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}
