/* 1devtool.com homepage — page styles. Every color, size, space and radius
   comes from tokens.css / tokens-light.css (the brand's dark and Stoic Light
   ramps). The recipes (css/design-kit/) supply the nav, buttons, split, grid
   and footer; this file only composes them. Maps 1:1 onto Tailwind utilities
   through tokens.json's theme.extend when ported to Next.js. */

/* ---------- theme-aware assets ---------- */
/* specificity (0,2,0)+ on purpose: component rules like .shot img must never
   re-show a hidden variant */
:root .only-light { display: none; }
[data-theme="light"] .only-dark { display: none; }
[data-theme="light"] .only-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .only-dark { display: none; }
  :root:not([data-theme="dark"]) .only-light { display: block; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { color: var(--color-text); background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }

/* ---------- global tune: mono for labels, buttons and numbers ---------- */
.btn { font-family: var(--font-mono); font-weight: 700; border-radius: var(--radius-md); }
.btn-primary { box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-accent) 35%, transparent), 0 6px 24px color-mix(in oklab, var(--color-accent) 22%, transparent); }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-secondary { border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-muted); background: var(--color-surface); }
.btn svg { flex: none; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* "A · B · C" rows drawn with CSS separators, so the dots are layout, not copy */
.dots { display: inline; }
.dots > span { white-space: nowrap; }
.dots > span:not(:last-child)::after { content: "\00a0· "; white-space: normal; color: var(--color-muted); }  /* nbsp keeps the dot with its word; the plain space is the wrap point */

/* links that end in an arrow: the arrow is drawn, not typed, and the whole thing is a 44px target */
.arrow-link { display: inline-flex; align-items: center; min-height: 44px; gap: var(--space-1); font-family: var(--font-mono); font-size: var(--step-n1); font-weight: 600; color: var(--color-accent-text); text-decoration: none; }
.arrow-link::after { content: "→"; transition: transform var(--dur-fast) var(--ease); }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.arrow-link:hover::after, .arrow-link:focus-visible::after { transform: translateX(var(--space-1)); }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--color-bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.brand img { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.brand span { letter-spacing: -0.02em; }
.nav-links { gap: var(--space-6); }
.nav-links a { color: var(--color-muted); font-size: var(--step-0); min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--color-text); }
.nav-cta { white-space: nowrap; }
.nav-toggle-text { display: none; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); width: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--color-muted); cursor: pointer; transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.theme-toggle:hover, .theme-toggle:focus-visible { color: var(--color-text); border-color: var(--color-border); }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .moon { display: block; }
}
.theme-toggle-text { display: none; }
@media (max-width: 639px) {
  .container, .container-narrow { width: min(100% - 2 * var(--space-4), 1200px); }  /* 16px gutter on phones */
  .nav { gap: var(--space-2); }
  .nav[data-enhanced] .nav-toggle { padding-inline: var(--space-3); min-width: 44px; justify-content: center; }
  .nav[data-enhanced] .nav-links .theme-toggle { width: 100%; justify-content: flex-start; padding-inline: var(--space-3); border-radius: var(--radius-sm); }
  .nav[data-enhanced] .nav-links .theme-toggle-text { display: inline; font-family: var(--font-ui); font-weight: 500; font-size: var(--step-0); }
  .nav[data-enhanced] .nav-links a { color: var(--color-text); }
}

/* ---------- hero ---------- */
.hero { padding-block: var(--space-8) var(--space-7); text-align: center; }
.hero > * { margin-inline: auto; }
.eyebrow { font-family: var(--font-mono); font-size: var(--step-n1); font-weight: 500; color: var(--color-accent-text); text-wrap: balance; }
.hero h1 { margin-top: var(--space-4); font-size: clamp(var(--step-4), 2rem + 2.2vw, var(--step-6)); max-width: 18ch; }
.hero .lead { margin-top: var(--space-5); max-width: 52ch; }
.hero .cta-row { margin-top: var(--space-6); justify-content: center; }
.micro { margin-top: var(--space-4); max-width: none; font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); text-wrap: balance; }
.micro-sep { white-space: pre; }
@media (max-width: 639px) {
  .hero { padding-top: var(--space-6); }
  .hero .cta-row { margin-top: var(--space-5); }
  .micro-sep { display: none; }
  .micro .tier { display: block; }
}

/* framed screenshots: 1px hairline, 14px radius, soft shadow; the hero adds the one teal glow */
.shot { margin: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-deepest); box-shadow: var(--shadow-2); }
.shot img { width: 100%; height: auto; display: block; }
.shot-hero { margin-top: var(--space-8); box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-accent) 22%, transparent), 0 30px 90px color-mix(in oklab, var(--color-accent) 16%, transparent); }
@media (max-width: 639px) { .shot-hero { margin-top: var(--space-6); } }

