/* ════════════════════════════════════════════════════════════════
   tidepage — landing page
   Editorial-technical. Sea-biased slate surfaces, a single reserved
   tide accent (teal, never decorative), Newsreader serif headlines,
   precise 1px borders. Built on the vendored design tokens in
   tokens.css. No gradients, no emoji.
   ════════════════════════════════════════════════════════════════ */

/* ── Helpers ───────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--surface-card); color: var(--text-primary);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 8px 14px; font-size: var(--text-sm); font-weight: var(--weight-medium);
  transition: top var(--dur-fast) var(--ease-standard);
}
.skip-link:focus { top: 12px; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { background: var(--surface-page); }

/* ── Brand mark + wordmark ─────────────────────────────────────── */
/* The tidepage lockup: line-only horizon mark + serif wordmark, the
   wordmark optically centred on the mark's horizon. The mark is line
   art (no tile), so light/dark variants swap with the page theme. */
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { display: inline-flex; flex: none; width: 30px; height: 30px; }
.brand-mark img { width: 100%; height: 100%; }
.brand-mark .brand-mark-light { display: block; }
.brand-mark .brand-mark-dark  { display: none; }
[data-theme="dark"] .brand-mark .brand-mark-light { display: none; }
[data-theme="dark"] .brand-mark .brand-mark-dark  { display: block; }
.brand-word {
  font-family: var(--font-display); font-size: var(--text-2xl);
  font-weight: var(--wordmark-weight); letter-spacing: var(--wordmark-tracking);
  color: var(--text-primary); line-height: 1;
}
.brand-flip-e { display: inline-block; transform: scaleX(-1); }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-medium);
  line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 0 16px; height: var(--control-md);
  transition: var(--transition-colors), transform var(--dur-fast) var(--ease-standard);
}
.btn i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: var(--shadow-glow); }
.btn-primary:active { background: var(--accent-pressed); transform: translateY(1px); box-shadow: none; }
.btn-secondary { background: var(--surface-card); color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn-secondary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }
.btn-lg { height: var(--control-lg); padding: 0 22px; font-size: var(--text-md); border-radius: var(--radius-md); }
.theme-toggle { width: var(--control-md); padding: 0; }
.theme-toggle i { width: 18px; height: 18px; }

/* ── Nav ───────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface-page) 82%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-in {
  max-width: 1120px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-size: var(--text-base); font-weight: var(--weight-medium);
  transition: var(--transition-colors);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-signin {
  text-decoration: none; color: var(--text-secondary);
  font-size: var(--text-base); font-weight: var(--weight-medium);
  transition: var(--transition-colors);
}
.nav-signin:hover { color: var(--text-primary); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 72px 32px 64px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-subtle); color: var(--accent-text);
  border: 1px solid var(--accent-border); border-radius: var(--radius-full);
  padding: 5px 12px; font-size: var(--text-sm); font-weight: var(--weight-medium);
}
.badge i { width: 14px; height: 14px; }
.h1 {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 62px);
  font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; margin: 20px 0 0;
}
.accent { color: var(--accent); }
.problem {
  font-size: var(--text-md); line-height: 1.6; color: var(--text-secondary);
  max-width: 48ch; margin: 20px 0 0;
  padding-left: 14px; border-left: 2px solid var(--border-default);
}
.lede {
  font-size: var(--text-lg); line-height: 1.6; color: var(--text-primary);
  max-width: 48ch; margin: 16px 0 0;
}

/* ── Hero / CTA actions ────────────────────────────────────────── */
.hero-actions { display: flex; gap: 12px; margin: 30px 0 0; flex-wrap: wrap; }
.cta-actions { display: flex; gap: 12px; margin: 28px 0 0; flex-wrap: wrap; justify-content: center; }

