/* PickleCut site. Colors mirror the iPhone app's light and dark themes. */

:root {
  --bg: #F4F6F1;
  --card: #FFFFFF;
  --ink: #17201A;
  --muted: #5E6B62;
  --line: #DDE3DA;
  --soft: #E6EBE3;
  --accent: #D4F27C;
  --accent-ink: #1B231E;
  --night: #1B231E;
  --night-ink: #F4F6F1;
  --night-muted: #9FAEA3;
  --court: #1F5A8C;
  --court-soft: #D9E7F3;
  --court-ink: #163F63;
  --danger: #C2412D;
  --idle: #3A463E;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(23 32 26 / 6%), 0 12px 32px -12px rgb(23 32 26 / 18%);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1411;
    --card: #171E19;
    --ink: #E8EFE9;
    --muted: #94A398;
    --line: #2A342D;
    --soft: #222B25;
    --night: #1E2822;
    --court: #6AA8DC;
    --court-soft: #1C2F40;
    --court-ink: #9CC8EE;
    --danger: #E06A55;
    --idle: #3A463E;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -12px rgb(0 0 0 / 50%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--court);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ---------- Brand ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 6%);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  padding: 5px 13px 6px;
  border-radius: 999px;
  background: var(--night);
  color: var(--night-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wordmark .cut { color: var(--accent); }
.wordmark--small { font-size: 15px; }

@media (prefers-color-scheme: dark) {
  .wordmark { box-shadow: inset 0 0 0 1px var(--line); }
}

/* ---------- Buttons ---------- */

.button {
  --pad: 14px 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--pad);
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgb(27 35 30 / 14%);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.button:hover { filter: brightness(0.97); }
.button:active { transform: translateY(1px); }
.button--small { --pad: 9px 16px; font-size: 15px; }
.button--big { --pad: 16px 28px; font-size: 18px; }
.button--block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

/* ---------- Hero ---------- */

.hero { padding: 40px 0 56px; overflow: hidden; }

.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--court-soft);
  color: var(--court-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--court);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 10.5vw, 68px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.lead {
  margin-top: 18px;
  max-width: 34em;
  color: var(--muted);
  font-size: 19px;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}
.hero-note { color: var(--muted); font-size: 15px; }

.hero-art { margin: 0; }
.hero-art svg {
  width: 100%;
  height: auto;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.art-bg { fill: var(--night); }
.art-court { fill: #1F5A8C; }
.art-lines { stroke: #F4F6F1; stroke-width: 3; fill: none; opacity: 0.9; }
.art-net { stroke: #F4F6F1; stroke-width: 5; stroke-linecap: round; opacity: 0.55; }
.art-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 2 12;
}
.art-ball { fill: var(--accent); }
.art-keep { fill: var(--accent); }
.art-skip { fill: var(--idle); }
.art-end { fill: var(--accent); opacity: 0.45; }
.art-cut { stroke: var(--night-muted); stroke-width: 2; stroke-dasharray: 4 5; opacity: 0.7; }
.art-mark { color: var(--accent); }
.art-pill { fill: #2B362F; }
.art-word {
  fill: var(--night-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.art-word-cut { fill: var(--accent); }

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section--soft { background: var(--soft); }
.section--night { background: var(--night); color: var(--night-ink); }

.section-title {
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  max-width: 20em;
  text-wrap: balance;
}

.features {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.feature {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.feature h3 { font-size: 20px; margin-top: 14px; }
.feature p { margin-top: 6px; color: var(--muted); }

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
}
.feature-icon svg,
.privacy-mark {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 20px 20px 72px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--night);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 900;
}
.steps h3 { font-size: 19px; }
.steps p { margin-top: 4px; color: var(--muted); }

.privacy-band {
  display: grid;
  gap: 20px;
  align-items: start;
}
.privacy-band h2 {
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.privacy-band p {
  margin-top: 12px;
  max-width: 36em;
  color: var(--night-muted);
  font-size: 18px;
}
.privacy-mark {
  width: 56px;
  height: 56px;
  padding: 12px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Waitlist ---------- */

.join:focus { outline: none; }

.join-inner {
  display: grid;
  gap: 28px;
  align-items: start;
}
.join-copy > p { margin-top: 14px; color: var(--muted); max-width: 32em; }
.join-copy strong { color: var(--ink); }

.privacy-note {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--court-soft);
  color: var(--court-ink) !important;
  font-size: 15px;
}
.privacy-note a { font-weight: 700; }

.card {
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.form-card { padding: 22px; }

.form { display: grid; gap: 18px; }

.field { margin: 0; padding: 0; border: 0; min-width: 0; }

.field > label,
.field > legend {
  display: block;
  padding: 0;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 16px;
}
.req, .opt {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input[type="email"],
input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 17px; /* 16px+ keeps iOS Safari from zooming */
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input::placeholder { color: var(--muted); opacity: 0.8; }

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--court);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--court) 22%, transparent);
}

.error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}
.error:empty { display: none; }

.field.is-invalid input { border-color: var(--danger); }

.form-error {
  color: var(--danger);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}
.form-error:empty { display: none; }

/* Invisible Turnstile widget: keep its empty container out of the form grid. */
.cf-turnstile { position: absolute; }

/* Honeypot: off-screen for people, still present for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
.is-loading .button { cursor: progress; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { padding: 12px 4px; text-align: center; }
.success:focus { outline: none; }
.success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}
.success-mark circle { fill: var(--accent); }
.success-mark path {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-title { font-size: 26px; font-weight: 900; }
.success-body { margin-top: 10px; color: var(--muted); }
.success-body strong { color: var(--ink); word-break: break-all; }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq .section-title { margin-bottom: 20px; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card);
  font-weight: 800;
}
.faq details[open] summary::after { content: "−"; background: var(--accent); color: var(--accent-ink); }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 40em; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.footer-inner {
  display: grid;
  gap: 16px;
}
.footer-inner p { margin-top: 8px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-inner nav a { font-weight: 600; color: var(--ink); }
.copyright { margin: 0 !important; }

/* ---------- Plain pages (privacy, 404, form results) ---------- */

.plain-main { padding-top: 48px; padding-bottom: 72px; }

.prose { max-width: 720px; }
.prose h1 {
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 900;
  letter-spacing: -0.035em;
}
.prose .updated { margin-top: 10px; color: var(--muted); font-size: 15px; }
.prose h2 { margin-top: 40px; font-size: 24px; font-weight: 800; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .summary {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.status {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 24px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.status h1 { font-size: clamp(28px, 7vw, 36px); font-weight: 900; }
.status p { margin-top: 12px; color: var(--muted); }
.status strong { color: var(--ink); word-break: break-all; }
.status ul { text-align: left; color: var(--danger); font-weight: 600; margin: 14px auto 0; max-width: 24em; }
.status .note { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink); }
.status .button { margin-top: 12px; }
.status--error h1 { color: var(--danger); }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .wrap { padding: 0 32px; }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 30px; }
  .privacy-band { grid-template-columns: auto 1fr; gap: 28px; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: end; }
  .copyright { grid-column: 1 / -1; }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .section { padding: 96px 0; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 72px 22px 22px; }
  .steps li::before { top: 22px; left: 22px; }
  .join-inner { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .join-copy { position: sticky; top: 100px; }
}
