/* AutoVal LLC — site styles. Plain CSS, no build step.
   Identity: monochrome bone and ink, Instrument Serif display, Inter text, hairline rules. */

:root {
  --bone: #F3F0EA;
  --paper: #FAF8F4;
  --ink: #121211;
  --ink-2: #3B3A37;
  --stone: #8B867E;
  --hair: rgba(18, 18, 17, 0.12);
  --night: #0E0E0D;
  --on-night: rgba(250, 248, 244, 0.7);
  --on-night-faint: rgba(250, 248, 244, 0.42);
  --hair-night: rgba(250, 248, 244, 0.12);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Cross-document page transitions (Chrome, Edge, Safari 18.2+; ignored elsewhere) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 380ms var(--ease-in-out) both; }
::view-transition-new(root) { animation: vt-in 620ms var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 400; line-height: 1.65;
  color: var(--ink); background: var(--bone);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--bone); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
p { margin: 0 0 1.1em; }

.skip-link { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--bone); padding: 8px 14px; z-index: 200; }
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
.display { font-size: clamp(3.1rem, 8.4vw, 8.2rem); line-height: 0.94; letter-spacing: -0.025em; }
.h-xl { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: 0.98; }
.h-lg { font-size: clamp(2.1rem, 3.8vw, 3.4rem); line-height: 1.02; }
em { font-style: italic; }
.label {
  display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone);
}
.body-lg { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.6; color: var(--ink-2); max-width: 46ch; }

/* Line-by-line headline rise (pure CSS, runs on load) */
.line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line > span { display: inline-block; transform: translateY(110%); animation: rise 1.25s var(--ease) forwards; }
.line:nth-child(2) > span { animation-delay: 0.09s; }
.line:nth-child(3) > span { animation-delay: 0.18s; }
.line:nth-child(4) > span { animation-delay: 0.27s; }
@keyframes rise { to { transform: none; } }
.fade-in { opacity: 0; animation: fade 1.2s var(--ease) 0.45s forwards; }
.fade-in.d2 { animation-delay: 0.65s; }
.fade-in.d3 { animation-delay: 0.85s; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Links and buttons ---------- */
.link { position: relative; display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.95rem; padding-bottom: 4px; }
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0.28); transform-origin: left; transition: transform 700ms var(--ease);
}
.link:hover::after { transform: scaleX(1); }
.arr, .arr-up { display: inline-block; transition: transform 600ms var(--ease); }
.link:hover .arr, .btn:hover .arr { transform: translateX(5px); }
.link:hover .arr-up { transform: translate(3px, -3px); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--hair); transition: text-decoration-color 300ms ease; }
.prose a:hover { text-decoration-color: currentColor; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px;
  background: var(--ink); color: var(--bone); font-weight: 500; font-size: 0.92rem; letter-spacing: 0.01em;
  transition: transform 500ms var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.app-store-badge { display: inline-block; line-height: 0; transition: transform 500ms var(--ease); }
.app-store-badge:hover { transform: translateY(-2px); }
.app-store-badge img { height: 46px; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(243, 240, 234, 0.82);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent; transition: border-color 400ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--hair); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.wordmark { font-family: var(--serif); font-size: 1.65rem; letter-spacing: -0.02em; line-height: 1; display: inline-flex; align-items: baseline; gap: 8px; }
.wordmark small { font-family: var(--sans); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.22em; color: var(--stone); }
.site-nav { display: flex; gap: 34px; }
.site-nav a { position: relative; font-size: 0.88rem; font-weight: 500; color: var(--ink-2); padding: 4px 0; transition: color 300ms ease; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 600ms var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 11vh, 132px) 0 clamp(64px, 9vh, 110px); }
.hero-top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: clamp(40px, 7vh, 80px); }
.hero-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: clamp(48px, 8vh, 96px); align-items: end; }
.hero-foot .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; justify-content: flex-end; }

/* ---------- Facts row ---------- */
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); }
.facts-row > div { padding: 26px 28px 0 0; }
.facts-row > div + div { padding-left: 28px; border-left: 1px solid var(--hair); }
.facts-row strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vh, 168px) 0; }
.section-paper { background: var(--paper); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: clamp(48px, 8vh, 88px); }
.section-head .label { margin-bottom: 22px; }
.section-head .body-lg { justify-self: end; margin: 0; }

/* ---------- Night feature (CurbScope) ---------- */
.night { background: var(--night); color: var(--paper); }
.night .label { color: var(--on-night-faint); }
.night .body-lg, .night p { color: var(--on-night); }
.feature { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(48px, 7vw, 120px); align-items: center; }
.product-id { display: inline-flex; align-items: center; gap: 14px; margin: 30px 0 34px; }
.product-id img { width: 44px; height: 44px; border-radius: 11px; }
.product-id span { font-size: 0.92rem; font-weight: 500; color: var(--paper); }
.spec { list-style: none; margin: 44px 0; padding: 0; border-top: 1px solid var(--hair-night); }
.spec li { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--hair-night); font-size: 0.95rem; }
.spec li span:first-child { color: var(--paper); }
.spec li span:last-child { color: var(--on-night-faint); }
.device {
  justify-self: center; width: min(320px, 78%); border-radius: 46px; padding: 8px; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 60px 120px -40px rgba(0, 0, 0, 0.9);
}
.device img { border-radius: 38px; }
.night .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }

