/* ==========================================================================
   StashCash landing page
   Mobile first. Breakpoints: 640px (large phone / small tablet), 960px (desktop)
   ========================================================================== */

:root {
  --lime: #C8F23A;
  --lime-dark: #B4DC26;
  --ink: #111111;
  --ink-2: #3A3A3A;
  --ink-3: #5C5C5C;      /* secondary text, 6.6:1 on off-white */
  --paper: #FAFAF7;
  --white: #FFFFFF;
  --gold: #F5C542;
  --line: #E7E7E1;
  --tint: #F2F2EC;
  --error: #B42318;

  --font-head: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(17,17,17,.04), 0 2px 8px rgba(17,17,17,.04);
  --shadow: 0 2px 6px rgba(17,17,17,.04), 0 12px 32px rgba(17,17,17,.07);
  --shadow-lg: 0 8px 20px rgba(17,17,17,.08), 0 30px 60px rgba(17,17,17,.12);

  --gutter: 20px;
  --header-h: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.cta-dark :focus-visible,
.site-footer :focus-visible,
.card-dark :focus-visible { outline-color: var(--lime); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow { max-width: 760px; }

/* ---------- Type ---------- */
h1, h2, .room-total, .app-total-value {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
h1 { font-size: clamp(2.6rem, 10.5vw, 4.9rem); }
h2 { font-size: clamp(2rem, 7.5vw, 3.25rem); max-width: 18ch; }
h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

.kicker {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.section-sub { margin-top: 14px; color: var(--ink-3); }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.625rem;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.logo > span { display: inline-flex; align-items: center; }
.logo-c {
  /* the "C" of Cash: black circle with a lime £ inside */
  display: inline-grid;
  place-items: center;
  font-size: .64em;          /* size of the £ glyph */
  width: 1.36em; height: 1.36em;  /* circle = ~0.87 of the wordmark size */
  margin: 0 .04em 0 .08em;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  line-height: 1;
  padding-top: .04em;
}
.site-footer .logo { color: var(--white); font-size: 1.875rem; }
.site-footer .logo-c { background: var(--lime); color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font: 700 1.0625rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: .9375rem; border-radius: 12px; }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: 0 1px 0 rgba(0,0,0,.08) inset, 0 6px 16px rgba(160, 200, 20, .35); }
.btn-lime:hover { background: var(--lime-dark); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #2a2a2a; }
.btn[disabled] { cursor: progress; opacity: .85; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, .86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

/* ---------- Hero ---------- */
.hero { padding: 28px 0 64px; }
.hero-grid { display: grid; gap: 48px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200, 242, 58, .35); }
.hero h1 { max-width: 12ch; }
.lede {
  margin-top: 20px;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34rem;
}

/* ---------- Forms ---------- */
.signup-form { margin-top: 28px; max-width: 34rem; }
.field-row { display: grid; gap: 10px; }
.signup-form input[type="email"] {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: 500 1.0625rem var(--font-body); /* 17px stops iOS zooming in */
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.signup-form input[type="email"]::placeholder { color: #8A8A85; }
.signup-form input[type="email"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200, 242, 58, .55); }
.signup-form input[aria-invalid="true"] { border-color: var(--error); }
.signup-form .btn { min-height: 56px; width: 100%; }

.form-msg { min-height: 0; margin-top: 10px; font-size: .9375rem; font-weight: 600; }
.form-msg:empty { margin-top: 0; }
.form-msg.is-error { color: var(--error); }
.form-msg.is-info { color: var(--ink); }
.form-note { margin-top: 10px; font-size: .875rem; color: var(--ink-3); }
.live-count { margin-top: 14px; font-size: .9375rem; font-weight: 600; }
.live-count strong { background: var(--lime); padding: 1px 6px; border-radius: 6px; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.signup-form-dark input[type="email"] { border-color: #2C2C2C; background: #1C1C1C; color: var(--white); box-shadow: none; }
.signup-form-dark input[type="email"]::placeholder { color: #9A9A9A; }
.signup-form-dark input[type="email"]:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(200, 242, 58, .25); }
.signup-form-dark .form-note { color: #B5B5B0; }
.signup-form-dark .form-msg.is-error { color: #FF9C8F; }
.signup-form-dark .form-msg.is-info { color: var(--lime); }

/* ---------- Phone mock ---------- */
.hero-visual { margin: 0; display: grid; justify-items: center; gap: 16px; }
.phone {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 9 / 18.4;
  padding: 11px;
  border-radius: 50px;
  background: var(--ink);
  box-shadow: var(--shadow-lg), 0 0 0 2px #2b2b2b inset;
}
.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 40px;
  background: var(--paper);
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.3;
}
.phone-island {
  position: absolute;
  top: 10px; left: 50%;
  width: 92px; height: 26px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: var(--ink);
}
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 3px 10px 0; font-weight: 700; font-size: 12px; height: 22px; }
.phone-icons { display: inline-flex; gap: 3px; align-items: flex-end; }
.phone-icons i { display: block; width: 4px; background: var(--ink); border-radius: 1px; }
.phone-icons i:nth-child(1) { height: 5px; }
.phone-icons i:nth-child(2) { height: 7px; }
.phone-icons i:nth-child(3) { height: 9px; }

.app-top { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.app-back { font-size: 22px; line-height: 1; width: 20px; }
.app-title { font-weight: 700; font-size: 14px; }
.app-items { font-size: 11px; color: var(--ink-3); font-weight: 600; }

.app-total {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px 10px 12px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--white);
}
.app-total-label { font-size: 12px; color: #CFCFCB; }
.app-total-value { font-size: 46px; color: var(--lime); letter-spacing: -0.04em; }
.app-total-range { font-size: 11px; color: #A9A9A5; }

.app-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 320 / 150; flex: none; }
.app-photo svg { width: 100%; height: 100%; }

.app-list { display: grid; gap: 6px; }
.app-list li {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.app-ico { font-size: 15px; line-height: 1; text-align: center; }
.app-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-price { font-weight: 800; }
.app-more { text-align: center; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.app-cta {
  margin-top: auto;
  text-align: center;
  padding: 11px;
  border-radius: 14px;
  background: var(--lime);
  font-weight: 700;
}

.illustration-label { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-3); text-align: center; }

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.4;
}
.tag-gold { background: var(--gold); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tint { background: var(--tint); }

.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 26px 24px;
}
.card-dark { background: var(--ink); color: var(--white); }
.card-dark p { color: #CFCFCB !important; }

/* How it works */
.steps { display: grid; gap: 16px; margin-top: 36px; counter-reset: none; }
.step h3 { margin-top: 18px; }
.step p { margin-top: 8px; color: var(--ink-3); }
.step-num { color: var(--ink); }
.step-icon, .feature-icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--lime);
  color: var(--ink);
}
.step-icon svg, .feature-icon svg { width: 26px; height: 26px; }

/* Why */
.features { display: grid; gap: 16px; margin-top: 36px; }
.feature h3 { margin-top: 18px; }
.feature p { margin-top: 8px; color: var(--ink-3); }

/* Rooms strip */
.rooms-scroller {
  margin-top: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0 28px;
}
.rooms-scroller::-webkit-scrollbar { display: none; }
.rooms-scroller:focus-visible { outline-offset: -3px; }
.rooms {
  display: flex;
  gap: 14px;
  padding: 0 var(--gutter);
  width: max-content;
}
.room {
  position: relative;
  width: 232px;
  flex: none;
  scroll-snap-align: start;
  padding: 22px 22px 24px;
}
.room .tag { position: absolute; top: 18px; right: 18px; }
.room-emoji { font-size: 34px; line-height: 1; display: block; }
.room h3 { margin-top: 18px; font-size: 1.0625rem; }
.room-total { margin-top: 4px; font-size: 2.75rem; }
.room-meta { margin-top: 8px; font-size: .9375rem; color: var(--ink-3); line-height: 1.45; }

/* FAQ */
.faq { margin-top: 32px; display: grid; gap: 12px; }
.faq details {
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 20px 60px 20px 22px;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  border-radius: var(--r);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 20px; top: 50%;
  width: 28px; height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .25s ease, background-color .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--lime); }
.faq summary:focus-visible { outline-offset: -3px; }
.faq details p { padding: 0 22px 22px; color: var(--ink-2); }
.faq a { font-weight: 600; }

/* Final CTA */
.cta-dark { background: var(--ink); color: var(--white); padding: 88px 0; text-align: center; }
.cta-inner { display: grid; justify-items: center; }
.cta-dark h2 { max-width: 14ch; margin: 0 auto; }
.cta-dark h2 + p { margin-top: 16px; color: #CFCFCB; font-size: 1.125rem; }
.cta-dark .signup-form { width: 100%; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer { background: var(--ink); color: var(--white); border-top: 1px solid #262626; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .9375rem; }
.footer-links a { text-decoration: none; color: #E5E5E0; }
.footer-links a:hover { color: var(--lime); text-decoration: underline; }
.footer-links span { color: #B5B5B0; }
.footer-links .muted { color: #9A9A95; }
.copyright { font-size: .875rem; color: #9A9A95; }

/* ---------- Thank-you dialog ---------- */
.thanks {
  width: min(100% - 24px, 480px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 32px 24px 26px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.thanks::backdrop { background: rgba(17,17,17,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.thanks[open] { animation: pop .28s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.thanks-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--tint);
  font-size: 24px; line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.thanks-badge {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--lime);
}
.thanks-badge svg { width: 30px; height: 30px; }
.thanks h2 { font-size: 2.125rem; max-width: none; }
.thanks-position { margin-top: 10px; font-size: 1.0625rem; color: var(--ink-2); }
.thanks-position strong { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--ink); background: var(--lime); padding: 0 8px; border-radius: 8px; }
.thanks-preview { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF4CF; font-size: .875rem; }
.thanks-share { margin-top: 24px; padding: 20px 16px; border-radius: var(--r); background: var(--white); box-shadow: var(--shadow-sm); }
.thanks-share h3 { font-size: 1.0625rem; }
.thanks-sub { margin-top: 6px; font-size: .9375rem; color: var(--ink-3); }
.ref-link { display: flex; gap: 8px; margin-top: 16px; }
.ref-link input {
  flex: 1; min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: 600 .9375rem var(--font-body);
  color: var(--ink);
}
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.share-btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: 600 .9375rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.share-btn:hover { border-color: var(--ink); }
.share-btn svg { width: 18px; height: 18px; flex: none; }
.share-msg { margin-top: 10px; font-size: .875rem; font-weight: 600; min-height: 1.3em; }

/* ---------- Scroll reveal (subtle) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .thanks[open] { animation: none; }
  .btn, .faq summary::after { transition: none; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 40px 0 80px; }
.legal h1 { font-size: clamp(2.2rem, 8vw, 3.25rem); max-width: none; }
.legal .updated { margin-top: 12px; color: var(--ink-3); font-size: .9375rem; }
.legal .review-note { margin-top: 20px; padding: 14px 16px; border-radius: var(--r-sm); background: #FFF4CF; border: 1px solid var(--gold); font-weight: 600; font-size: .9375rem; }
.legal h2 { font-family: var(--font-body); font-weight: 700; letter-spacing: -0.01em; font-size: 1.25rem; line-height: 1.3; margin-top: 36px; max-width: none; }
.legal p, .legal li { margin-top: 12px; color: var(--ink-2); }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal a { font-weight: 600; }

/* ==========================================================================
   >= 640px
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 32px; --header-h: 72px; }
  .field-row { grid-template-columns: 1fr auto; gap: 8px; }
  .signup-form .btn { width: auto; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: auto 1fr; align-items: center; }
  .footer-links { justify-content: flex-end; }
  .copyright { grid-column: 1 / -1; }
  .share-buttons { grid-template-columns: repeat(4, 1fr); }
  .share-btn { flex-direction: column; gap: 4px; min-height: 64px; font-size: .8125rem; }
  .thanks { padding: 40px 36px 32px; }
}

/* ==========================================================================
   >= 960px
   ========================================================================== */
@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .hero { padding: 56px 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .phone { width: 320px; }
  .section { padding: 112px 0; }
  .features { grid-template-columns: repeat(4, 1fr); }
  .feature, .step { padding: 30px 28px; }
  .rooms { padding: 0 max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); }
  .rooms-scroller { scroll-padding-left: max(var(--gutter), calc((100vw - 1160px) / 2 + var(--gutter))); }
  .room { width: 260px; }
  .cta-dark { padding: 120px 0; }
}
.legal .back-link { margin-top: 28px; }
