/* Tactful project page. Identity: steady, warm, straight-talking. Signature: the cool-down line. */

:root {
  --paper: #f6f1e9;
  --paper-2: #efe8dc;
  --ink: #1c2321;
  --muted: #56605c;
  --card: #fffdf9;
  --line: #e2dacb;
  --calm: #1e6b5c;
  --calm-ink: #ffffff;
  --calm-soft: #dcebe5;
  --heat: #c4411f;
  --heat-soft: #f7e1d8;
  --code-bg: #151b19;
  --code-ink: #e6ece8;
  --shadow: 0 1px 2px rgb(28 35 33 / 6%), 0 12px 32px -12px rgb(28 35 33 / 22%);
  --shadow-lift: 0 2px 4px rgb(28 35 33 / 8%), 0 24px 48px -16px rgb(28 35 33 / 30%);
  --radius: 16px;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111614;
    --paper-2: #151c1a;
    --ink: #eceeea;
    --muted: #a3aea8;
    --card: #181f1d;
    --line: #2a3330;
    --calm: #6cc6ae;
    --calm-ink: #0c1311;
    --calm-soft: #1b2d28;
    --heat: #ff8a65;
    --heat-soft: #33201a;
    --code-bg: #0b0f0e;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -12px rgb(0 0 0 / 60%);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 35%), 0 24px 48px -16px rgb(0 0 0 / 70%);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--calm); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--calm); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* type scale */
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 2rem + 3.6vw, 5rem); line-height: 1.02; font-variation-settings: 'opsz' 144; }
h1 em { font-style: normal; color: var(--calm); }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); line-height: 1.08; font-variation-settings: 'opsz' 120; max-width: 20ch; }
h3 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -0.01em; font-variation-settings: 'opsz' 36; }
p { margin: 0; }

