/*
  Shared layout for /products/<slug>.

  Visual tokens, nav, hero, sections, buttons, and footer match index.html.
  The homepage keeps its own <style> block and does not link this file,
  so marketing edits there cannot restyle the landing page by accident.

  Wireframe-tour classes (.tour, .artboard, .frame) are optional.
  See /products/README.md for how to add a page.
*/

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface2: #27272a;
  --border: #3f3f46;
  --text: #fafafa;
  --text2: #a1a1aa;
  --text3: #71717a;
  --accent: #a78bfa;
  --accent2: #c4b5fd;
  --accent-dim: rgba(167, 139, 250, .08);
  --green: #34d399;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --rose: #fb7185;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent2); }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: .4;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.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;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── NAV (matches homepage) ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, .8);
  border-bottom: 1px solid var(--border);
}

nav .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
}

.logo:hover { color: var(--text); }
a.logo { cursor: pointer; }
.logo span { color: var(--accent); }

nav .links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav .links a { color: var(--text2); }
nav .links a:hover { color: var(--text); }
nav .links a[aria-current="page"] { color: var(--text); }

/* ── HERO ── */
.page-hero {
  padding: 140px 0 64px;
  text-align: center;
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 420px;
  background: radial-gradient(circle, rgba(167, 139, 250, .06) 0%, transparent 70%);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--amber);
  margin-bottom: 28px;
  font-family: var(--mono);
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.page-hero h1.narrative {
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.12;
  max-width: 18em;
  margin-left: auto;
  margin-right: auto;
}

.gradient {
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero .sub {
  font-size: 18px;
  color: var(--text2);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  transition: all .2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent2); color: var(--bg); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-ghost:hover { border-color: var(--text3); color: var(--text); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .45;
  cursor: not-allowed;
}

.btn-ghost:disabled:hover,
.btn-ghost[aria-disabled="true"]:hover {
  border-color: var(--border);
  color: var(--text2);
  background: transparent;
}

/* ── SECTIONS ── */
section { padding: 72px 0; }

.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 640px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.tag {
  display: inline-block;
  margin-top: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  background: var(--surface2);
  color: var(--text3);
}

.tag.soon {
  background: rgba(251, 191, 36, .15);
  color: var(--amber);
  font-weight: 600;
}

/* ── COMING SOON (outside any tour) ── */
.soon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 760px;
}

.soon-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.soon-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.soon-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 10px 0 6px;
}

.soon-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }
.soon-card p + p { margin-top: 10px; }
.soon-card a { color: var(--accent2); }

.prose p {
  margin: 0 0 14px;
  color: var(--text2);
  font-size: 16px;
  line-height: 1.7;
  max-width: 760px;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent2); }

/* ── CONTACT CTA ── */
.contact-card {
  margin: 8px 0 0;
  padding: 40px 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(167, 139, 250, .08), rgba(52, 211, 153, .05));
  border: 1px solid var(--border);
}

.contact-card h3 {
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--text);
  text-align: center;
  letter-spacing: -.02em;
}

.contact-card .lede {
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.contact-meta {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
}

.contact-meta a {
  color: var(--text3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-meta a:hover { color: var(--text2); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text3);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer-links a { color: var(--text3); }
.footer-links a:hover { color: var(--text); }

/* ── WIREFRAME TOUR ── */
.tour-section { padding-top: 8px; }

.tour-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.tour-rail {
  list-style: none;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(24, 24, 27, .7);
}

.tour-rail button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text2);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.tour-rail button:hover { color: var(--text); background: var(--surface2); }

.tour-rail button[aria-current="step"] {
  color: var(--text);
  background: var(--accent-dim);
  box-shadow: inset 2px 0 0 var(--accent);
}

.tour-rail .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  width: 1.4em;
  flex: none;
}

.tour-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.tour-step h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 10px;
  scroll-margin-top: 96px;
}

.tour-caption {
  font-size: 16px;
  color: var(--text2);
  max-width: 68ch;
  line-height: 1.7;
  margin-bottom: 20px;
}

.tour-step { display: none; }
.tour-step.is-active { display: block; }

.artboard {
  position: relative;
  background: #e7e7ea;
  border-radius: 16px;
  padding: 28px 16px 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.artboard-stamp {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #71717a;
}

.frame-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.flow .frame,
.flow .frame-wide {
  min-width: 0;
}

.flow-then {
  display: none;
}

.frame {
  margin: 0;
  background: #fafafa;
  border: 1.5px dashed #a1a1aa;
  border-radius: 12px;
  padding: 14px;
  color: #3f3f46;
  min-height: 200px;
}

.frame-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #52525b;
  margin-bottom: 12px;
}

.shot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.shot-grid-pair {
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  align-items: start;
}

.shot {
  margin: 0;
  background: #111113;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.shot figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 12px 14px 10px;
}

.shot-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  font: inherit;
  color: inherit;
}

.shot-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.shot-open::after {
  content: 'Enlarge';
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(9, 9, 11, .82);
  color: #fafafa;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f4f5;
}

.shot-lightbox {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 32px);
  height: calc(100vh - 32px);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
}

.shot-lightbox::backdrop {
  background: rgba(0, 0, 0, .78);
}

.shot-lightbox-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.shot-lightbox-bar p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text2);
}

