
/* Three-One-Four components. Every value comes from tokens.css; classes are prefixed tof-. */
body { margin: 0; font-family: var(--font-sans); background: var(--surface); color: var(--ink); -webkit-font-smoothing: antialiased; }
.tof-pad { padding: var(--space-6); }
.tof-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.tof-h { margin: 0; font-size: 60px; line-height: 62px; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
.tof-t { margin: 0; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.tof-lead { margin: 0; font-size: 21px; line-height: 30px; letter-spacing: -0.01em; color: var(--ink-muted); max-width: 40ch; }
.tof-data { font: 500 12px/16px var(--font-mono); }
img { display: block; max-width: 100%; }

/* Arrow glyph: ends every button and CTA */
.tof-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Focus, everywhere */
:where(a, button, input, select, textarea, summary):focus-visible { outline: var(--stroke-plane) solid var(--focus-ring); outline-offset: 3px; }

/* Button: a pill with a round arrow badge */
.tof-btn { display: inline-flex; align-items: center; gap: var(--space-3); height: 52px; padding: 0 6px 0 var(--space-6); border: 0; border-radius: var(--radius-pill); background: var(--cobalt); color: var(--on-cobalt); font: 500 15px/1 var(--font-sans); letter-spacing: -0.01em; text-decoration: none; cursor: pointer; }
.tof-btn__badge { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--night); color: var(--on-night); transition: transform .2s ease; }
.tof-btn:hover .tof-btn__badge { transform: translateX(3px); }
.tof-btn--soft { background: var(--cobalt-tint); color: var(--ink); }
.tof-btn--soft .tof-btn__badge { background: var(--cobalt); color: var(--on-cobalt); }
.tof-btn--night { background: var(--periwinkle); color: var(--on-periwinkle); }
.tof-btn--night .tof-btn__badge { background: var(--night); color: var(--periwinkle); }
.tof-btn--sm { height: 40px; font-size: 14px; padding-left: var(--space-4); }
.tof-btn--sm .tof-btn__badge { width: 30px; height: 30px; }

/* Tag and media label */
.tof-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--cobalt-tint); color: var(--ink); font: 500 13px/1 var(--font-sans); }
.tof-tag--outline { background: none; box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); }
.tof-tag--night { background: var(--night-raised); color: var(--periwinkle); }
.tof-label { position: absolute; z-index: 2; left: var(--space-3); top: var(--space-3); padding: 6px 10px; border-radius: var(--radius-pill); background: var(--night); color: var(--on-night); font: 500 12px/1 var(--font-mono); }
.tof-label--out { background: var(--cobalt); color: var(--on-cobalt); }

/* Media frame: every image and loop sits in one */
.tof-frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-alt); }
.tof-frame > img, .tof-frame > video { width: 100%; height: 100%; object-fit: cover; }

/* Nav */
.tof-nav { display: flex; align-items: center; gap: var(--space-8); height: 72px; padding: 0 var(--space-6); border-bottom: var(--stroke-hairline) solid var(--line); }
.tof-nav__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 18px/1 var(--font-sans); letter-spacing: -0.03em; }
.tof-nav__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-md); background: var(--cobalt); color: var(--on-cobalt); font: 500 11px/1 var(--font-mono); letter-spacing: -0.04em; }
.tof-nav__links { display: flex; gap: var(--space-6); margin-left: auto; }
.tof-nav__links a { color: var(--ink); text-decoration: none; font: 500 15px/1 var(--font-sans); }
.tof-nav__links a:hover { color: var(--accent); }