/* ---------- Index (product list) ---------- */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.index li { border-bottom: 1px solid var(--hair); }
.index-row {
  display: grid; grid-template-columns: 80px 1.1fr 1.4fr 180px; gap: 32px; align-items: baseline;
  padding: 38px 0; transition: padding 700ms var(--ease);
}
a.index-row:hover { padding-left: 18px; }
.index-row .num { font-size: 0.8rem; color: var(--stone); font-variant-numeric: tabular-nums; }
.index-row h3 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1; }
.index-row p { margin: 0; color: var(--ink-2); max-width: 48ch; }
.status { justify-self: end; display: inline-flex; align-items: center; gap: 10px; font-size: 0.82rem; font-weight: 500; color: var(--stone); white-space: nowrap; }
.status .arr-up { color: var(--ink); }
a.index-row:hover .status .arr-up { transform: translate(4px, -4px); }
.status.live { color: var(--ink); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.live .dot { background: #2F7D5B; }

/* ---------- Founder ---------- */
.founder { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(48px, 8vw, 140px); align-items: center; }
.portrait { margin: 0; }
.portrait .frame { overflow: hidden; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.portrait figcaption { margin-top: 16px; font-size: 0.8rem; color: var(--stone); }
.founder .h-xl { margin: 22px 0 30px; }
.founder .body-lg { margin-bottom: 40px; }

/* ---------- Contact band ---------- */
.contact-band { padding: clamp(96px, 16vh, 180px) 0; border-top: 1px solid var(--hair); }
.mail-xl {
  display: inline-block; font-family: var(--serif); font-size: clamp(2.1rem, 7.2vw, 6.8rem); line-height: 1.05; letter-spacing: -0.025em;
  position: relative; margin-top: 26px; word-break: break-word;
}
.mail-xl::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease); }
.mail-xl:hover::after { transform: scaleX(1); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(64px, 11vh, 132px) 0 clamp(56px, 8vh, 96px); border-bottom: 1px solid var(--hair); }
.page-hero .display { margin-top: 26px; font-size: clamp(3rem, 7.4vw, 7rem); }
.page-hero .body-lg { margin: 36px 0 0; }

/* ---------- About ---------- */
.bio { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(48px, 8vw, 140px); align-items: start; }
.bio-aside { position: sticky; top: 112px; }
.bio-text { max-width: 62ch; }
.bio-text .lede { font-family: var(--serif); font-size: clamp(1.6rem, 2.5vw, 2.15rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.bio-text h2 { font-size: 0.72rem; font-family: var(--sans); font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--stone); padding-top: 22px; border-top: 1px solid var(--hair); margin: 60px 0 22px; }
.bio-text p { color: var(--ink-2); font-size: 1.04rem; }
.dl { margin: 72px 0 0; border-top: 1px solid var(--hair); }
.dl div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.dl dt { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone); padding-top: 3px; }
.dl dd { margin: 0; color: var(--ink); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hair); margin-top: clamp(64px, 10vh, 120px); }
.contact-grid > div { padding: 30px 32px 0 0; }
.contact-grid > div + div { padding-left: 32px; border-left: 1px solid var(--hair); }
.contact-grid p { color: var(--ink-2); margin: 12px 0 18px; max-width: 34ch; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hair); padding: 44px 0 40px; font-size: 0.84rem; color: var(--stone); }
.footer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap; }
.footer-row nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-row nav a { color: var(--ink-2); transition: color 300ms ease; }
.footer-row nav a:hover { color: var(--ink); }

/* ---------- Scroll reveals (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.1s; }
.js .reveal.d2 { transition-delay: 0.2s; }
.js .reveal-img img { clip-path: inset(100% 0 0 0); transform: scale(1.08); transition: clip-path 1.5s var(--ease), transform 2s var(--ease); }
.js .reveal-img.is-in img { clip-path: inset(0 0 0 0); transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-foot, .section-head, .feature, .founder, .bio { grid-template-columns: 1fr; }
  .hero-foot .actions { justify-content: flex-start; }
  .section-head .body-lg { justify-self: start; }
  .bio-aside { position: static; max-width: 440px; }
  .founder .portrait { max-width: 480px; }
  .index-row { grid-template-columns: 56px 1fr auto; }
  .index-row p { grid-column: 2 / -1; grid-row: 2; }
  .index-row .status { grid-column: 3; grid-row: 1; }
}
@media (max-width: 680px) {
  .nav-row { height: 64px; }
  .site-nav { gap: 20px; }
  .site-nav a { font-size: 0.84rem; }
  .wordmark { font-size: 1.4rem; }
  .wordmark small { display: none; }
  .hero-top span:last-child { display: none; }
  .facts-row, .contact-grid { grid-template-columns: 1fr; }
  .facts-row > div, .contact-grid > div { padding: 22px 0; }
  .facts-row > div + div, .contact-grid > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--hair); }
  .spec li, .dl div { grid-template-columns: 1fr; gap: 4px; }
  .index-row { grid-template-columns: 40px 1fr; gap: 6px 16px; padding: 30px 0; }
  .index-row p { grid-column: 2; grid-row: 2; }
  .index-row .status { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 10px; }
  a.index-row:hover { padding-left: 0; }
}
@media print { .js .reveal { opacity: 1; transform: none; } .js .reveal-img img { clip-path: none; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition: none !important; }
  .line > span, .fade-in { transform: none; opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal-img img { clip-path: none; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