/* ── Hero product shot ─────────────────────────────────────────── */
.shot {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.shot-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--slate-200);
}
[data-theme="dark"] .shot-bar { border-bottom-color: var(--border-subtle); }
.shot-mark { width: 18px; height: 18px; }
.shot-name { font-family: var(--font-display); font-size: 15px; font-weight: 500; color: var(--text-primary); }
.shot-saved { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.shot-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); }
.shot-review {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--accent-text);
  background: var(--accent-subtle); border: 1px solid var(--accent-border);
  border-radius: var(--radius-full); padding: 2px 8px;
}
.shot-review i { width: 12px; height: 12px; }
.shot-seg {
  margin-left: 10px; display: inline-flex; gap: 2px; background: var(--surface-sunken);
  border-radius: 8px; padding: 3px; font-size: 12px; font-weight: 500;
}
.shot-seg span { padding: 4px 10px; border-radius: 6px; color: var(--text-muted); }
.shot-seg .on { background: var(--surface-card); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.shot-body { position: relative; padding: 26px; background: var(--surface-inset); }
.shot-page {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm);
}
.shot-eyebrow {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-text);
}
/* selected element + popover */
.shot-sel { position: relative; display: inline-block; margin: 10px 0 18px; }
.shot-sel h3 {
  font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.05;
  letter-spacing: -0.02em; margin: 0; color: var(--text-primary);
  outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px;
}
.shot-pop {
  position: absolute; top: -46px; left: -6px; display: flex; align-items: center; gap: 8px;
  background: var(--surface-raised); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: 6px 8px;
}
.shot-pop-swatches { display: inline-flex; gap: 4px; }
.shot-pop .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--slate-950) 12%, transparent); }
.shot-pop .sw-1 { background: var(--slate-900); }
.shot-pop .sw-2 { background: var(--tide-500); }
.shot-pop .sw-3 { background: var(--green-500); }
.shot-pop .sw-4 { background: var(--amber-500); }
.shot-pop .sw.on { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--accent); }
.shot-pop-div { width: 1px; height: 18px; background: var(--border-subtle); }
.shot-pop-chip {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  background: var(--surface-inset); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 3px 7px;
}
.shot-pop-chip--cat { color: var(--highlight-fg); background: var(--highlight-bg); border-color: var(--highlight-border); }
.shot-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shot-kpi {
  display: flex; flex-direction: column; gap: 3px; padding: 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
}
.shot-kpi span { font-size: 10px; color: var(--text-muted); }
.shot-kpi strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text-primary); letter-spacing: -0.01em; }
.shot-kpi em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--green-700); }
[data-theme="dark"] .shot-kpi em { color: var(--success-fg); }
.shot-kpi--sel { position: relative; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.shot-pin {
  position: absolute; top: -8px; right: -8px; width: 18px; height: 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ── Section primitives ────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 12px;
}
.h2 {
  font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0;
}

/* ── Review-with-Claude showcase band ──────────────────────────── */
.showcase {
  max-width: 1120px; margin: 0 auto; padding: 64px 32px;
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: center;
}
.showcase-text .h2 { margin-top: 10px; }
.showcase-lede {
  font-size: var(--text-md); line-height: 1.6; color: var(--text-secondary);
  max-width: 46ch; margin: 16px 0 0;
}

/* ── How it works ──────────────────────────────────────────────── */
.how { max-width: 1120px; margin: 0 auto; padding: 56px 32px; text-align: center; }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 44px; text-align: left;
}
.step {
  position: relative; background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-hairline), var(--shadow-xs);
}
.step-num {
  position: absolute; top: 18px; right: 20px; font-family: var(--font-mono);
  font-size: 13px; font-weight: 500; color: var(--text-faint); letter-spacing: 0.04em;
}
.step-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--radius-md); background: var(--accent-subtle); color: var(--accent-text);
  margin-bottom: 18px;
}
.step-icon i { width: 22px; height: 22px; }
.step h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin: 0 0 8px; }
.step p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.55; margin: 0; }

/* ── Features band ─────────────────────────────────────────────── */
.features { background: var(--slate-50); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
[data-theme="dark"] .features { background: var(--surface-card); }
.features-in {
  max-width: 1120px; margin: 0 auto; padding: 64px 32px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px;
}
.feature { display: flex; gap: 16px; }
.feature-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: var(--radius-md); background: var(--surface-card);
  border: 1px solid var(--border-subtle); color: var(--accent);
}
.feature-icon i { width: 20px; height: 20px; }
.feature h3 { font-size: var(--text-md); font-weight: var(--weight-semibold); margin: 2px 0 6px; }
.feature p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.55; margin: 0; }
.features-roadmap {
  max-width: 1120px; margin: 0 auto; padding: 8px 32px 64px;
  display: flex; align-items: center; gap: 10px;
  font-size: var(--text-sm); color: var(--text-muted);
}
.features-roadmap i { width: 16px; height: 16px; flex: none; color: var(--accent); }

