/* ==========================================================================
   TagIn landing page. Mirrors the app design system "Reception at Dusk":
   limewashed plaster, espresso ink, one committed eucalyptus action color,
   brass only as decoration. Dark theme is the studio after hours.
   Zero JavaScript, zero external requests. WCAG AA both themes.
   ========================================================================== */

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/Newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/HankenGrotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f1efe9;
  --surface: #fbfaf6;
  --surface-2: #e9e6dd;
  --border: #e0dcd1;
  --border-strong: #c8c2b2;
  --text: #24211b;
  --muted: #6a6457;
  --faint: #7a7466;
  --action: #315446;
  --action-ink: #f6f4ec;
  --action-hover: #2a4a3d;
  --gold: #a57b24;
  --r-s: 8px; --r-m: 14px; --r-l: 20px;
  --shadow-1: 0 1px 2px rgba(36, 33, 27, .05), 0 1px 1px rgba(36, 33, 27, .03);
  --shadow-2: 0 16px 40px -16px rgba(36, 33, 27, .22), 0 2px 8px rgba(36, 33, 27, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 340ms;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151714; --surface: #1d201c; --surface-2: #262a24;
    --border: #31352e; --border-strong: #474c42;
    --text: #ece9df; --muted: #aba698; --faint: #8d887a;
    --action: #a9c7b7; --action-ink: #142019; --action-hover: #bad3c6;
    --gold: #c9a254;
    --shadow-1: none;
    --shadow-2: 0 16px 40px -16px rgba(0, 0, 0, .55);
  }
}

/* base */
* { box-sizing: border-box; }
html { scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--action); color: var(--action-ink); }
a { color: var(--text); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--action); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 550; letter-spacing: -.01em; line-height: 1.12; margin: 0 0 .6rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 99;
  background: var(--action); color: var(--action-ink);
  padding: .6rem 1rem; border-radius: 0 0 var(--r-s) 0; text-decoration: none;
}
.skip:focus { left: 0; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }
.eyebrow {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em; color: var(--muted); margin: 0 0 .5rem;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text);
  padding: .5rem 1.1rem; min-height: 40px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; font-family: var(--font-ui); text-decoration: none;
  transition: transform var(--dur-1) var(--ease), background var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--text); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn.primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.btn.lg { padding: .75rem 1.6rem; min-height: 48px; font-size: 1rem; }
.btn.sm { padding: .3rem .85rem; min-height: 34px; font-size: .82rem; }

/* sticky top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.topbar img { width: 96px; height: auto; }

/* hero */
.hero { padding: 4.5rem 0 4.2rem; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); max-width: 17ch; margin: .8rem auto .9rem; }
.hero .sub {
  font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted);
  max-width: 44ch; margin: 0 auto 1.9rem;
}

/* waitlist CTA block: mailto state now, form state after the key swap */
.waitlist { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.waitlist form { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 460px; }
.waitlist input[type="email"] {
  font: inherit; flex: 1 1 220px; padding: .7rem .9rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
}
.waitlist input[type="email"]:focus {
  outline: none; border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 20%, transparent);
}
.waitlist .hp { position: absolute; left: -9999px; }
.waitlist-note { margin: 0; font-size: .85rem; color: var(--muted); max-width: 42ch; }

/* section rhythm */
.section { padding: 4rem 0; }
.section.alt {
  background: color-mix(in srgb, var(--surface-2) 60%, var(--bg));
  border-block: 1px solid var(--border);
}
.section h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); max-width: 26ch; }
.lead { color: var(--muted); max-width: 58ch; margin: 0 0 1.6rem; font-size: 1.02rem; }
.center { text-align: center; }
.center h2, .center .lead { margin-inline: auto; }

/* the pain */
.pain-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
.pain {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-m); padding: 1.4rem 1.3rem; box-shadow: var(--shadow-1);
}
.pain h3 { font-size: 1.22rem; }
.pain p { margin: 0; color: var(--muted); font-size: .95rem; }
.pivot {
  font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.8rem);
  text-align: center; margin: 2.8rem auto 0; max-width: 30ch; line-height: 1.3;
}
.pivot em { font-style: normal; color: var(--action); }

/* how it works */
.steps {
  list-style: none; counter-reset: step; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2.2rem 0 2.8rem;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-display); font-size: 2.4rem;
  line-height: 1; color: var(--faint); margin-bottom: .55rem;
}
.step h3 { font-size: 1.18rem; margin-bottom: .3rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* screenshot frames */
.browser-frame {
  max-width: 940px; margin: 0 auto;
  border: 1px solid var(--border-strong); border-radius: var(--r-l);
  overflow: hidden; box-shadow: var(--shadow-2); background: var(--surface);
}
.browser-frame .chrome {
  display: flex; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.browser-frame .chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.phone-frame {
  width: min(320px, 86vw); margin: 0 auto;
  border: 1px solid var(--border-strong); border-radius: 34px; padding: 10px;
  background: var(--surface-2); box-shadow: var(--shadow-2);
}
.phone-frame img { border-radius: 24px; }

/* communications split */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.8rem; align-items: center; }
.checklist { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .95rem; }
.checklist li { padding-left: 1.7rem; position: relative; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .45em;
  width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg);
}
.checklist strong { display: block; font-weight: 650; }
.checklist span { color: var(--muted); font-size: .93rem; }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-m); padding: 1.3rem 1.2rem; box-shadow: var(--shadow-1);
}
.feature h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature h3::before {
  content: ""; display: block; width: 10px; height: 10px;
  background: var(--action); transform: rotate(45deg); margin-bottom: .85rem;
}
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* pricing */
.plans {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem;
  max-width: 720px; margin: 2.2rem auto 0;
}
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-l);
  padding: 1.7rem 1.5rem; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: .35rem; text-align: left;
}
.plan.pro { border-color: var(--action); box-shadow: var(--shadow-2); }
.plan .name {
  font-weight: 700; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.plan .price { font-family: var(--font-display); font-size: 2.4rem; line-height: 1.1; }
.plan .price span { font-size: .95rem; font-family: var(--font-ui); color: var(--muted); font-weight: 500; }
.plan ul { margin: .5rem 0 1.3rem; padding-left: 1.1rem; color: var(--muted); font-size: .93rem; display: grid; gap: .4rem; }
.plan .btn { margin-top: auto; }
.plans-note { text-align: center; color: var(--muted); font-size: .9rem; margin: 1.4rem 0 0; }

/* final CTA + footer */
.cta-final { text-align: center; }
footer { border-top: 1px solid var(--border); padding: 2.2rem 0 2.6rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot img { width: 84px; height: auto; }
.foot p { margin: 0; font-size: .85rem; color: var(--muted); max-width: 46ch; }
.foot a { color: inherit; }

/* thanks page */
.thanks { min-height: 100svh; display: grid; place-items: center; padding: 3rem 0; }
.thanks img { margin: 0 auto 1.6rem; width: 120px; }
.thanks .btn { margin-top: 1.2rem; }

/* responsive */
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 2.2rem; }
  .pain-grid, .steps, .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pain-grid, .steps, .features, .plans { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .hero { padding: 3.2rem 0 3rem; }
}