/* Hero carousel: fixed headline, sliding subheadline and media */
.tof-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--space-12); align-items: center; padding: var(--space-12) var(--space-6); }
.tof-hero__title { margin: 0; font-size: clamp(56px, 8vw, 104px); line-height: .94; font-weight: 600; letter-spacing: -0.045em; text-wrap: balance; }
.tof-hero__sub { margin: var(--space-6) 0 var(--space-8); min-height: 3lh; font-size: 21px; line-height: 30px; letter-spacing: -0.01em; color: var(--ink-muted); max-width: 32ch; }
.tof-hero__media { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius-xl); overflow: hidden; background: var(--surface-alt); }
.tof-hero__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s ease, transform 1.2s ease; transform: scale(1.04); }
.tof-hero__slide.is-on { opacity: 1; transform: none; }
.tof-hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.tof-hero__dots { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: calc(var(--space-6) * -1); }
.tof-hero__dots button { display: grid; gap: 8px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink-muted); font: 500 12px/16px var(--font-mono); }
.tof-hero__dots button[aria-current="true"] { color: var(--ink); }
.tof-hero__dots i { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.tof-hero__dots i::after { content: ""; display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.tof-hero__dots button[aria-current="true"] i::after { transform: scaleX(var(--p, 0)); }

/* Before and after slider */
.tof-ba { --pos: 50%; position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-alt); user-select: none; }
.tof-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tof-ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.tof-ba .tof-label { left: auto; right: var(--space-3); }
.tof-ba .tof-label:first-of-type { left: var(--space-3); right: auto; }
.tof-ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--on-cobalt); pointer-events: none; }
.tof-ba__handle span { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: var(--radius-pill); background: var(--cobalt); color: var(--on-cobalt); box-shadow: 0 0 0 4px color-mix(in srgb, var(--on-cobalt) 40%, transparent); }
.tof-ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.tof-ba:has(input:focus-visible) .tof-ba__handle span { outline: var(--stroke-plane) solid var(--focus-ring); outline-offset: 3px; }

/* Variant switcher: one camera, many variants */
.tof-variants__stage { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-alt); }
.tof-variants__stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.tof-variants__stage img.is-on { opacity: 1; }
.tof-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.tof-chip { height: 40px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: none; box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); color: var(--ink); font: 500 14px/1 var(--font-sans); cursor: pointer; }
.tof-chip[aria-pressed="true"], .tof-chip:has(input:checked) { background: var(--ink); color: var(--surface); box-shadow: none; }
.tof-chip input { position: absolute; opacity: 0; pointer-events: none; }
label.tof-chip { display: inline-flex; align-items: center; position: relative; }
label.tof-chip:has(input:focus-visible) { outline: var(--stroke-plane) solid var(--focus-ring); outline-offset: 3px; }

/* Scrolling bar: who it's for */
.tof-marquee { overflow: hidden; padding: var(--space-6) 0; border-block: var(--stroke-hairline) solid var(--line-strong); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tof-marquee__track { display: flex; gap: var(--space-8); width: max-content; animation: tof-marquee 40s linear infinite; }
.tof-marquee:hover .tof-marquee__track { animation-play-state: paused; }
.tof-marquee__track span { display: inline-flex; align-items: center; gap: var(--space-8); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.tof-marquee__track span::after { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--accent); }
@keyframes tof-marquee { to { transform: translateX(-50%); } }

/* Stats band */
.tof-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); padding: var(--space-12) var(--space-6); background: var(--surface-alt); }
.tof-stats b { display: block; font-size: 88px; line-height: 88px; font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.tof-stats i { display: block; width: 32px; height: 3px; margin: var(--space-4) 0 var(--space-3); border-radius: 2px; background: var(--accent); }
.tof-stats p { margin: 0; font-size: 15px; line-height: 22px; max-width: 30ch; }
.tof-stats a { display: inline-block; margin-top: var(--space-3); font: 500 12px/16px var(--font-mono); color: var(--accent); }

/* Demo loop section: heading and one line beside an autoplaying loop */
.tof-demo { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-12); align-items: center; padding: var(--space-12) var(--space-6); }
.tof-demo p { margin: var(--space-4) 0 0; font-size: 17px; line-height: 26px; color: var(--ink-muted); max-width: 34ch; }
.tof-demo__loop { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-xl); overflow: hidden; background: var(--night); }
.tof-fan { position: absolute; inset: var(--space-4); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: var(--space-2); }
.tof-fan img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); animation: tof-fan 7s cubic-bezier(.6,.1,.3,1) infinite; animation-delay: calc(var(--i) * .12s); }
@keyframes tof-fan { 0%, 12% { opacity: 0; transform: scale(.6); } 26%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.96); } }

