/* ============ RESET / BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #000000;
  --bg-2: #111010;
  --ink: #eae4d8;
  --ink-dim: #ddd9d2;
  --ink-faint: #d5cfc7;
  --line: rgba(232,226,214,.12);
  --sepia: #c8a96a;
  --sepia-dim: #8c7a52;
  --serif: "Permanent Marker", cursive;
  --sans: "Permanent Marker", cursive;
  --maxw: 1180px;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--sepia); }

/* ============ TEXTURE OVERLAYS ============ */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed; inset: 0; z-index: 8999; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%, transparent 40%, rgba(0,0,0,.55) 100%);
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(10,9,8,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { color: var(--sepia); font-size: 20px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font-family: var(--serif); font-size: 22px; letter-spacing: .5px; }
.brand-name em { font-weight: 600; }

/* meta stats row (under About description) */
.nav-meta {
  display: flex; justify-content: center; gap: clamp(14px,3vw,22px);
  margin: 34px auto 0; flex-wrap: wrap;
}
.meta-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 130px; padding: 20px 26px;
  border: 1px solid var(--line); border-radius: 5px;
  background: rgba(200,169,106,.03);
  transition: border-color .35s, transform .35s, background .35s;
}
.meta-cell:hover { border-color: var(--sepia-dim); background: rgba(200,169,106,.07); transform: translateY(-3px); }
.meta-cell b { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--sepia); line-height: 1; }
.meta-cell span { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink-faint); }

/* ============ TABS ============ */
.tabs {
  position: fixed; top: 67px; left: 0; right: 0; z-index: 999;
  display: flex; justify-content: center; gap: 10px;
  padding: 14px; background: rgba(10,9,8,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tab {
  font-family: var(--sans); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-dim); background: transparent; border: 1px solid var(--line);
  border-radius: 2px; padding: 11px 34px; cursor: pointer; transition: all .3s;
}
.tab:hover { color: var(--ink); border-color: var(--sepia-dim); }
.tab.active { background: var(--sepia); color: #0a0908; border-color: var(--sepia); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 14px 30px; border-radius: 2px; cursor: pointer; border: 1px solid transparent;
  transition: all .3s ease; font-weight: 400;
}
.btn-primary { background: var(--sepia); color: #0a0908; }
.btn-primary:hover { background: #e0c587; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(200,169,106,.2); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--sepia); color: var(--sepia); }
.btn-step { background: transparent; border-color: var(--sepia-dim); color: var(--sepia); padding: 11px 22px; font-size: 12px; }
.btn-step:hover { background: var(--sepia); color: #0a0908; }

/* ============ PANELS ============ */
main { padding-top: 124px; } /* clear fixed nav + tabs */
.panel { display: none; }
.panel.active { display: block; animation: fadeUp .6s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ============ SECTION SHELL ============ */
section.panel { padding: clamp(40px,7vh,80px) clamp(20px,4vw,72px); }
.section-head { max-width: 1500px; margin: 0 auto clamp(40px,6vw,60px); text-align: center; }
.section-head h2 { font-family: "Kavoon", serif; font-weight: 400; font-size: clamp(34px,5.5vw,72px); letter-spacing: -.5px; }
.eyebrow { font-size: 12.5px; letter-spacing: 4px; text-transform: uppercase; color: var(--sepia); margin-bottom: 16px; }
.section-desc { max-width: min(900px, 90vw); margin: 18px auto 0; color: var(--ink-dim); font-size: clamp(15px,1.7vw,20px); white-space: pre-line; }

/* ============ ABOUT / CAROUSEL ============ */
.about { background: linear-gradient(var(--bg), var(--bg-2)); }
.carousel { position: relative; max-width: 880px; margin: 0 auto; }
.car-stage {
  position: relative; aspect-ratio: 3/4; max-height: 70vh; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: #000; box-shadow: 0 40px 90px rgba(0,0,0,.6);
}
.car-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease, transform 1.4s ease;
  transform: scale(1.06);
}
.car-slide img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.car-slide.active { opacity: 1; transform: scale(1); }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 50px; height: 50px; border-radius: 50%; background: rgba(10,9,8,.6);
  border: 1px solid var(--line); color: var(--ink); font-size: 26px; cursor: pointer;
  backdrop-filter: blur(6px); transition: all .3s; line-height: 0;
}
.car-arrow:hover { background: var(--sepia); color: #0a0908; border-color: var(--sepia); }
.car-prev { left: -22px; } .car-next { right: -22px; }
.car-caption { text-align: center; margin-top: 22px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-dim); min-height: 28px; }

.thumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; max-width: 880px; margin: 26px auto 0; }
.thumb { width: 70px; height: 90px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; cursor: pointer; position: relative; opacity: .45; transition: all .4s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6) contrast(1.05); transition: .5s; }
.thumb:hover { opacity: .8; }
.thumb:hover img { transform: scale(1.08); }
.thumb.active { opacity: 1; border-color: var(--sepia); }
.thumb.active img { filter: grayscale(.1); }

/* ============ APPLY ============ */
.apply { background: var(--bg-2); }
.apply-wrap { max-width: 760px; margin: 0 auto; }

/* X sign-in gate */
.gate {
  max-width: 540px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; padding: clamp(38px,5vw,60px) clamp(24px,4vw,48px);
  background: radial-gradient(120% 130% at 50% 0%, rgba(200,169,106,.06), transparent 70%), rgba(255,255,255,.012);
}
.gate-mark { font-size: 44px; color: var(--sepia); margin-bottom: 20px; }
.gate h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px,3.5vw,34px); margin-bottom: 14px; }
.gate p { color: var(--ink-dim); font-size: 15px; max-width: 420px; margin: 0 auto 28px; }
.gate-btn { gap: 10px; padding: 16px 38px; }
.gate-btn .x-glyph { font-size: 18px; line-height: 0; }
.gate-btn.loading { opacity: .7; pointer-events: none; }
.gate-note { font-size: 12px !important; letter-spacing: .5px; color: var(--ink-faint) !important; margin: 22px auto 0 !important; }

