/* ============================================================
   Design tokens
   ============================================================ */
:root {
  color-scheme: light;

  --accent-100: #ffc0a9;
  --accent-300: #ff7b4c;
  --accent-500: #f66e00;
  --accent-600: #f54e00;

  --bg: #f5f5f5;
  --card: #ffffff;
  --card-inset: #f7f7f8;
  --text: #111111;
  --text-2: #6b6b6b;
  --text-3: #9a9a9a;
  --line: #ececec;
  --error: #d92d20;

  --success-top: #2ab868;
  --success-bottom: #1a9d54;
  --success-ring: #178a49;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03), 0 12px 40px rgba(0, 0, 0, 0.06);
  --raised: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(17, 17, 17, 0.08), 0 3px 4px -1px rgba(17, 17, 17, 0.08);
  --raised-hover: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px rgba(17, 17, 17, 0.12), 0 4px 8px -2px rgba(17, 17, 17, 0.12);
  --raised-active: inset 0 1px 2px 0 rgba(17, 17, 17, 0.08), 0 0 0 1px rgba(17, 17, 17, 0.12), 0 1px 2px -1px rgba(17, 17, 17, 0.08);

  --radius-card: 28px;
  --radius-row: 20px;
  --radius-ctl: 14px;
  --gutter: 20px;
  --max: 480px;

  --font-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 720px) {
  :root {
    --max: 560px;
    --radius-card: 32px;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

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

/* ============================================================
   Layout
   ============================================================ */
.page {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 24px var(--gutter) 0;
}

@media (min-width: 720px) {
  .page { padding-top: 56px; }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, #fff, #fcfcfc);
  border-radius: var(--radius-card);
  corner-shape: superellipse(1.6);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(17, 17, 17, 0.08),
    0 3px 4px -1px rgba(17, 17, 17, 0.08),
    0 12px 32px -8px rgba(17, 17, 17, 0.06);
  padding: 24px 20px;
}

@media (min-width: 720px) {
  .card { padding: 28px; }
}

.label {
  display: block;
  margin: 0 0 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-3);
}

.title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.body {
  margin: 8px 0 0;
  color: var(--text-2);
}

/* ============================================================
   Header
   ============================================================ */
.header {
  text-align: center;
  padding-top: 28px;
}

.avatar {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: var(--card-inset);
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line);
}

@media (min-width: 720px) {
  .avatar { width: 88px; height: 88px; }
}

.name {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.identity {
  margin: 8px auto 0;
  max-width: 34ch;
  color: var(--text-2);
}

.icons {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  margin: 24px -20px -24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .icons { margin: 28px -28px -28px; }
}

.icons li { border-left: 1px solid var(--line); }
.icons li:first-child { border-left: 0; }

.icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  color: var(--text);
  transition: color 0.12s ease, background-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.icons a:hover { color: var(--accent-500); }
.icons a:active { background: var(--card-inset); }
.icons li:last-child a { border-bottom-right-radius: var(--radius-card); }
.icons li:first-child a { border-bottom-left-radius: var(--radius-card); }

/* ============================================================
   Newsletter form
   ============================================================ */
.form { margin-top: 20px; }

.form, .form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 720px) {
  .form-row { flex-direction: row; align-items: flex-start; }
  .field { flex: 1 1; }
  .btn-primary[type="submit"] { flex: none; }
}

.field {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-ctl);
  corner-shape: superellipse(1.6);
  overflow: hidden;
  background: var(--card-inset);
  box-shadow: var(--raised);
  transition: box-shadow 0.12s ease;
}

.input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  appearance: none;
}

.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; }

.field:focus-within {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px var(--accent-500), 0 0 0 4px var(--accent-100);
}

.field[data-state="good"],
.field[data-state="good"]:focus-within {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px var(--success-bottom);
}

.field[data-state="good"]:focus-within {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px var(--success-bottom), 0 0 0 4px rgba(42, 184, 104, 0.18);
}

.field[data-state="warn"],
.field[data-state="warn"]:focus-within {
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.9), 0 0 0 1px var(--error);
}

.hint-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.18s ease;
}

.hint-wrap > * { min-height: 0; overflow: hidden; }
.field[data-open] .hint-wrap { grid-template-rows: 1fr; }

.hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 11px 16px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.12s ease;
}

