/* Practical Legal Tech demo-v2 — "Ink & Brass"
   Palette: ink black, engraved gold, terminal teal, paper white. */

:root {
  --ink: #0a0d11;
  --ink-2: #0e1319;
  --panel: #121820;
  --line: #232b35;
  --gold: #d4a24e;
  --gold-hi: #eec37a;
  --teal: #35e0c8;
  --teal-dim: #1c8c7e;
  --paper: #ece5d3;
  --muted: #93a0ad;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(53, 224, 200, .05), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(212, 162, 78, .06), transparent 55%),
    var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  line-height: 1.6;
  overflow-x: hidden;
}

/* faint drafting grid, like the live site but quieter */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 162, 78, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 162, 78, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  z-index: 0;
}

main { position: relative; z-index: 1; }
a { color: var(--teal); text-decoration: none; }
img { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-family: var(--mono);
}
.skip:focus { left: 0; }

/* ---------- type helpers ---------- */
.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.2rem;
  font-weight: 500;
}
.lede { color: var(--muted); max-width: 46rem; font-size: 1.06rem; margin: 0; }
.chip {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .08em;
  padding: .15rem .45rem; border-radius: 3px; vertical-align: middle;
}
.chip-beg { background: rgba(53, 224, 200, .12); color: var(--teal); }
.chip-int { background: rgba(212, 162, 78, .14); color: var(--gold-hi); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .95rem 1.6rem;
  border-radius: 4px;
  border: 1px solid var(--gold);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: #14100a; }
.btn-gold:hover { background: var(--gold-hi); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212, 162, 78, .3); }
.btn-ghost { color: var(--gold-hi); background: rgba(212, 162, 78, .05); }
.btn-ghost:hover { background: rgba(212, 162, 78, .14); transform: translateY(-2px); }
.btn-small { padding: .55rem 1rem; font-size: .68rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(9, 12, 16, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 162, 78, .14);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: .7rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--paper); }
.roundel {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(212, 162, 78, .18), transparent 65%);
}
.brand-text strong { display: block; font-size: 1rem; line-height: 1.15; font-weight: 600; }
.brand-text small {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold);
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--gold-hi); }
.nav-links .btn { color: #14100a; }
.progress { height: 2px; background: transparent; }
.progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  transition: width .12s linear;
}

/* ---------- the film ---------- */
.film { position: relative; height: 460vh; background: #05070a; }
.film-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
#filmCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, .62) 0%, rgba(5, 7, 10, .12) 30%, rgba(5, 7, 10, .12) 62%, rgba(5, 7, 10, .78) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(5, 7, 10, .55) 100%);
}

.film-motes i {
  position: absolute; display: block; width: 5px; height: 5px;
  background: var(--teal); opacity: .35;
  animation: mote 11s linear infinite;
}
.film-motes i:nth-child(odd) { background: var(--gold); }
.film-motes i:nth-child(1) { left: 8%;  bottom: -4%; animation-delay: 0s; }
.film-motes i:nth-child(2) { left: 22%; bottom: -4%; animation-delay: 2.5s; }
.film-motes i:nth-child(3) { left: 37%; bottom: -4%; animation-delay: 5s; }
.film-motes i:nth-child(4) { left: 52%; bottom: -4%; animation-delay: 1.2s; }
.film-motes i:nth-child(5) { left: 64%; bottom: -4%; animation-delay: 6.4s; }
.film-motes i:nth-child(6) { left: 76%; bottom: -4%; animation-delay: 3.6s; }
.film-motes i:nth-child(7) { left: 87%; bottom: -4%; animation-delay: 7.8s; }
.film-motes i:nth-child(8) { left: 95%; bottom: -4%; animation-delay: 9s; }
@keyframes mote {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  12% { opacity: .4; }
  100% { transform: translateY(-108vh) scale(.4); opacity: 0; }
}

.film-beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 1.4rem;
  opacity: 0; pointer-events: none;
  will-change: opacity, transform;
}
.film-caption p {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.25;
  max-width: 22ch;
  margin: 0;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .85);
}

