/* Futridge — inverted-L sidebar + longform */
:root {
  --violet:        #4A4089;
  --violet-mid:    #3A3470;
  --violet-deep:   #2A2454;
  --violet-ink:    #1B1638;
  --paper:         #F6F3FF;
  --paper-2:       #EEE8FA;
  --sheet:         #FFFCFF;
  --text:          #1B1638;
  --text-on-dark:  #F7F4FF;
  --muted:         #5A5278;
  --muted-on-dark: #E8E2F8;
  --gold:          #FDBA0F;
  --magenta:       #E91E8C;
  --teal:          #3CB39A;
  --border:        #D9D2EE;
  --border-dark:   rgba(247, 244, 255, 0.16);
  --sidebar-w:     232px;
  --top-h:         68px;
  --serif:         "Newsreader", Georgia, "Times New Roman", serif;
  --sans:          "Manrope", system-ui, -apple-system, sans-serif;
  --ease:          cubic-bezier(.22, .61, .36, 1);
  --maxw:          880px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name, blockquote {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 400;
  background: var(--gold); color: var(--violet-ink); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; letter-spacing: 0.01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary {
  background: var(--gold); color: var(--violet-ink);
  box-shadow: 0 10px 24px -12px rgba(253, 186, 15, .7);
}
.btn-ghost {
  background: transparent; color: var(--text-on-dark);
  border-color: rgba(247, 244, 255, 0.42);
}

/* ===== Inverted L: top rail ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-h);
  z-index: 120;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px 0 18px;
  background: var(--violet-ink);
  color: var(--text-on-dark);
  border-bottom: 1px solid var(--border-dark);
  transition: box-shadow .3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 12px 32px -18px rgba(27, 22, 56, .7); }

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 20px; font-weight: 600; color: var(--text-on-dark); }
.brand-mark {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); font-weight: 700;
}
.header-tag {
  margin-left: auto;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted-on-dark); font-weight: 600;
  white-space: nowrap;
}

.nav-toggle {
  display: none; width: 44px; height: 44px; margin-left: auto;
  border: 0; background: transparent; padding: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--text-on-dark);
  border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Inverted L: left sidebar ===== */
.sidebar {
  position: fixed; top: var(--top-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  z-index: 110;
  display: flex; flex-direction: column; gap: 4px;
  padding: 28px 18px 24px;
  background: var(--violet-deep);
  color: var(--text-on-dark);
  border-right: 1px solid var(--border-dark);
  overflow-y: auto;
}
.sidebar-kicker {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 16px;
}
.sidebar a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 11px 10px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  color: var(--muted-on-dark);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.sidebar a .nav-idx {
  font-family: var(--serif); font-size: 13px; color: var(--gold); min-width: 1.6em;
}
.sidebar a.is-active,
.sidebar a[aria-current="true"] {
  color: var(--text-on-dark);
  background: rgba(247, 244, 255, 0.08);
}
.sidebar .nav-cta { margin-top: 6px; }
.sidebar-rail {
  position: absolute; top: 28px; bottom: 120px; left: 0; width: 3px;
  background: rgba(247, 244, 255, 0.1);
}
.sidebar-fill {
  display: block; width: 100%; height: 0%;
  background: linear-gradient(180deg, var(--teal), var(--gold), var(--magenta));
  transition: height .2s linear;
}
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.sidebar-foot .btn { width: 100%; }
.sidebar-foot p {
  margin-top: 14px; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-on-dark);
}

/* ===== Main column ===== */
.frame {
  margin-left: var(--sidebar-w);
  padding-top: var(--top-h);
  min-width: 0;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 72px 48px 64px;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(253, 186, 15, 0.16), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(233, 30, 140, 0.14), transparent 55%),
    var(--violet-ink);
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero-copy { max-width: 560px; min-width: 0; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  color: var(--text-on-dark);
}
.hero h1 em {
  font-style: italic; color: var(--gold); font-weight: 500;
}
.hero-lede {
  margin-top: 22px; font-size: 1.08rem; color: var(--text-on-dark);
  max-width: 46ch; line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-stage { min-width: 0; }
.bridge-svg { width: 100%; height: auto; display: block; }
.bank { fill: rgba(247, 244, 255, 0.08); stroke: rgba(247, 244, 255, 0.22); }
.bank-label {
  fill: var(--text-on-dark); font-family: var(--sans); font-size: 13px;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
}
.water {
  fill: none; stroke: rgba(60, 179, 154, 0.45); stroke-width: 10;
  stroke-linecap: round;
}
.span-glow {
  fill: none; stroke: url(#spanGrad); stroke-width: 10; stroke-linecap: round;
  opacity: 0.35;
}
.span-draw {
  fill: none; stroke: url(#spanGrad); stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 520; stroke-dashoffset: 520;
  animation: draw-span 3.2s var(--ease) forwards;
}
.span-deck {
  fill: none; stroke: rgba(247, 244, 255, 0.28); stroke-width: 2;
  stroke-dasharray: 6 8;
  animation: dash-move 18s linear infinite;
}
.cables line {
  stroke: rgba(247, 244, 255, 0.22); stroke-width: 1.4;
}
.star-spin { animation: spin-star 18s linear infinite; transform-origin: 0 0; }
.traveler {
  filter: drop-shadow(0 0 8px rgba(253, 186, 15, 0.9));
}
.stage-caption {
  margin-top: 10px; font-size: 13px; color: var(--muted-on-dark); text-align: center;
}

@keyframes draw-span { to { stroke-dashoffset: 0; } }
@keyframes dash-move { to { stroke-dashoffset: -280; } }
@keyframes spin-star { to { transform: rotate(360deg); } }

/* ===== Longform sections ===== */
.section { padding: 88px 48px; }
.longform { background: var(--paper); }
.section-head { max-width: 640px; margin: 0 0 48px; }
.kicker {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--magenta); font-weight: 800; margin: 0 0 14px;
}
.kicker-light { color: var(--gold); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.section-head .lead {
  margin-top: 16px; color: var(--muted); font-size: 1.08rem; max-width: 54ch;
}

.chapter {
  display: grid; grid-template-columns: 72px 1fr; gap: 28px;
  padding: 36px 0; border-top: 1px solid var(--border);
  transition: transform .3s var(--ease), background .3s var(--ease);
  border-radius: 16px;
}
.chapter:last-of-type { border-bottom: 1px solid var(--border); }
.chapter-no {
  font-family: var(--serif); font-size: 2.6rem; color: var(--gold);
  line-height: 1; padding-top: 4px;
}
.chapter-body h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 14px; }
.chapter-body p { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.chapter-body p + p { margin-top: 14px; }

/* ===== Rails (dark band) ===== */
.band {
  background: var(--violet);
  color: var(--text-on-dark);
}
.band .section-head .lead { color: var(--muted-on-dark); }
.band h2 { color: var(--text-on-dark); }
.rails { display: grid; gap: 16px; }
.rail {
  background: var(--violet-mid);
  border: 1px solid var(--border-dark);
  border-radius: 18px;
  padding: 28px 28px 28px 32px;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.rail-hue {
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
}
.hue-teal { background: var(--teal); }
.hue-gold { background: var(--gold); }
.hue-magenta { background: var(--magenta); }
.rail h3 { font-size: 1.55rem; color: var(--text-on-dark); margin-bottom: 10px; }
.rail p { color: var(--text-on-dark); max-width: 62ch; }

/* ===== Quote band ===== */
.quote-band {
  background: var(--violet-ink);
  color: var(--text-on-dark);
  padding: 96px 48px;
  text-align: center;
}
.quote-band blockquote { margin: 0 auto; max-width: 720px; }
.quote-band p {
  font-family: var(--serif); font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  line-height: 1.25; color: var(--text-on-dark);
}
.quote-band cite {
  display: block; margin-top: 22px; font-style: normal;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}

/* ===== FAQ ===== */
.faq-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--sheet);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.faq-item.open { border-color: var(--violet); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--text);
  font-family: var(--serif); font-size: 1.15rem; font-weight: 500; padding: 20px 22px;
}
.faq-ico { position: relative; flex: 0 0 auto; width: 16px; height: 16px; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; background: var(--magenta); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq-ico::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-ico::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item.open .faq-ico::after { transform: scaleY(0); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 280px; }
.faq-a p { color: var(--muted); margin: 0; padding: 0 22px 20px; }

/* ===== Contact ===== */
.contact-sec { background: var(--paper-2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 14px; }
.contact-copy p { color: var(--muted); max-width: 42ch; }
.contact-email {
  display: inline-block; margin-top: 22px;
  font-family: var(--serif); font-size: 1.45rem; color: var(--violet);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.contact-addr { margin-top: 18px; font-size: 0.98rem; color: var(--muted); }
.contact-form {
  background: var(--sheet); border: 1px solid var(--border); border-radius: 18px;
  padding: 28px; display: grid; gap: 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field textarea {
  width: 100%; background: var(--paper); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font: inherit; font-size: 15px;
  resize: vertical; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); }

/* ===== Footer ===== */
.site-footer {
  background: var(--violet-ink); color: var(--text-on-dark);
  padding: 48px 48px 28px;
  border-top: 1px solid var(--border-dark);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; flex-wrap: wrap; padding-bottom: 28px;
  border-bottom: 1px solid var(--border-dark);
}
.footer-tag { margin-top: 12px; color: var(--muted-on-dark); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: var(--muted-on-dark); font-size: 14px; font-weight: 600; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 20px; color: var(--muted-on-dark); font-size: 13px;
}

/* ===== Reveal (must precede hover transforms) ===== */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .span-draw, .span-deck, .star-spin, .traveler { animation: none !important; }
  .traveler { display: none; }
}

/* Hover AFTER .reveal.in so lift is not overwritten */
@media (hover: hover) and (pointer: fine) {
  .sidebar a:hover {
    color: var(--text-on-dark);
    background: rgba(247, 244, 255, 0.1);
    transform: translateX(4px);
  }
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(253, 186, 15, .85);
  }
  .btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--gold); color: var(--gold);
  }
  .js .reveal.in.chapter:hover {
    transform: translateY(-4px);
    background: var(--sheet);
    padding-left: 16px; padding-right: 16px;
  }
  .js .reveal.in.rail:hover {
    transform: translateY(-6px);
    background: #433C7C;
    border-color: rgba(253, 186, 15, 0.4);
  }
  .js .reveal.in.faq-item:hover { border-color: var(--violet); transform: translateY(-3px); }
  .faq-q:hover { color: var(--violet); }
  .contact-email:hover { border-bottom-color: var(--magenta); color: var(--magenta); }
  .js .reveal.in.contact-form:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -24px rgba(27, 22, 56, .35);
  }
  .footer-nav a:hover { color: var(--gold); }
}

/* ===== Tablet / phone: sidebar stacks ===== */
@media (max-width: 980px) {
  .hero, .faq-layout, .contact-grid { grid-template-columns: 1fr; }
  .hero { gap: 28px; }
  .hero-stage { order: -1; }
  .faq-layout { gap: 28px; }
}

@media (max-width: 820px) {
  :root { --top-h: 64px; }
  .header-tag { display: none; }
  .nav-toggle { display: flex; }

  .sidebar {
    position: fixed; top: var(--top-h); left: 0; right: 0; bottom: auto;
    width: 100%; height: auto; max-height: min(78vh, 560px);
    transform: translateY(-120%);
    transition: transform .35s var(--ease);
    border-right: 0;
    border-bottom: 1px solid var(--border-dark);
    padding: 16px 20px 22px;
    gap: 2px;
    z-index: 130;
  }
  .sidebar.open { transform: translateY(0); }
  .sidebar-rail { display: none; }
  .sidebar-foot { margin-top: 12px; }
  .sidebar-foot .btn { width: auto; }

  .frame { margin-left: 0; }
  .hero, .section, .quote-band, .site-footer { padding-left: 22px; padding-right: 22px; }
  .hero { padding-top: 48px; padding-bottom: 48px; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .quote-band { padding-top: 72px; padding-bottom: 72px; }
  .chapter { grid-template-columns: 48px 1fr; gap: 14px; padding: 28px 0; }
}

@media (max-width: 480px) {
  .hero, .section, .quote-band, .site-footer { padding-left: 18px; padding-right: 18px; }
  .hero { padding-bottom: 56px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .chapter { grid-template-columns: 1fr; gap: 6px; }
  .chapter-no { font-size: 1.8rem; }
  .contact-form { padding: 22px 18px; }
  .footer-inner { flex-direction: column; }
  .brand-name { font-size: 18px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
}