.eyebrow, .kicker {
  font: 600 0.8rem/1.2 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.kicker { color: var(--calm); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid var(--calm); border-radius: 999px;
  background: var(--calm); color: var(--calm-ink);
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--calm); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn svg { width: 18px; height: 18px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.35rem/1 var(--display); letter-spacing: -0.01em; }
.brand-mark { width: 32px; height: 32px; color: var(--calm); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 0; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(40px, 5vw, 64px); align-items: center; }
@media (min-width: 1080px) { .hero-grid { grid-template-columns: 0.95fr 1.25fr; } }
.lede { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); color: var(--muted); margin-top: 24px; max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { margin-top: 18px; font-size: 0.95rem; color: var(--muted); }

.window {
  margin: 0; position: relative; z-index: 2;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lift); overflow: hidden;
}
.window-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #e0d8c9; display: block; }
.dots i:nth-child(1) { background: #ee6a5f; }
.dots i:nth-child(2) { background: #f5be4f; }
.dots i:nth-child(3) { background: #62c554; }
.address { flex: 1; max-width: 320px; margin-inline: auto; transform: translateX(-24px); text-align: center; font: 500 0.8rem/26px var(--body); color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.window video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #f6f4ef; }
.play-toggle { position: absolute; right: 12px; bottom: 12px; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgb(28 35 33 / 72%); color: #fff; font: 600 0.85rem/1 var(--body); cursor: pointer; }

/* the cool-down line */
.cooldown { position: relative; margin-top: clamp(32px, 5vw, 56px); }
.cooldown svg { width: 100%; height: clamp(70px, 9vw, 120px); }
.cooldown-path { fill: none; stroke: url(#heat-to-calm); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cooldown-labels { display: flex; justify-content: space-between; margin-top: 6px; font: 600 0.8rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.label-heat { color: var(--heat); }
.label-calm { color: var(--calm); }
.demo-note { margin-top: 20px; padding-bottom: clamp(56px, 8vw, 96px); font-size: 0.95rem; color: var(--muted); max-width: 70ch; }

/* sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-lede { margin-top: 20px; color: var(--muted); font-size: 1.2rem; max-width: 56ch; }

/* cool it down card */
.cool-card { margin-top: 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.cool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cool-tag { font: 600 0.8rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.tag-hot { color: var(--heat); }
.tag-calm { color: var(--calm); display: none; }
.cool-text { display: grid; margin-top: 22px; font: 500 clamp(1.3rem, 1.1rem + 1vw, 1.75rem)/1.4 var(--display); letter-spacing: -0.01em; font-variation-settings: 'opsz' 48; }
.cool-text > span { grid-area: 1 / 1; transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease; }
.calm-text { opacity: 0; transform: translateY(8px); }
.cool-line { width: 100%; height: 40px; margin-top: 22px; overflow: visible; }
.cool-line path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.line-hot { stroke: var(--heat); transition: opacity 0.35s ease; }
.line-calm { stroke: var(--calm); opacity: 0; clip-path: inset(0 100% 0 0); transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s, opacity 0.2s ease 0.1s; }

.cool-card[data-state='calm'] .hot-text { opacity: 0; transform: translateY(-8px); filter: blur(2px); }
.cool-card[data-state='calm'] .calm-text { opacity: 1; transform: none; }
.cool-card[data-state='calm'] .line-hot { opacity: 0; }
.cool-card[data-state='calm'] .line-calm { clip-path: inset(0 0 0 0); opacity: 1; }
.cool-card[data-state='calm'] .tag-hot { display: none; }
.cool-card[data-state='calm'] .tag-calm { display: inline; }
.cool-card .hot-text { position: relative; }

/* steps */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: clamp(56px, 8vw, 96px); }
.step { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .step { grid-template-columns: 5fr 7fr; gap: 64px; }
  .step:nth-child(even) { grid-template-columns: 7fr 5fr; }
  .step:nth-child(even) .step-copy { order: 2; }
}
.step-num { display: block; font: 600 3.5rem/1 var(--display); color: var(--calm); margin-bottom: 14px; font-variation-settings: 'opsz' 144; }
.step-copy p { margin-top: 12px; color: var(--muted); max-width: 42ch; }

.shot { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f6f4ef; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.shot img { width: 100%; height: auto; }
.step:hover .shot, .feature:hover .shot { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* features */
.features { display: grid; gap: 20px; margin-top: 56px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .feature-wide { grid-column: span 2; grid-row: span 2; }
}
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--calm) 35%, var(--line)); }
.feature p { margin-top: 10px; color: var(--muted); font-size: 1.05rem; }
.feature-wide { display: grid; gap: 24px; align-content: start; }
.feature-wide .shot { box-shadow: none; }
.feature-wide:hover .shot { transform: none; box-shadow: none; }
.icon { width: 40px; height: 40px; margin-bottom: 18px; fill: none; stroke: var(--calm); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* install */
.code { margin-top: 28px; border-radius: 14px; overflow: hidden; background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--code-bg) 70%, var(--line)); }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); color: #b9c4bf; font-size: 0.9rem; font-weight: 500; }
.copy { min-height: 34px; padding: 6px 14px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 999px; background: transparent; color: #e6ece8; font: 600 0.85rem/1 var(--body); cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.copy:hover { background: rgb(255 255 255 / 8%); }
.copy.done { border-color: #6cc6ae; color: #6cc6ae; }
.code pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--code-ink); font: 0.95rem/1.7 var(--mono); }
.after-code { margin-top: 14px; color: var(--muted); font-size: 1rem; }
code { font-family: var(--mono); font-size: 0.92em; }
.after-code code { background: var(--calm-soft); color: var(--ink); padding: 2px 6px; border-radius: 6px; }

/* faq */
.faq { margin-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font: 600 1.2rem/1.35 var(--display); letter-spacing: -0.01em; font-variation-settings: 'opsz' 36; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 14px; height: 14px; border-right: 2px solid var(--calm); border-bottom: 2px solid var(--calm); transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }

/* closing */
.closing { padding: clamp(80px, 10vw, 128px) 0; text-align: center; }
.closing-inner { display: grid; justify-items: center; }
.closing h2 { max-width: 18ch; }
.closing .cta { justify-content: center; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--muted); font-size: 0.95rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }

/* scroll reveal, only when the script runs */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* draw the cool-down line once */
.js .cooldown-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .cooldown-path { stroke-dashoffset: 0; }
  .btn:hover, .feature:hover, .step:hover .shot { transform: none; }
}