.works { margin-top: var(--space-7); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3) var(--space-5); font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); }
.works-list { display: contents; }
.works-list li { display: inline-flex; align-items: center; gap: var(--space-2); list-style: none; color: var(--color-text); }
.works-list img { width: 20px; height: 20px; border-radius: var(--radius-sm); }
.works-any { color: var(--color-muted); }
@media (max-width: 639px) { .works { margin-top: var(--space-6); gap: var(--space-3) var(--space-4); } }

/* ---------- proof strip ---------- */
.proof { border-block: 1px solid var(--color-border); }
.proof-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: var(--space-5); padding-block: var(--space-6); list-style: none; margin-block: 0; }
.proof-row li { display: grid; gap: var(--space-1); align-content: start; min-width: 0; }
.proof-row strong { font-family: var(--font-mono); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.proof-statement strong { text-wrap: balance; }
.proof-row span { font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); }
@media (max-width: 639px) {
  .proof-row { grid-template-columns: 1fr; gap: 0; padding-block: var(--space-2); }
  .proof-row li { padding-block: var(--space-4); }
  .proof-row li + li { border-top: 1px solid var(--color-border); }
}

/* ---------- four flagship features ---------- */
.features { padding-block: var(--space-7); }
.feature { padding-block: var(--space-8); gap: var(--space-8); }
.feature + .feature { border-top: 1px solid var(--color-border); }
.feature-copy { display: grid; gap: var(--space-5); align-content: center; min-width: 0; }
.kicker { font-family: var(--font-mono); font-size: var(--step-n1); font-weight: 500; color: var(--color-accent-text); }
.feature h2 { font-size: clamp(var(--step-3), 1.5rem + 1.4vw, var(--step-5)); max-width: 16ch; }
.feature-lead { font-size: var(--step-1); max-width: 44ch; }
.proofs { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.proofs li { position: relative; padding-left: var(--space-5); max-width: 48ch; }
.proofs li::before { content: ""; position: absolute; left: 2px; top: 0.35em; width: 5px; height: 10px; border-right: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent); transform: rotate(45deg); }
.feature .arrow-link { justify-self: start; }
@media (min-width: 1024px) { .feature-phone.split { grid-template-columns: 1fr 1fr; } }
.phone { margin: 0; display: flex; align-items: flex-start; justify-content: center; gap: var(--space-5); }
/* the bezel is hardware, so it stays dark in both themes */
.phone-frame { width: min(260px, 46%); border: 6px solid #0A1314; border-radius: var(--radius-phone); overflow: hidden; background: #0A1314; box-shadow: 0 0 0 1px var(--color-border), var(--shadow-2); }
.phone-frame + .phone-frame { margin-top: var(--space-8); }
.phone-frame img { width: 100%; height: auto; display: block; }
@media (max-width: 639px) {
  .features { padding-block: var(--space-4); }
  .feature { padding-block: var(--space-7); gap: var(--space-6); }
  .feature > figure { order: -1; }
  .feature h2 { max-width: none; }
  .phone { gap: var(--space-4); }
  .phone-frame + .phone-frame { margin-top: var(--space-7); }
}
@container (max-width: 44rem) {
  .feature > figure { order: -1; }
}
/* medium: the 5/7 split stays, but tightens */
@media (min-width: 640px) and (max-width: 1023px) {
  .feature { gap: var(--space-6); }
  .feature-lead { font-size: var(--step-0); }
}

/* fade-up on scroll: the script adds .will-reveal only to blocks still below the
   viewport at the first scroll gesture, then .is-in as each one enters. Nothing loops;
   base.css zeroes the transition under prefers-reduced-motion. */
.will-reveal { opacity: 0; transform: translateY(var(--space-4)); transition: opacity calc(var(--dur-slow) * 3) var(--ease), transform calc(var(--dur-slow) * 3) var(--ease); }
.will-reveal.is-in { opacity: 1; transform: none; }

/* ---------- the rest of the workbench ---------- */
.workbench { border-top: 1px solid var(--color-border); padding-block: var(--space-7); }
.workbench-inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); }
.workbench-inner > p { font-size: var(--step-0); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.chips li { font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: var(--space-1) var(--space-3); line-height: 1.6; }

/* ---------- testimonials ---------- */
.testimonials { padding-block: var(--space-9); }
.testimonials h2 { max-width: 26ch; margin-bottom: var(--space-7); }
.testimonial-list { list-style: none; margin: 0; padding: 0; --gap: var(--space-7); }
.testimonial { border-top: 1px solid var(--color-border); padding-top: var(--space-5); display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { font-size: var(--step-0); line-height: 1.5; font-weight: 500; max-width: none; text-wrap: pretty; }
.who { display: flex; align-items: center; gap: var(--space-3); }
.who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.who div { display: grid; line-height: 1.35; }
.who strong { font-weight: 600; }
.who span { color: var(--color-muted); font-size: var(--step-n1); }
.who a { font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); text-decoration: none; min-height: 24px; }
.who a:hover, .who a:focus-visible { color: var(--color-accent-text); text-decoration: underline; }
@media (min-width: 640px) and (max-width: 1023px) { .testimonial:last-child { grid-column: 1 / -1; } }
@media (max-width: 639px) { .testimonials { padding-block: var(--space-8); } .testimonials h2 { margin-bottom: var(--space-6); } }

/* ---------- pricing ---------- */
.pricing { border-top: 1px solid var(--color-border); padding-block: var(--space-9); }
.pricing h2 { text-align: center; margin-bottom: var(--space-7); margin-inline: auto; max-width: 20ch; }
.plans { display: grid; grid-template-columns: 1fr 1fr; max-width: 960px; margin-inline: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.plan { padding: var(--space-6); display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.plan + .plan { border-left: 1px solid var(--color-border); }
.plan h3 { font-size: var(--step-1); font-family: var(--font-mono); font-weight: 600; letter-spacing: 0; }
.price { display: grid; gap: var(--space-2); }
.price .num { font-size: var(--step-5); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.price small { font-size: var(--step-n1); color: var(--color-muted); }
.tiers { font-family: var(--font-mono); font-size: var(--step-n1); color: var(--color-muted); margin-top: calc(-1 * var(--space-3)); }
.plan .btn { justify-self: start; margin-top: var(--space-2); }
.footnote { text-align: center; margin: var(--space-6) auto 0; color: var(--color-muted); font-size: var(--step-n1); font-family: var(--font-mono); max-width: 60ch; }
.footnote .arrow-link { min-height: 0; margin-inline-start: var(--space-2); }
@media (max-width: 639px) {
  .pricing { padding-block: var(--space-8); }
  .pricing h2 { margin-bottom: var(--space-6); }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: var(--space-5); }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--color-border); }
  .plan .btn { justify-self: stretch; white-space: normal; }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--color-border); padding-block: var(--space-9); }
