/* ============================================================
   Torri homepage — institutional layer over landing-v2.css.
   Loaded by public/landing/index.html only, so the interior partner
   pages keep the shared system untouched.

   Moves, borrowed from the large B2B sites (Harvey, Stripe, Linear):
   · a visible structural grid — page rails, joined hairline cells,
     mono figure labels — so the page reads as engineered, not templated
   · two-tone serif headlines (ink + muted) instead of italic accents
   · sections alternate only between paper and sandstone (--paper-tint);
     the footer alone goes dark, by re-declaring the colour tokens
   · the product shown on a sandstone stage, not floating on paper
   ============================================================ */

.home {
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --night: #0a100f;
  --rail-l: calc(50% - var(--maxw) / 2);
  --rail-r: calc(50% + var(--maxw) / 2);
}

/* ---------- Night scope (footer) ----------
   Same token names as :root, dark values. Anything inside inherits them. */
.home .footer {
  --paper:      var(--night);
  --paper-tint: #111918;
  --surface:    #131c1a;
  --ink:        #f3f2ee;
  --ink-2:      #b4b9b4;
  --ink-3:      #7c8580;
  --line:       rgba(243, 242, 238, 0.14);
  --line-soft:  rgba(243, 242, 238, 0.08);
  --teal:       #1fbf9e;
  --teal-deep:  #4cd2b4;
  --shadow-frame: 0 1px 2px rgba(0, 0, 0, 0.5), 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  color-scheme: dark;
}

/* ---------- Page rails ----------
   Two hairlines at the content edges, carried through every structured
   section, with a + where each section boundary crosses them. */
.home .hero,
.home .h-sec {
  position: relative;
  background-image:
    linear-gradient(var(--line-soft), var(--line-soft)),
    linear-gradient(var(--line-soft), var(--line-soft));
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position: var(--rail-l) 0, var(--rail-r) 0;
}
.home .h-sec { border-top: 1px solid var(--line-soft); }
.home .h-sec::before,
.home .h-sec::after {
  content: '';
  position: absolute;
  top: -5px;
  width: 9px;
  height: 9px;
  background:
    linear-gradient(var(--ink-3), var(--ink-3)) center / 1px 100% no-repeat,
    linear-gradient(var(--ink-3), var(--ink-3)) center / 100% 1px no-repeat;
  opacity: 0.7;
  pointer-events: none;
}
.home .h-sec::before { left: calc(var(--rail-l) - 4px); }
.home .h-sec::after  { left: calc(var(--rail-r) - 4px); }
/* The plan grid breaks out wider than the rails; drop them there. */
.home #pricing { background-image: none; }
@media (max-width: 1220px) {
  .home .hero, .home .h-sec { background-image: none; }
  .home .h-sec::before, .home .h-sec::after { display: none; }
}

/* ---------- Type ---------- */

.h-label {
  display: flex;
  align-items: center;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.section__head--center .h-label { justify-content: center; }

.home .section__title {
  margin-top: 20px;
  font-weight: 360;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.022em;
}
.h-mute { color: var(--ink-3); }
.home .hero__title { letter-spacing: -0.024em; }

.h-head { margin-bottom: clamp(44px, 6vw, 80px); max-width: 760px; }
.h-head--split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  max-width: none;
}
.h-head--split .section__lede { margin: 0; font-size: 16px; }
@media (max-width: 860px) {
  .h-head--split { grid-template-columns: 1fr; align-items: start; }
}

.h-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.h-kicker img { width: auto; height: 16px; }

.h-subtitle {
  margin: 16px 0 0;
  font-family: var(--font-serif);
  font-weight: 370;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.016em;
  text-wrap: balance;
}

.h-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 60%, transparent);
  animation: h-pulse 2.4s ease-out infinite;
}
@keyframes h-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

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

.home .hero { isolation: isolate; padding-bottom: 0; }
/* Fine survey grid behind the headline, fading out radially. */
.home .hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 820px;
  z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 10%, transparent 75%);
  pointer-events: none;
}

.home .hero-switch { border-color: var(--line); background: var(--paper-tint); }
.home .hero-switch__opt { font-weight: 500; }

/* The stage — the app sits on a sandstone panel ruled like survey paper,
   lit faintly teal from one corner. */