/* ── FAQ ───────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; padding: 72px 32px; text-align: center; }
.faq-list { margin-top: 40px; text-align: left; }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; list-style: none;
  font-size: var(--text-lg); font-weight: var(--weight-medium); color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i {
  width: 18px; height: 18px; flex: none; color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-standard);
}
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p {
  padding: 0 4px 22px; margin: 0; max-width: 64ch;
  font-size: var(--text-base); color: var(--text-secondary); line-height: 1.6;
}

/* ── Closing CTA ───────────────────────────────────────────────── */
.cta { padding: 24px 32px 96px; }
.cta-in {
  max-width: 760px; margin: 0 auto; text-align: center;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-hairline), var(--shadow-sm);
  padding: 56px 40px;
}
.cta .eyebrow { text-align: center; }
.cta-sub { font-size: var(--text-lg); color: var(--text-secondary); margin: 14px auto 0; max-width: 54ch; }
.cta-tags { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-inset); color: var(--text-secondary);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  padding: 5px 12px; font-size: var(--text-sm); font-weight: var(--weight-medium);
}
.tag i { width: 14px; height: 14px; color: var(--success); }

/* ── Footer ────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--border-subtle); }
.foot-in {
  max-width: 1120px; margin: 0 auto; padding: 28px 32px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.foot-copy { font-size: var(--text-sm); color: var(--text-muted); }
.foot-links { margin-left: auto; display: flex; gap: 22px; }
.foot-links a {
  font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary);
  text-decoration: none; transition: var(--transition-colors);
}
.foot-links a:hover { color: var(--text-primary); }

/* ── Reveal on scroll (progressive enhancement) ────────────────── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 52px; }
  .shot { order: 2; }
  .showcase { grid-template-columns: 1fr; gap: 32px; }
  .showcase-shot { order: 2; }
  .features-in { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .steps, .features-in { grid-template-columns: 1fr; }
  .nav-in, .hero, .how, .showcase, .features-in, .features-roadmap, .faq, .foot-in { padding-left: 20px; padding-right: 20px; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .cta-in { padding: 40px 24px; }
  .foot-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── From the blog ──────────────────────────────────────────────── */
.blogtease { max-width: 1120px; margin: 0 auto; padding: 56px 32px; }
.blogtease-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.blogtease-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.blogtease-all:hover { text-decoration: underline; }
.blogtease-all i { width: 17px; height: 17px; }
.blogtease-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.blogtease-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px;
  background: var(--surface-raised); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); text-decoration: none; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.blogtease-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blogtease-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text);
}
.blogtease-card h3 { font-size: 19px; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
.blogtease-card p { font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); margin: 0; flex: 1; }
.blogtease-meta { font-size: 13px; color: var(--text-muted); }
@media (max-width: 860px) { .blogtease-grid { grid-template-columns: 1fr; } .blogtease-head { flex-wrap: wrap; } }

/* ── "Editing mode" hover on real hero copy ─────────────────────────
   Pure CSS: the element shows an instant teal selection frame on hover
   and a mini style toolbar (a child, so no JS/coordinate math —
   transform-safe) floats above it, giving visitors a direct feel of
   tidepage's click-to-edit. Selection is an instant frame and the caret
   is plain — both per the signature decisions in brand/BRAND_BRIEF.md. */
.edemo {
  position: relative;
  border-radius: 6px;
  outline: 2px solid transparent; outline-offset: 6px;
  transition: outline-color var(--dur-fast) var(--ease-standard);
  cursor: text;
}
.edemo:hover { outline-color: var(--accent); }
.edemo-bar {
  position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 8px; white-space: nowrap;
  background: var(--surface-raised); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; line-height: 1;
  letter-spacing: normal; text-transform: none;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.edemo:hover .edemo-bar { opacity: 1; transform: translateY(0); }
.edemo-sw { width: 15px; height: 15px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--slate-950) 12%, transparent); }
.edemo-sw-1 { background: var(--slate-900); }
.edemo-sw-2 { background: var(--tide-500); box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--accent); }
.edemo-sw-3 { background: var(--green-500); }
.edemo-div { width: 1px; height: 16px; background: var(--border-subtle); }
.edemo-chip { font-weight: 600; color: var(--text-secondary); background: var(--surface-inset); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 3px 7px; }
@media (prefers-reduced-motion: reduce) { .edemo-bar { transition: opacity var(--dur-fast) var(--ease-standard); transform: none; } }

/* ── Hero / showcase product shot (real screenshot of the editor) ───────── */
.shot-img { display: block; width: 100%; height: auto; }
.shot--video { padding: 0; line-height: 0; }
.shot-video { display: block; width: 100%; height: auto; }