/* Case study cards and modal */
.tof-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.tof-case { display: flex; flex-direction: column; gap: var(--space-4); padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.tof-case .tof-frame { aspect-ratio: 4 / 3; }
.tof-case .tof-frame img { transition: transform .5s ease; }
.tof-case:hover .tof-frame img { transform: scale(1.04); }
.tof-case__meta { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.tof-case__meta b { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.025em; }
.tof-case__meta span { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); color: var(--accent); }
.tof-case p { margin: 0; font-size: 14px; line-height: 21px; color: var(--ink-muted); }
.tof-modal { width: min(1100px, 100%); padding: var(--space-8); border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); box-sizing: border-box; }
.tof-modal__head { display: flex; justify-content: space-between; align-items: start; gap: var(--space-6); margin-bottom: var(--space-6); }
.tof-modal__head p { margin: var(--space-2) 0 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.tof-modal__close { flex: none; width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill); background: var(--surface-alt); color: var(--ink); font-size: 22px; cursor: pointer; }
.tof-modal__strip { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: var(--space-3); }
.tof-modal__strip figure { margin: 0; }
.tof-modal__strip .tof-frame { aspect-ratio: 3 / 4; }
.tof-modal__strip figcaption { margin-top: var(--space-2); font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.tof-modal__strip .tof-arrowcell { display: grid; place-items: center; color: var(--accent); }

/* Pain point cards: problem, then our solution */
.tof-pains { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.tof-pain { display: flex; flex-direction: column; gap: var(--space-6); padding: var(--space-6); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); }
.tof-pain p { margin: 0; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.tof-pain b { margin-top: auto; padding-top: var(--space-4); border-top: var(--stroke-hairline) solid var(--line); font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.02em; }

/* How we work: four connected steps */
.tof-how { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.tof-how::before { content: ""; position: absolute; left: 28px; right: 28px; top: 28px; border-top: var(--stroke-rule) dashed var(--line-strong); }
.tof-how li { position: relative; list-style: none; }
.tof-how__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--surface); box-shadow: inset 0 0 0 var(--stroke-rule) var(--line-strong); color: var(--accent); }
.tof-how small { display: block; margin-top: var(--space-4); font: 500 12px/16px var(--font-mono); color: var(--ink-muted); }
.tof-how b { display: block; margin-top: var(--space-1); font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.02em; }

/* Built for your business: systems flowing into the tool */
.tof-built { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--space-12); align-items: center; }
.tof-built p { margin: var(--space-4) 0 0; font-size: 17px; line-height: 26px; color: var(--ink-muted); max-width: 34ch; }
.tof-flow { width: 100%; height: auto; overflow: visible; }
.tof-flow .src rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: var(--stroke-hairline); }
.tof-flow .src text, .tof-flow .dst text { font: 500 14px var(--font-sans); }
.tof-flow .src text { fill: var(--ink); }
.tof-flow .dst rect { fill: var(--cobalt); }
.tof-flow .dst text { fill: var(--on-cobalt); }
.tof-flow .wire { fill: none; stroke: var(--accent); stroke-width: var(--stroke-rule); stroke-dasharray: 4 8; animation: tof-flow 1.2s linear infinite; }
@keyframes tof-flow { to { stroke-dashoffset: -12; } }

/* Two channels: kiosk and phone */
.tof-channels { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: end; }
.tof-kiosk { padding: 14px; border-radius: var(--radius-xl); background: var(--night); }
.tof-kiosk .tof-frame { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }
.tof-phone { width: 168px; padding: 8px; border-radius: 30px; background: var(--night); }
.tof-phone .tof-frame { aspect-ratio: 9 / 18; border-radius: 22px; }
.tof-steps-inline { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); font: 500 15px/1 var(--font-sans); }
.tof-steps-inline span { padding: 10px 16px; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); }
.tof-steps-inline span:last-child { background: var(--cobalt); color: var(--on-cobalt); box-shadow: none; }
.tof-steps-inline svg { color: var(--accent); }

/* Call to action and form */
.tof-ctaform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; padding: var(--space-12); border-radius: var(--radius-xl); background: var(--cobalt); color: var(--on-cobalt); }
.tof-ctaform h2 { margin: 0; font-size: clamp(48px, 6vw, 80px); line-height: .96; font-weight: 600; letter-spacing: -0.045em; text-wrap: balance; }
.tof-form { display: grid; gap: var(--space-6); padding: var(--space-8); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); }
.tof-form fieldset { margin: 0; padding: 0; border: 0; }
.tof-form legend, .tof-form label.tof-field { display: block; margin-bottom: var(--space-3); font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; }
.tof-form .tof-chips { margin-top: 0; }
.tof-input { width: 100%; height: 48px; margin-top: var(--space-2); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-sm); background: var(--surface-alt); box-shadow: inset 0 0 0 var(--stroke-hairline) var(--line-strong); color: var(--ink); font: 400 15px var(--font-sans); box-sizing: border-box; }