/* wordmark */
.wordmark {
  display: flex; align-items: center; gap: clamp(.8rem, 2.5vw, 1.6rem);
  margin: 0; font-weight: 400;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .8);
}
.wm-print {
  font-style: italic;
  font-size: clamp(3rem, 9vw, 7rem);
  color: var(--paper);
}
.wm-link { display: flex; align-items: center; gap: .4rem; }
.wm-link .dia { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.wm-link .line {
  width: clamp(2rem, 6vw, 4.5rem); height: 1px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}
.wm-link .dia:last-child { background: var(--teal); }
.wm-pixels { font-family: var(--mono); font-size: clamp(2.6rem, 8vw, 6rem); color: var(--teal); display: inline-flex; }
.wm-pixels b { font-weight: 500; animation: pxin .7s cubic-bezier(.2, .9, .3, 1.4) both; }
.wm-pixels b:nth-child(1) { animation-delay: .15s; }
.wm-pixels b:nth-child(2) { animation-delay: .25s; }
.wm-pixels b:nth-child(3) { animation-delay: .35s; }
.wm-pixels b:nth-child(4) { animation-delay: .45s; }
.wm-pixels b:nth-child(5) { animation-delay: .55s; }
.wm-pixels b:nth-child(6) { animation-delay: .65s; }
.wm-pixels .cursor { animation: pxin .7s .75s both, blink 1.1s 1.4s step-end infinite; font-size: .8em; align-self: center; }
@keyframes pxin {
  from { opacity: 0; transform: translateY(.45em) scale(.4); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes blink { 50% { opacity: 0; } }

.film-title .kicker { color: var(--gold-hi); }
.film-hint {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted); margin-top: 3rem;
}
.film-hint .chev { display: block; font-size: 1.3rem; color: var(--gold); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

.film-final h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1rem; }
.film-final-sub { color: var(--muted); max-width: 40rem; margin: 0 0 2rem; font-size: 1.02rem; }
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.film-loader {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 180px; height: 2px; background: rgba(236, 229, 211, .12);
  opacity: 1; transition: opacity .6s ease;
}
.film-loader span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .3s ease; }
.film-loader.done { opacity: 0; }

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--ink-2); padding: .85rem 0;
  position: relative; z-index: 2;
}
.marquee-track {
  display: inline-flex; gap: 2.6rem; white-space: nowrap;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  animation: marquee 60s linear infinite;
  will-change: transform;
}
.marquee-track em { color: var(--gold); font-style: normal; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 7rem 1.4rem 5rem; position: relative; }
.section-head { margin-bottom: 3rem; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- toolbox ---------- */
.cat-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.6rem; }
.cat-tab {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel);
  padding: 0; cursor: pointer; text-align: left;
  color: var(--paper);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
  min-height: 118px;
  font-family: inherit;
}
.cat-tab video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .38;
  transition: opacity .4s ease, transform .6s ease;
}
.cat-tab .cat-label {
  position: relative; z-index: 2; display: flex; flex-direction: column; gap: .3rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 10, .82));
  height: 100%; justify-content: flex-end;
}
.cat-tab .cat-name { font-size: 1.06rem; }
.cat-tab .cat-count { font-family: var(--mono); font-size: .64rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }
.cat-tab:hover { transform: translateY(-3px); border-color: rgba(212, 162, 78, .5); }
.cat-tab:hover video { opacity: .6; transform: scale(1.04); }
.cat-tab[aria-selected="true"] { border-color: var(--gold); box-shadow: 0 10px 34px rgba(212, 162, 78, .16); }
.cat-tab[aria-selected="true"] .cat-count { color: var(--gold-hi); }
.cat-tab[aria-selected="true"] video { opacity: .62; }

.tips-stage { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(14, 19, 25, .6); }
.tips-backdrop {
  position: absolute; inset: -2%; width: 104%; height: 104%;
  object-fit: cover; opacity: .1; filter: blur(22px) saturate(1.2);
  pointer-events: none;
  transition: opacity .5s ease;
}
.tips-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
  padding: 1.4rem;
  min-height: 300px;
}
.tip-card {
  display: flex; flex-direction: column; gap: .55rem;
  border: 1px solid var(--line); border-radius: 6px;
  background: rgba(10, 13, 17, .85);
  padding: 1.15rem 1.2rem 1.05rem;
  color: var(--paper);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  opacity: 0; transform: translateY(18px);
  animation: cardin .55s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes cardin { to { opacity: 1; transform: none; } }
.tip-card:hover { transform: translateY(-4px); border-color: rgba(212, 162, 78, .55); box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.tip-meta { display: flex; gap: .5rem; align-items: center; }
.tip-fmt { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: .12rem .4rem; }
.tip-title { font-size: 1.13rem; line-height: 1.3; margin: 0; }
.tip-blurb { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.tip-read {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-hi); margin-top: .35rem;
}
.tip-read i { display: inline-block; font-style: normal; transition: transform .25s ease; }
.tip-card:hover .tip-read i { transform: translateX(6px); }

/* ---------- privsweep ---------- */
.privsweep {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(800px 400px at 15% 20%, rgba(53, 224, 200, .06), transparent 60%),
    var(--ink-2);
  max-width: none;
}
.ps-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 3.5rem; align-items: center;
}
.ps-figure { margin: 0; }
.ps-emblem {
  position: relative; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(212, 162, 78, .3);
  box-shadow: var(--shadow);
  animation: emblemfloat 7s ease-in-out infinite;
}
@keyframes emblemfloat { 50% { transform: translateY(-10px); } }
.ps-scanline {
  position: absolute; left: 0; right: 0; top: -12%;
  height: 12%;
  background: linear-gradient(180deg, transparent, rgba(53, 224, 200, .28), transparent);
  animation: scan 3.8s ease-in-out infinite;
}
@keyframes scan { 55% { top: 100%; } 100% { top: 100%; } }
.ps-points { list-style: none; margin: 1.6rem 0 2rem; padding: 0; display: grid; gap: .7rem; }
.ps-points li { padding-left: 1.6rem; position: relative; color: var(--paper); }
.ps-points li::before { content: "\2192"; position: absolute; left: 0; color: var(--teal); }
.ps-field { display: flex; gap: .7rem; flex-wrap: wrap; }
.ps-field input {
  flex: 1 1 260px;
  background: rgba(5, 7, 10, .8);
  border: 1px solid var(--line); border-radius: 4px;
  padding: .95rem 1.1rem;
  color: var(--paper); font-family: var(--mono); font-size: .9rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.ps-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53, 224, 200, .14); outline: none; }