/* connected bar */
.connected {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--sepia-dim); border-radius: 5px;
  background: rgba(200,169,106,.06); padding: 12px 18px; margin-bottom: 28px;
  font-size: 14px; color: var(--ink-dim);
}
.connected strong { color: var(--ink); }
.connected-dot { width: 9px; height: 9px; border-radius: 50%; background: #6fbf73; box-shadow: 0 0 10px #6fbf73; flex-shrink: 0; }
.connected-out { margin-left: auto; background: none; border: 0; color: var(--ink-faint); font-family: var(--sans); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: color .3s; }
.connected-out:hover { color: var(--sepia); }

.apply-progress { margin-bottom: 40px; }
.apply-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.apply-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sepia-dim), var(--sepia)); transition: width .6s cubic-bezier(.4,0,.2,1); }
.apply-count { display: block; margin-top: 12px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-faint); }

.steps { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: flex; gap: 22px; align-items: flex-start; position: relative;
  border: 1px solid var(--line); border-radius: 5px; padding: 26px 28px;
  background: rgba(255,255,255,.012); transition: all .45s ease;
}
.step.locked { opacity: .4; filter: blur(.4px); pointer-events: none; }
.step.done { border-color: var(--sepia-dim); background: rgba(200,169,106,.05); }
.step-no { font-family: var(--serif); font-size: 26px; color: var(--sepia); min-width: 36px; }
.step-body { flex: 1; }
.step-body h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin-bottom: 6px; }
.step-body p { color: var(--ink-dim); font-size: 14.5px; margin-bottom: 18px; }
.step-check {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: transparent;
  font-size: 14px; transition: all .4s; flex-shrink: 0;
}
.step.done .step-check { background: var(--sepia); border-color: var(--sepia); color: #0a0908; }

.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1; min-width: 220px; background: rgba(0,0,0,.35); border: 1px solid var(--line);
  border-radius: 3px; padding: 12px 16px; color: var(--ink); font-family: var(--sans);
  font-size: 14px; transition: border-color .3s;
}
.field input:focus { outline: none; border-color: var(--sepia); }
.field input::placeholder { color: var(--ink-faint); }
.field-err { display: block; margin-top: 10px; font-size: 12.5px; color: #d98a6a; min-height: 16px; letter-spacing: .5px; }

.btn-submit { width: 100%; margin-top: 14px; padding: 18px; }

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center;
  background: rgba(5,5,4,.85); backdrop-filter: blur(10px); padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-card {
  max-width: 480px; width: 100%; text-align: center; padding: clamp(36px,5vw,56px);
  border: 1px solid var(--sepia-dim); border-radius: 6px;
  background: linear-gradient(160deg, #161310, #0c0b0a);
  box-shadow: 0 40px 120px rgba(0,0,0,.7); transform: translateY(30px) scale(.96); transition: transform .6s cubic-bezier(.2,.9,.3,1);
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-mark { font-size: 52px; color: var(--sepia); margin-bottom: 18px; animation: spin 14s linear infinite; }
.modal-card h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px,4vw,40px); margin-bottom: 16px; }
.modal-card p { color: var(--ink-dim); margin-bottom: 16px; }
.modal-sub { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--sepia-dim); margin-bottom: 30px !important; }
.modal-card .btn-primary { display: inline-flex; gap: 10px; }
.modal-card .x-glyph { font-size: 17px; line-height: 0; }
.modal-dismiss {
  display: block; margin: 16px auto 0; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-faint); transition: color .3s;
}
.modal-dismiss:hover { color: var(--ink-dim); }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
  .tabs { top: 59px; }
  main { padding-top: 116px; }
  .tab { padding: 10px 26px; }
  .nav-meta { gap: 10px; }
  .meta-cell { flex: 1 1 90px; min-width: 90px; padding: 14px 10px; }
  .meta-cell b { font-size: 24px; }
  .meta-cell span { font-size: 10px; letter-spacing: 1.5px; }
  .car-prev { left: 8px; } .car-next { right: 8px; }
  .step { padding: 22px 20px; gap: 16px; }
  .step-check { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