.shot-lightbox-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.shot-lightbox img {
  display: block;
  width: auto;
  max-width: min(100%, 1600px);
  height: auto;
  max-height: none;
  margin: 0 auto;
  background: #f4f4f5;
}

.w-headline {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 600;
  color: #18181b;
  letter-spacing: -.03em;
  margin: 12px 0 8px;
}

.w-subline { font-size: 14px; color: #52525b; margin-bottom: 16px; }

.w-pills, .w-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.w-pills span, .w-chip, .w-choice button, .swatch {
  border: 1px solid #d4d4d8;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  color: #3f3f46;
  background: #f4f4f5;
}

.w-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.w-block {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.w-block span, .w-k {
  display: block;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #71717a;
  margin-bottom: 6px;
}

.w-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e4e4e7;
  margin-top: 8px;
}

.w-bar.short { width: 58%; }
.w-bar.med { width: 80%; }
.w-bar.gap { margin-top: 14px; }

.w-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #3f3f46;
}

.w-line b {
  font-weight: 500;
  min-width: 76px;
  color: #52525b;
}

.w-line .w-bar { flex: 1; margin-top: 0; }

.w-temp {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -.04em;
  color: #18181b;
  line-height: 1;
  margin-bottom: 8px;
}

.w-alert {
  border: 1px solid #d4d4d8;
  border-left: 4px solid #71717a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f4f4f5;
  font-size: 13px;
  color: #27272a;
  line-height: 1.45;
}

.w-choice { display: flex; gap: 8px; margin: 4px 0 12px; }

.w-choice button { cursor: pointer; }

.w-choice button[aria-pressed="true"] {
  background: #18181b;
  color: #fafafa;
  border-color: #18181b;
}

.w-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  margin-top: 10px;
  table-layout: fixed;
}

.w-table th {
  text-align: left;
  font-weight: 500;
  color: #71717a;
  padding: 4px 4px 6px;
  border-bottom: 1px solid #e4e4e7;
}

.w-table td {
  padding: 7px 4px;
  border-bottom: 1px solid #f4f4f5;
  color: #3f3f46;
  vertical-align: middle;
}

.w-table .w-bar { margin-top: 0; min-width: 24px; }

.w-note {
  margin-top: 10px;
  font-size: 11px;
  color: #71717a;
  letter-spacing: .01em;
}

.w-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.w-col {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.w-canvas {
  height: 120px;
  border: 1.5px dashed #d4d4d8;
  border-radius: 8px;
  background:
    linear-gradient(#f4f4f5, #f4f4f5) center / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent, transparent 18px, #f4f4f5 18px, #f4f4f5 19px);
  margin-bottom: 12px;
}

.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.swatch i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}

.swatch[aria-pressed="true"] { outline: 2px solid #18181b; outline-offset: 1px; }

.swatch-moss i { background: #4d7c0f; }
.swatch-clay i { background: #c2410c; }
.swatch-dusk i { background: #4338ca; }
.swatch-citrus i { background: #ca8a04; }

.finder {
  height: 140px;
  border-radius: 8px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.finder span {
  width: 72px;
  height: 72px;
  border: 2px solid #a1a1aa;
  border-radius: 8px;
  box-shadow: 0 0 0 18px rgba(161, 161, 170, .15);
}

.browser {
  background: #fafafa;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d4d4d8;
  color: #18181b;
}

.browser-chrome {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: #e4e4e7;
}

.browser-chrome i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a1a1aa;
  display: block;
}

.browser-url {
  margin-left: 8px;
  height: 18px;
  flex: 1;
  border-radius: 999px;
  background: #fafafa;
}

.browser-page { padding: 14px; }

.theme-hero {
  border-radius: 8px;
  padding: 22px 16px;
  margin-bottom: 12px;
  background: var(--pack, #d9f99d);
}

.browser[data-theme="moss"] { --pack: #d9f99d; }
.browser[data-theme="clay"] { --pack: #fed7aa; }
.browser[data-theme="dusk"] { --pack: #c7d2fe; }
.browser[data-theme="citrus"] { --pack: #fef08a; }

.theme-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.theme-nav span {
  height: 8px;
  width: 48px;
  border-radius: 999px;
  background: #e4e4e7;
}

.theme-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.theme-cols div {
  height: 56px;
  background: #e4e4e7;
  border-radius: 6px;
}

.tour-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  position: static;
}

.tour-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tour-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
}

.tour-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.tour-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--text3);
  background: transparent;
  cursor: pointer;
}

.tour-dot[aria-current="step"] {
  background: var(--accent);
  border-color: var(--accent);
}

.tour-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .shot-grid-pair { grid-template-columns: minmax(0, 420px); }
}

@media (max-width: 900px) {
  .tour-layout { grid-template-columns: 1fr; }
  .tour-rail {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    top: auto;
  }
  .tour-rail li { flex: 0 0 auto; }
  .tour-rail button { width: auto; white-space: nowrap; }
}

@media (max-width: 768px) {
  nav .links { display: none; }
  .page-hero { padding: 120px 0 48px; }
  .page-hero h1 { font-size: 36px; }
  .section-title { font-size: 26px; }
  section { padding: 56px 0; }
  .frame-grid, .w-blocks, .soon-grid, .w-split { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; }
}

@media (max-width: 520px) {
  .contact-card { padding: 28px 18px; }
  .cta-row .btn { width: 100%; }
  .w-headline { font-size: 22px; }
}