.faq h2 { margin-bottom: var(--space-6); max-width: 22ch; }
.faq details { border-top: 1px solid var(--color-border); }
.faq details:last-of-type { border-bottom: 1px solid var(--color-border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: 56px; padding-block: var(--space-4); font-weight: 600; font-size: var(--step-1); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-size: var(--step-2); font-weight: 400; color: var(--color-accent-text); line-height: 1; width: 24px; text-align: center; }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--color-accent-text); }
.faq details p { padding-bottom: var(--space-5); color: var(--color-muted); max-width: 60ch; }
.faq details:not([open]) > p { display: none; }
@media (max-width: 639px) { .faq { padding-block: var(--space-8); } .faq summary { font-size: var(--step-0); } }

/* ---------- final CTA ---------- */
.final { border-top: 1px solid var(--color-border); padding-block: var(--space-10); text-align: center; }
.final h2 { font-size: clamp(var(--step-4), 1.6rem + 2.4vw, var(--step-6)); max-width: 16ch; margin-inline: auto; }
.final-sub { margin: var(--space-4) auto 0; max-width: 40ch; color: var(--color-muted); font-size: var(--step-1); }
.final .cta-row { margin-top: var(--space-6); justify-content: center; }
.final .micro { margin-top: var(--space-4); }
@media (max-width: 639px) { .final { padding-block: var(--space-8); } }

/* ---------- footer ---------- */
.footer { padding-block: var(--space-8) var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-brand p { margin-top: var(--space-3); max-width: 28ch; }
.footer h3 { font-family: var(--font-mono); font-size: var(--step-n1); font-weight: 600; color: var(--color-text); margin-bottom: var(--space-2); letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { text-decoration: none; min-height: 40px; }
.footer a:hover, .footer a:focus-visible { color: var(--color-text); text-decoration: underline; }
.copyright { grid-column: 1 / -1; border-top: 1px solid var(--color-border); padding-top: var(--space-5); font-family: var(--font-mono); }
@media (min-width: 640px) and (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}