.hint-good { color: var(--success-bottom); }
.hint-warn { color: var(--error); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-ctl);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.7; cursor: default; }

.btn-primary {
  --btn-top: #f66e00;
  --btn-bottom: #f54e00;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--btn-top) 0, var(--btn-bottom) 100%);
  color: #fff;
  border-radius: 14px;
  corner-shape: superellipse(1.6);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.33), 0 0 0 1px #d94300, 0 3px 4px -1px rgba(252, 96, 16, 0.95);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.btn-primary:hover { --btn-top: #ff7b4c; --btn-bottom: #f66e00; }

.btn-primary:active {
  --btn-top: #f05e00;
  --btn-bottom: #e64800;
  transform: scale(0.985);
  box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px #d94300, 0 1px 2px -1px rgba(252, 96, 16, 0.6);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #d94300, 0 0 0 3px #fff, 0 0 0 5px #f54e00, 0 3px 4px -1px rgba(252, 96, 16, 0.6);
}

.btn-primary.btn-success,
.btn-primary.btn-success:hover,
.btn-primary.btn-success:active,
.btn-primary.btn-success:disabled {
  --btn-top: var(--success-top);
  --btn-bottom: var(--success-bottom);
  opacity: 1;
  transform: none;
  cursor: default;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.33), 0 0 0 1px var(--success-ring), 0 3px 4px -1px rgba(26, 157, 84, 0.45);
}

.input:disabled {
  color: var(--text-2);
  opacity: 1;
  -webkit-text-fill-color: var(--text-2);
}

/* ============================================================
   Social proof
   ============================================================ */
.proof-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--text-2);
}

.avatars { display: inline-flex; flex: none; }

.avatars img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--card);
  background: var(--card-inset);
}

.avatars img + img { margin-left: -9px; }

/* ============================================================
   Rows (links)
   ============================================================ */
.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 16px 16px 16px 18px;
  border-radius: var(--radius-row);
  corner-shape: superellipse(1.6);
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: var(--raised);
  transition: box-shadow 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.row:hover { box-shadow: var(--raised-hover); }
.row:active { box-shadow: var(--raised-active); transform: scale(0.99); }

.row-text { flex: 1 1; min-width: 0; }

.row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 7px;
  border-radius: 999px;
  background: var(--card-inset);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.08);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.badge svg { flex: none; }
.badge-short { display: none; }

@media (max-width: 359px) {
  .badge-long { display: none; }
  .badge-short { display: inline; }
}

.row-desc {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-2);
}

.row-chevron {
  flex: none;
  color: var(--text-3);
  transition: color 0.12s ease, transform 0.12s ease;
}

.row:hover .row-chevron {
  color: var(--accent-500);
  transform: translateX(2px);
}

.logo {
  flex: none;
  align-self: flex-start;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: var(--radius-ctl);
  corner-shape: superellipse(1.6);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   Stats tiles
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 359px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

.tiles li {
  padding: 14px 6px;
  text-align: center;
  border-radius: 16px;
  corner-shape: superellipse(1.6);
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: var(--raised);
}

.tiles strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.tiles span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-2);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

@media (min-width: 720px) {
  .actions { flex-direction: row; }
  .actions .btn { flex: 1 1; }
}

/* ============================================================
   Brands marquee
   ============================================================ */
.brands {
  margin: 24px -20px -24px;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .brands { margin: 28px -28px -28px; padding-bottom: 26px; }
}

.brands .proof-line { margin: 0; }

.marquee {
  margin: 14px 0 0;
  padding: 4px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 32px;
  width: max-content;
  margin: 0;
  padding: 0 16px;
  list-style: none;
  animation: marquee 28s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
  white-space: nowrap;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   Social rows
   ============================================================ */
.social { padding: 14px 16px; }

.social-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  corner-shape: superellipse(1.6);
  background: linear-gradient(180deg, #fff, #f6f6f6);
  box-shadow: var(--raised);
}

.social-handle {
  font-size: 15px;
  color: var(--text-2);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex;
  justify-content: center;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-ctl);
  corner-shape: superellipse(1.6);
  background: linear-gradient(180deg, #fff, #fafafa);
  box-shadow: var(--raised);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-500);
}

/* ============================================================
   Utilities
   ============================================================ */
.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;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