.h-stage {
  position: relative;
  padding: clamp(14px, 3.4vw, 44px) clamp(10px, 3.4vw, 50px) clamp(18px, 4vw, 56px);
  border-radius: clamp(16px, 2.4vw, 28px);
  background:
    radial-gradient(ellipse 55% 60% at 12% 0%, color-mix(in srgb, var(--teal) 13%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 55% at 95% 100%, color-mix(in srgb, var(--vic-blue) 8%, transparent), transparent 70%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper-tint);
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 40px 100px -50px rgba(20, 20, 19, 0.25);
}
.h-stage__cap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto clamp(12px, 2vw, 22px);
  max-width: 1060px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.h-stage__cap span { display: inline-flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-stage__cap span:first-child { color: var(--ink-2); }
@media (max-width: 680px) {
  .h-stage__cap span:last-child { display: none; }
}

/* Proof band — the numbers, set large. */
.h-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.h-proof__item {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 26px 24px 28px;
  border-left: 1px solid var(--line-soft);
}
.h-proof__item:first-child { border-left: 0; padding-left: 0; }
.h-proof dd {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(44px, 5.4vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.h-proof dd small { font-size: 0.5em; margin-left: 2px; color: var(--ink-3); letter-spacing: 0; }
.h-proof dt {
  max-width: 24ch;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
@media (max-width: 860px) {
  .h-proof { grid-template-columns: 1fr 1fr; }
  .h-proof__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .h-proof__item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 480px) {
  .h-proof__item { padding: 20px 14px 22px; }
}

.h-works {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 34px;
  padding: 22px 0 clamp(48px, 6vw, 72px);
}
.h-works__lbl {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.h-works__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.h-works__item img { width: auto; height: 18px; }
.h-works__item svg { color: var(--teal); }

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

.home .marquee { background: var(--paper-tint); border-top-color: var(--line); }
.home .marquee__label {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  background: var(--paper-tint);
  border-right-color: var(--line);
}
.home .marquee__track span { font-family: var(--font-serif); font-size: 15px; color: var(--ink); }
.home .marquee__track i { color: var(--teal); }

/* ---------- 01 · How it works — three typographic cells ----------
   No mock graphics: a large serif numeral, a progress rule that fills to
   the step's position, then the heading and copy. */

.h-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.h-steps .step {
  display: block;
  padding: 0;
  border-top: 0;
  border-left: 1px solid var(--line-soft);
}
.h-steps .step:first-child { border-left: 0; }
.h-steps .step__text { padding: clamp(28px, 3.4vw, 44px) clamp(22px, 2.8vw, 36px) clamp(32px, 4vw, 48px); }
.h-steps .step:first-child .step__text { padding-left: 0; }
.h-steps .step__num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(64px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.h-steps .step__num::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(90deg, var(--teal) var(--fill), var(--line) var(--fill));
}
.h-steps .step:nth-child(1) { --fill: 33.3%; }
.h-steps .step:nth-child(2) { --fill: 66.6%; }
.h-steps .step:nth-child(3) { --fill: 100%; }
.h-steps .step__text h3 {
  margin-top: 26px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.012em;
}
.h-steps .step__text p { font-size: 15px; }
@media (max-width: 960px) {
  .h-steps { grid-template-columns: 1fr; }
  .h-steps .step { border-left: 0; border-top: 1px solid var(--line-soft); }
  .h-steps .step:first-child { border-top: 0; }
  .h-steps .step__text { padding-left: 0; padding-right: 0; }
}

/* ---------- 02 · Coverage — one frame, two columns ---------- */

.h-states {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.h-states .state-card {
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.h-states .state-card:hover { transform: none; }
.h-states .state-card + .state-card { border-left: 1px solid var(--line-soft); }
.h-glyph {
  position: absolute;
  top: -0.2em;
  right: -0.06em;
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(120px, 15vw, 210px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  user-select: none;
}
.h-states .state-card__head,
.h-states .state-card__sub { position: relative; }
.h-states .state-card__sub { max-width: 46ch; }
.h-states .state-card__head { margin-top: clamp(40px, 6vw, 90px); }
.h-states .state-card h3 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 380; letter-spacing: -0.012em; }
.h-states .state-card__list { margin-top: 22px; border-top: 1px solid var(--line-soft); }
.h-states .state-card__list li { padding-top: 13px; padding-bottom: 13px; }
.h-states .state-card__list li::before { top: 19px; }
@media (max-width: 820px) {
  .h-states .state-card + .state-card { border-left: 0; border-top: 1px solid var(--line-soft); }
  .h-glyph { font-size: 96px; opacity: 0.7; }
  .h-states .state-card__head { margin-top: 64px; }
}

/* Second split inside a section, ruled off from the first. */
.h-split-gap {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--line-soft);
}

/* ---------- Bespoke report drawing ----------
   Inline SVG; text takes the page fonts. The cover and content page start
   stacked and fan apart when the column scrolls in. */
.h-report { display: block; width: 100%; height: auto; overflow: visible; }
.h-report text { font-family: var(--font-sans); }
.h-report .hr-cap  { font-size: 4.6px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.h-report .hr-num  { font-size: 6px; font-weight: 600; letter-spacing: 1.2px; }
.h-report .hr-h    { font-family: var(--font-serif); font-size: 14px; font-weight: 500; }
.h-report .hr-v    { font-family: var(--font-serif); font-size: 8.5px; font-weight: 500; }
.h-report .hr-t    { font-size: 6.4px; font-weight: 600; }
.h-report .hr-s    { font-size: 5px; }
.h-report .hr-mono { font-family: var(--font-serif); font-size: 11px; }
.h-report .hr-firm { font-size: 9.5px; font-weight: 600; letter-spacing: 3.6px; text-transform: uppercase; }
.h-report .hr-sub  { font-size: 4.6px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; }
.h-report .hr-kick { font-size: 5.6px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; }
.h-report .hr-addr { font-family: var(--font-serif); font-size: 18px; letter-spacing: 1px; text-transform: uppercase; }
.h-report .hr-ml   { font-size: 4.4px; font-weight: 600; letter-spacing: 1.3px; text-transform: uppercase; }
.h-report .hr-mv   { font-family: var(--font-serif); font-size: 8.5px; font-weight: 500; }
.h-report .hr-tl   { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; }
.h-report .hr-sw   { font-size: 12px; font-weight: 500; }
.h-report .hr-font { font-family: var(--font-serif); font-size: 15px; }
.h-report .hr-fb   { font-size: 13.5px; font-weight: 500; }
.h-report .hr-fl   { font-size: 9.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

.h-report__back,
.h-report__front,
.h-report__theme {
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: transform 1.1s var(--ease), opacity 0.8s var(--ease);
}
.reveal:not(.is-in) .h-report__back  { transform: translate(-90px, 14px) rotate(-6deg); }
.reveal:not(.is-in) .h-report__front { transform: translate(30px, 0); }
.reveal:not(.is-in) .h-report__theme { transform: translateY(16px); opacity: 0; }
.reveal.is-in .h-report__theme { transition-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) {
  .h-report__back, .h-report__front, .h-report__theme { transition: none; transform: none !important; opacity: 1 !important; }
}

/* ---------- 04 · What's inside — joined hairline cells ---------- */

.home #inside .grid {
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line-soft);
  overflow: hidden;
}
.home #inside .card {
  border: 0;
  border-radius: 0;
  background: var(--paper);
  transition: background-color 0.3s ease;
}
.home #inside .card:hover { transform: none; background: var(--surface); }
.home #inside .card h3 { font-size: 23px; font-weight: 400; letter-spacing: -0.01em; }
.home #inside .card__visual--plan {
  border-radius: 0;
  background: color-mix(in srgb, var(--teal) 5%, var(--paper));
}

/* ---------- 05 · Integrations ---------- */

.home #integrations .ledger,
.home #integrations .docx-mock { box-shadow: var(--shadow-frame); }

/* ---------- 06 · Pricing ---------- */

.home .tier { border-radius: 18px; border-color: var(--line); }
.home .tier--featured {
  border: 1px solid var(--ink);
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, color-mix(in srgb, var(--teal) 9%, transparent), transparent 70%),
    var(--surface);
  box-shadow: 0 30px 70px -36px rgba(20, 20, 19, 0.35);
}
.home .tier__tag { background: var(--teal); color: #fff; }
.home .tier__name { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.1em; }
.home .tier__price em { font-weight: 320; font-size: 52px; letter-spacing: -0.03em; }

/* ---------- 07 · Security ---------- */

.h-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 clamp(48px, 6vw, 72px);
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.h-flow li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 28px 0 0;
  border-top: 1px solid var(--line);
}
.h-flow li::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--paper);
}
.h-flow li:nth-child(3)::before { background: var(--ink); }
.h-flow__n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.h-flow b { font-family: var(--font-serif); font-weight: 400; font-size: 22px; letter-spacing: -0.01em; }
.h-flow span:last-child { font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 30ch; }
@media (max-width: 860px) {
  .h-flow { grid-template-columns: 1fr 1fr; row-gap: 36px; }
}
@media (max-width: 480px) {
  .h-flow { grid-template-columns: 1fr; }
}
.h-trust .trustlist { grid-template-columns: repeat(4, 1fr); }
.h-trust .trustlist__item h4 { font-weight: 500; }
@media (max-width: 960px) {
  .h-trust .trustlist { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .h-trust .trustlist { grid-template-columns: 1fr; }
}

/* ---------- 08 · FAQ — heading left, answers right ---------- */

.h-faq {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.h-faq .h-head { position: sticky; top: calc(var(--nav-h) + 32px); margin: 0; }
.h-faq .section__lede { font-size: 16px; }
.h-faq .section__lede a { color: var(--ink); text-underline-offset: 3px; }
.h-faq .faq { border-top-color: var(--line); }
.h-faq .faq summary { padding: 24px 2px; font-weight: 500; font-size: 17px; }
@media (max-width: 860px) {
  .h-faq { grid-template-columns: 1fr; }
  .h-faq .h-head { position: static; }
}

/* ---------- CTA ---------- */

.h-cta {
  padding: clamp(72px, 10vw, 140px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--line-soft);
  border-radius: clamp(18px, 2.4vw, 28px);
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 70%),
    var(--paper-tint);
}
.h-cta::before { left: 20%; right: 20%; }
.h-cta h2 { font-weight: 330; font-size: clamp(38px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -0.025em; }

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

.home .footer {
  padding-bottom: 0;
  border-top: 0;
  background: var(--night);
  overflow: hidden;
}
.home .footer__ai-links a { background: rgba(243, 242, 238, 0.92); border-color: transparent; }
.h-wordmark {
  margin-top: clamp(28px, 4vw, 48px);
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(120px, 27vw, 400px);
  line-height: 0.74;
  letter-spacing: -0.05em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(243, 242, 238, 0.16), rgba(243, 242, 238, 0) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .h-dot { animation: none; }
}
