/* San Diego Deck Finder
   Quiet page, loud button. White paper, graphite ink, warm stone tiles.
   The only color on the page is the wood in the deck renders. */
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --stone: #f0eeea;
  --stone-deep: #e5e2dc;
  --ink: #15181a;
  --ink-2: #5a6065;
  --rule: #e4e2dd;
  --err: #b3261e;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.5 "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.top {
  max-width: var(--wrap); margin: 0 auto; padding: 22px 32px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.brand span span { font-weight: 400; color: var(--ink-2); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.top-note { font-size: 0.9rem; color: var(--ink-2); }

/* ---------- call to action ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease;
}
.cta:hover { background: #000; transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta:disabled { opacity: 0.6; cursor: default; transform: none; }
.cta-big { min-height: 72px; padding: 0 16px 0 36px; font-size: 1.3rem; }
.cta-full { width: 100%; padding: 0 28px; }
.cta-arrow {
  position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; flex: none;
  transition: transform 0.15s ease;
}
.cta-arrow::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -6px 0 0 -8px;
  border-top: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); transform: rotate(45deg);
}
.cta:hover .cta-arrow { transform: translateX(3px); }
.cta-light { background: #fff; color: var(--ink); }
.cta-light:hover { background: var(--stone); }
.cta-light .cta-arrow { background: var(--ink); }
.cta-light .cta-arrow::before { border-color: #fff; }
.cta:focus-visible { outline-offset: 4px; }

/* ---------- hero ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; padding: 40px 32px 64px; display: grid; gap: 40px; }
h1 { font-size: clamp(2.5rem, 4.7vw, 4.1rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.038em; text-wrap: balance; }
.lede { margin-top: 20px; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.hero-action { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cta-note { color: var(--ink-2); font-size: 0.98rem; }

.styles-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 14px; }
.styles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.style {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; cursor: pointer;
  background: var(--stone); border-radius: 16px; overflow: hidden;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.style:hover, .style[aria-pressed="true"] { background: var(--stone-deep); box-shadow: inset 0 0 0 2px var(--ink); }
.style:focus-visible { outline-offset: 2px; }
.style-art { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: visible; }
.style-text { display: block; padding: 4px 62px 16px 18px; position: relative; z-index: 1; }
.style-name { display: block; font-weight: 600; font-size: 1.08rem; letter-spacing: -0.012em; line-height: 1.25; }
.style-desc { display: block; color: var(--ink-2); font-size: 0.93rem; line-height: 1.35; }
.style::after {
  content: ""; position: absolute; right: 14px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper); transition: background 0.2s ease;
}
.style::before {
  content: ""; position: absolute; right: 29px; bottom: 30px; width: 8px; height: 8px; z-index: 2;
  border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg);
  transition: border-color 0.2s ease;
}
.style:hover::after, .style[aria-pressed="true"]::after { background: var(--ink); }
.style:hover::before, .style[aria-pressed="true"]::before { border-color: #fff; }
.skip-style { margin-top: 14px; padding: 6px 0; background: none; border: 0; cursor: pointer; color: var(--ink-2); font-size: 0.98rem; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.skip-style:hover { color: var(--ink); }

@keyframes lay { from { opacity: 0; transform: translateY(-16px); } }
@keyframes pop { from { opacity: 0; } }
.lay { animation: lay 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pop { animation: pop 0.5s ease-out both; }

/* ---------- proof row ---------- */
.proof { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.proof ul { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.proof li { padding: 20px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.proof b { display: block; color: var(--ink); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em; }

/* ---------- how, faq ---------- */
.how, .faq { max-width: var(--wrap); margin: 0 auto; padding: 72px 32px 0; }
.how h2, .faq h2, .band h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 600; letter-spacing: -0.032em; line-height: 1.08; }
.how-list { counter-reset: how; display: grid; gap: 32px; margin-top: 36px; }
.how-list li { counter-increment: how; border-top: 1px solid var(--ink); padding-top: 16px; }
.how-list li::before { content: counter(how); display: block; font-size: 2.6rem; font-weight: 300; line-height: 1; letter-spacing: -0.04em; margin-bottom: 20px; }
.how-list h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.how-list p { color: var(--ink-2); max-width: 36ch; }
.faq { display: grid; gap: 28px; padding-bottom: 88px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.12rem; letter-spacing: -0.01em; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-52%); font-size: 1.6rem; font-weight: 300; color: var(--ink-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 62ch; }

/* ---------- closing band ---------- */
.band { background: var(--ink); color: #fff; padding: 80px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 32px; }
.band .cta:focus-visible { outline-color: #fff; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #a9afb3; border-top: 1px solid #2c3134; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 28px 32px 36px; }
.foot-legal { max-width: 80ch; font-size: 0.86rem; line-height: 1.5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 0.9rem; color: #d7dbde; }
.foot :focus-visible { outline-color: #fff; }
body:not(.home) .foot { margin-top: 0; }

/* ---------- phone bar ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94); border-top: 1px solid var(--rule);
}
.sticky-cta .cta { width: 100%; min-height: 56px; justify-content: space-between; padding: 0 8px 0 24px; font-size: 1.1rem; }
.sticky-cta .cta-arrow { width: 40px; height: 40px; }

/* ---------- match form ---------- */
dialog.match {
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 0; border: 0; border-radius: 22px; background: var(--paper); color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
dialog.match::backdrop { background: rgba(21, 24, 26, 0.6); }
dialog.match form { position: relative; padding: 34px 30px 28px; }
.match-close { position: absolute; right: 12px; top: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--stone); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.match-close:hover { background: var(--stone-deep); }
.pick { display: inline-block; background: var(--stone); border-radius: 999px; padding: 5px 14px; font-size: 0.92rem; color: var(--ink-2); margin-bottom: 16px; }
.pick b { color: var(--ink); font-weight: 600; }
dialog.match h2 { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; padding-right: 36px; }
.match-intro { color: var(--ink-2); margin: 10px 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.field input {
  width: 100%; height: 58px; padding: 0 16px; font: inherit; font-size: 1.15rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid #c9c6c0; border-radius: 14px;
}
.field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--err); }
.err { color: var(--err); font-size: 0.9rem; font-weight: 500; margin-top: 5px; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
dialog.match .cta-full { margin-top: 8px; }
.consent { margin-top: 14px; font-size: 0.78rem; line-height: 1.45; color: var(--ink-2); }
.form-errors { background: #fbebe9; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; color: var(--err); }
.sent { padding: 8px 0 4px; }
.sent p { color: var(--ink-2); margin: 12px 0 24px; }
.sent:focus { outline: none; }
html:not(.js) dialog.match { display: block; position: static; margin: 0 auto 56px; box-shadow: none; border: 1px solid var(--rule); }
html:not(.js) .match-close, html:not(.js) .styles, html:not(.js) [data-open] { display: none; }

/* ---------- text pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 32px 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.doc .doc-date { color: var(--ink-2); margin-bottom: 28px; }
.doc h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; margin: 32px 0 8px; }
.doc p, .doc li { margin-bottom: 10px; max-width: 70ch; color: #33383c; }
.doc ul { list-style: disc; padding-left: 22px; }

/* ---------- admin ---------- */
.admin { padding: 28px 32px 64px; background: var(--stone); min-height: 80vh; }
.admin h1 { font-size: 1.9rem; margin-bottom: 4px; }
.admin h2 { font-size: 1.2rem; font-weight: 600; margin: 28px 0 10px; }
.admin-meta { color: var(--ink-2); margin-bottom: 8px; }
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.funnel-card { background: var(--paper); border-radius: 14px; padding: 18px 20px; }
.funnel-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.funnel-card table { width: 100%; border-collapse: collapse; }
.funnel-card td { padding: 5px 0; border-bottom: 1px solid var(--rule); }
.funnel-card tr:last-child td { border-bottom: 0; }
.funnel-card td:nth-child(2) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel-card td:nth-child(3) { text-align: right; color: var(--ink-2); width: 70px; font-variant-numeric: tabular-nums; }
.admin-table-wrap { overflow-x: auto; background: var(--paper); border-radius: 14px; }
.admin table.leads { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.admin table.leads th, .admin table.leads td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.admin table.leads th { font-weight: 600; white-space: nowrap; }
.admin td form { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.admin select, .admin textarea, .admin td button { font: inherit; font-size: 0.9rem; padding: 6px 8px; border: 1px solid #c9c6c0; border-radius: 8px; background: var(--paper); }
.status { display: inline-block; padding: 1px 10px; border-radius: 10px; background: var(--stone); font-weight: 600; width: fit-content; }
.status-new { background: var(--ink); color: #fff; }
.empty { padding: 32px; color: var(--ink-2); }

/* ---------- wide screens ---------- */
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
  .proof ul { grid-template-columns: repeat(3, 1fr); gap: 40px; border-bottom: 1px solid var(--rule); }
  .proof li { border-bottom: 0; padding: 24px 0; }
  .how-list { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .faq { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; }
  .sticky-cta { display: none; }
}
@media (max-width: 959px) {
  .top { padding: 16px 20px 0; }
  .top-note { display: none; }
  .hero { padding: 28px 20px 44px; gap: 36px; }
  .hero-action .cta { width: 100%; justify-content: space-between; }
  .cta-note { width: 100%; text-align: center; }
  .proof, .how, .faq { padding-left: 20px; padding-right: 20px; }
  .how, .faq { padding-top: 56px; }
  .faq { padding-bottom: 64px; }
  .band { padding: 64px 20px; }
  .band .cta { width: 100%; justify-content: space-between; }
  .foot-in { padding: 24px 20px 110px; }
  .style-text { padding: 2px 12px 14px 14px; }
  .style-name { font-size: 0.98rem; }
  .style-desc { font-size: 0.84rem; }
  .style::after, .style::before { display: none; }
  dialog.match { margin-bottom: 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; }
  dialog.match form { padding: 30px 20px calc(22px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .lay, .pop { animation: none; }
  .cta, .cta-arrow { transition: none; }
}