/* Segment cards (hub) */
.tof-segments { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.tof-segment { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; padding: var(--space-6); border-radius: var(--radius-lg); overflow: hidden; color: var(--on-night); text-decoration: none; background: var(--night); }
.tof-segment img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .6s ease, opacity .3s ease; }
.tof-segment::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--night)); }
.tof-segment > :not(img) { position: relative; z-index: 1; }
.tof-segment:hover img { transform: scale(1.05); opacity: .75; }
.tof-segment small { font: 500 12px/16px var(--font-mono); color: var(--periwinkle); }
.tof-segment b { margin-top: var(--space-2); font-size: 26px; line-height: 30px; font-weight: 600; letter-spacing: -0.03em; }

/* Layer stack: the exploded-layers signature */
.tof-layers { position: relative; height: 320px; perspective: 1600px; perspective-origin: 50% 30%; }
.tof-layers__rig { position: absolute; left: 50%; top: 56%; transform-style: preserve-3d; transform: rotateX(56deg) rotateZ(-34deg); }
.tof-layers__plane { position: absolute; width: 180px; height: 240px; left: -90px; top: -120px; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 var(--stroke-plane) var(--line-strong); background: color-mix(in srgb, var(--surface) 70%, transparent); transform: translateZ(calc(var(--i) * var(--gap, 56px))); animation: tof-breathe 5s ease-in-out infinite; }
.tof-layers__plane:first-child { background: var(--cobalt); box-shadow: none; }
.tof-layers__plane:nth-child(2) { box-shadow: inset 0 0 0 var(--stroke-plane) var(--accent); }
.tof-layers__plane span { position: absolute; left: calc(100% + 14px); top: 0; white-space: nowrap; font: 500 13px/1 var(--font-mono); color: var(--ink-muted); }
@keyframes tof-breathe { 50% { transform: translateZ(calc(var(--i) * var(--gap, 56px) * 0.55)); } }

/* Line grid and line draw */
.tof-grid { position: relative; height: 220px; overflow: hidden; perspective: 600px; }
.tof-grid__floor { position: absolute; left: -50%; right: -50%; bottom: -30%; height: 200%; transform: rotateX(62deg); transform-origin: 50% 100%;
  background-image: linear-gradient(var(--line-strong) var(--stroke-hairline), transparent var(--stroke-hairline)), linear-gradient(90deg, var(--line-strong) var(--stroke-hairline), transparent var(--stroke-hairline));
  background-size: 48px 48px; animation: tof-drift 4s linear infinite; }
.tof-grid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--surface), transparent 45%); }
@keyframes tof-drift { to { background-position: 0 48px, 0 48px; } }
.tof-draw path, .tof-draw rect, .tof-draw circle { fill: none; stroke: var(--accent); stroke-width: var(--stroke-rule); stroke-dasharray: 1; stroke-dashoffset: 1; animation: tof-draw 1.6s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes tof-draw { to { stroke-dashoffset: 0; } }

/* Phones */
@media (max-width: 760px) {
  .tof-hero, .tof-demo, .tof-built, .tof-ctaform, .tof-channels { grid-template-columns: 1fr; gap: var(--space-8); }
  .tof-hero__dots { grid-column: 1; margin-top: 0; }
  .tof-stats, .tof-cases, .tof-how { grid-template-columns: 1fr; }
  .tof-how::before { display: none; }
  .tof-segments { grid-template-columns: 1fr 1fr; }
  .tof-h { font-size: 40px; line-height: 42px; }
  .tof-stats b { font-size: 64px; line-height: 64px; }
  .tof-ctaform { padding: var(--space-6); }
}

@media (prefers-reduced-motion: reduce) {
  .tof-btn__badge, .tof-hero__slide, .tof-case .tof-frame img, .tof-segment img, .tof-variants__stage img { transition: none; }
  .tof-marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .tof-fan img, .tof-layers__plane, .tof-grid__floor, .tof-flow .wire { animation: none; }
  .tof-draw path, .tof-draw rect, .tof-draw circle { animation: none; stroke-dashoffset: 0; }
}