.ps-form.sending .btn { pointer-events: none; opacity: .7; }
.ps-form.error input { border-color: #e0635a; animation: shake .4s ease; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ps-note { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--muted); margin-top: .9rem; }
.ps-note.err { color: #e0938d; }
.ps-success { border-left: 2px solid var(--teal); padding-left: 1.2rem; animation: cardin .5s ease both; }
.ps-success h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.ps-success p { color: var(--muted); margin: 0; }

/* ---------- membership ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; max-width: 900px; }
.plan {
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); padding: 2rem 1.8rem;
  position: relative;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.plan:hover { transform: translateY(-4px); border-color: rgba(212, 162, 78, .45); box-shadow: var(--shadow); }
.plan-featured { border-color: rgba(212, 162, 78, .55); background: linear-gradient(180deg, rgba(212, 162, 78, .07), transparent 45%), var(--panel); }
.plan-flag {
  position: absolute; top: -0.7rem; left: 1.6rem;
  background: var(--gold); color: #14100a;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  border-radius: 3px; padding: .22rem .6rem; margin: 0;
}
.plan-tier { font-size: 1.3rem; margin: 0 0 1rem; }
.plan-tier span { display: block; font-family: var(--mono); font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.plan-price { font-size: 3rem; margin: 0; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.plan-price sup { font-size: 1.3rem; margin-right: .1rem; }
.plan-price small { font-size: 1rem; color: var(--muted); }
.plan-billed { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; color: var(--muted); margin: .3rem 0 1.2rem; }
.plan-billed em { font-style: normal; color: var(--gold); }
.plan-blurb { color: var(--paper); }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; display: grid; gap: .55rem; }
.plan ul li { padding-left: 1.5rem; position: relative; color: var(--muted); font-size: .95rem; }
.plan ul li::before { content: "\2192"; position: absolute; left: 0; color: var(--teal); }
.plans-note { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--muted); margin: 1.6rem 0 3rem; }
.plans-note a { color: var(--gold-hi); border-bottom: 1px dotted rgba(212, 162, 78, .5); }
.decoded { border-top: 1px solid var(--line); padding-top: 2.2rem; max-width: 900px; }
.decoded h3 { font-size: 1.15rem; margin: 0 0 1.2rem; color: var(--gold-hi); }
.decoded dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .9rem 2rem; margin: 0; }
.decoded div { display: flex; gap: .9rem; align-items: baseline; }
.decoded dt { font-family: var(--mono); color: var(--gold); min-width: 4.4rem; }
.decoded dd { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
.about-copy p { color: var(--muted); }
.about-copy p.kicker { color: var(--gold); }
.badges { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.badge {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  border: 1px solid rgba(212, 162, 78, .4); color: var(--gold-hi);
  padding: .45rem .8rem; border-radius: 999px;
}
.about-figure { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-figure img { transition: transform .2s linear; will-change: transform; transform: scale(1.08); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #07090c; position: relative; z-index: 1; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2.6rem 1.4rem; display: grid; gap: 1.2rem; }
.footer p { color: var(--muted); font-size: .85rem; max-width: 56rem; margin: 0; }

/* ---------- fx canvas ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cat-tabs { grid-template-columns: repeat(2, 1fr); }
  .ps-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .ps-figure { max-width: 340px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .nav-links { gap: .9rem; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .cat-tabs { grid-template-columns: 1fr 1fr; }
  .wordmark { flex-direction: column; gap: .4rem; }
  .film { height: 380vh; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .film { height: auto; }
  .film-sticky { position: relative; height: auto; min-height: 100vh; }
  .film-beat { position: relative; inset: auto; opacity: 1 !important; transform: none !important; pointer-events: auto; padding: 4rem 1.4rem; }
  #filmCanvas, .film-motes, .film-loader, .film-hint .chev { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tip-card { animation: none; opacity: 1; transform: none; }
  .ps-emblem, .ps-scanline, .wm-pixels b { animation: none !important; }
  .wm-pixels b { opacity: 1; }
}
