/* Squigs marketing site. Palette and tone follow ios/DESIGN.md + Theme. */
:root {
  --bg: #F7F3EE;
  --bg-2: #F1EBE3;
  --card: #FFFFFF;
  --card-border: #EDE6DD;
  --ink: #2E2B28;
  --muted: #716960;
  --sage: #7FA48D;
  --sage-ink: #3F7056;
  --blush: #D9979D;
  --lavender: #A99BD6;
  --shadow: 0 1px 2px rgba(46, 43, 40, .04), 0 12px 32px rgba(46, 43, 40, .08);
  --radius: 24px;
  --max: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171514;
    --bg-2: #1D1B19;
    --card: #211F1E;
    --card-border: #2F2C2A;
    --ink: #F2EEE9;
    --muted: #B8B0A7;
    --sage: #94BBA3;
    --sage-ink: #A9CDB7;
    --blush: #E2A9AE;
    --lavender: #BBAEE6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, .carousel:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 12px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--sage-ink); }

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

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--card-border) 70%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 9px; }
.brand.small { font-size: 1.05rem; }
.brand.small img { border-radius: 7px; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav nav { display: none; } }

section { padding: clamp(64px, 10vw, 120px) 16px; }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.sub { color: var(--muted); font-size: 1.12rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .78rem; color: var(--sage-ink); margin-bottom: .8em; }

/* Hero */
.hero {
  position: relative; overflow: visible;
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 32px;
  padding-top: clamp(48px, 8vw, 96px);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; text-align: center; } .cta-row { justify-content: center; } }
.lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 34em; }
@media (max-width: 860px) { .lede { margin-inline: auto; } }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 8px; }
.pill { display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; }
.pill.soon { background: var(--sage-ink); color: #fff; box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .pill.soon { background: #436F58; } }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow span { display: inline-block; transition: transform .25s ease; }
.link-arrow:hover span { transform: translateX(4px); }

.blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; z-index: -1; will-change: transform; }
.b1 { width: 420px; height: 420px; background: var(--sage); top: -120px; right: -80px; opacity: .35; }
.b2 { width: 360px; height: 360px; background: var(--lavender); bottom: -140px; left: 30%; opacity: .3; }
.b3 { width: 260px; height: 260px; background: var(--blush); top: 30%; left: -100px; opacity: .28; }

.hero-pup { margin: 0; }
.pup-stage {
  position: relative; max-width: 520px; margin: 0 auto; display: grid; justify-items: center;
  border-radius: 40px;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--card) 92%, transparent), transparent 70%);
}
#pup-canvas, #pup-fallback { width: 100%; aspect-ratio: 1; height: auto; display: block; }
.pup-button {
  position: relative; margin: 4px auto 0;
  display: grid; justify-items: center; gap: 0;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 10px 22px; min-height: 44px; cursor: pointer;
  font: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pup-button:hover { transform: translateY(-2px); }
.pup-name { font-weight: 800; }
.pup-hint { font-size: .8rem; color: var(--muted); }
.hero-pup figcaption { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* Screens carousel */
.screens { padding-inline: 0; }
.screens .section-head { padding-inline: 16px; }
.carousel {
  display: flex; gap: clamp(20px, 3vw, 36px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 24px max(16px, calc((100vw - var(--max)) / 2)) 48px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel .phone { scroll-snap-align: center; flex: 0 0 auto; width: clamp(220px, 26vw, 280px); }
.carousel-hint { text-align: center; color: var(--muted); font-size: .9rem; margin: 0; }

.phone {
  margin: 0; position: relative;
  border-radius: 44px; padding: 10px;
  background: linear-gradient(145deg, #3a3633, #1c1a19);
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone img { border-radius: 34px; width: 100%; }
.phone figcaption { position: absolute; left: 0; right: 0; bottom: -34px; text-align: center; font-weight: 700; color: var(--muted); font-size: .95rem; }
.float { animation: float 7s ease-in-out infinite; }
.float.d1 { animation-delay: -1.5s; } .float.d2 { animation-delay: -3s; } .float.d3 { animation-delay: -4.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* How it works */
.how { max-width: var(--max); margin: 0 auto; position: relative; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; position: relative; z-index: 1; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow); position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-4px); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; right: 20px; font-weight: 800; color: var(--card-border); font-size: 2rem; line-height: 1; }
.step p { color: var(--muted); margin: 0; }
.step-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.step-icon.sage { background: color-mix(in srgb, var(--sage) 22%, transparent); color: var(--sage-ink); }
.step-icon.lavender { background: color-mix(in srgb, var(--lavender) 24%, transparent); color: #6E5FB0; }
.step-icon.blush { background: color-mix(in srgb, var(--blush) 24%, transparent); color: #B2646B; }
@media (prefers-color-scheme: dark) { .step-icon.lavender { color: var(--lavender); } .step-icon.blush { color: var(--blush); } }
.flow-line { position: absolute; left: 8%; right: 8%; top: 54%; height: 4px; z-index: 0; }
.flow-line span { display: block; height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--sage), var(--lavender), var(--blush), var(--sage)); background-size: 300% 100%; opacity: .35; animation: flow 8s linear infinite; }
@keyframes flow { to { background-position: 300% 0; } }
@media (max-width: 960px) { .flow-line { display: none; } }

/* Dog Fund */
.dogfund { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .dogfund { grid-template-columns: 1fr; } }
.df-visual { position: relative; max-width: 420px; width: 100%; margin: 0 auto; aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: color-mix(in srgb, var(--sage) 16%, var(--card)); stroke-width: 18; }
.ring-fill { fill: none; stroke: url(#ringGrad); stroke-width: 18; stroke-linecap: round; stroke-dasharray: 578; stroke-dashoffset: 578; transition: stroke-dashoffset 2.2s cubic-bezier(.22, .8, .2, 1); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 22%; }
.ring-center img { width: 46%; margin-bottom: 4px; }
.ring-center strong { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; }
.ring-center > span { color: var(--muted); font-size: .9rem; line-height: 1.3; }
.df-copy p { color: var(--muted); }
.compare { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 20px 22px; margin: 22px 0; box-shadow: var(--shadow); }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row span { color: var(--muted); }
.bar { grid-column: 1 / -1; height: 12px; border-radius: 12px; background: color-mix(in srgb, var(--sage) 14%, var(--card)); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 12px; transition: width 1.8s cubic-bezier(.22, .8, .2, 1); }
.bar-earn { background: var(--sage); }
.bar-cost { background: var(--blush); }
.dogfund.in .bar-earn, html:not(.js) .bar-earn { width: 52%; } .dogfund.in .bar-cost, html:not(.js) .bar-cost { width: 100%; }
.note { font-size: .98rem; }

/* Pup */
.pup { max-width: var(--max); margin: 0 auto; }
.pup-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .pup-grid { grid-template-columns: repeat(2, 1fr); } }
.pup-card { margin: 0; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s ease; }
.pup-card:hover { transform: translateY(-4px) rotate(-.4deg); }
.pup-card figcaption { padding: 12px 16px 16px; font-weight: 700; font-size: .95rem; }
.points { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; margin-top: 28px; align-items: stretch; }
@media (max-width: 760px) { .points { grid-template-columns: 1fr; } }
.points-card, .counter { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.points-card p { color: var(--muted); }
.rate { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.rate div { background: color-mix(in srgb, var(--lavender) 16%, var(--card)); border-radius: 16px; padding: 10px 14px; }
.rate dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.rate dd { margin: 0; font-weight: 800; }
.fine { font-size: .85rem; color: var(--muted); }
.counter { display: grid; place-content: center; text-align: center; background: linear-gradient(150deg, color-mix(in srgb, var(--sage) 30%, var(--card)), color-mix(in srgb, var(--lavender) 30%, var(--card)), color-mix(in srgb, var(--blush) 26%, var(--card))); }
.counter-num { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.counter-label { color: var(--muted); font-weight: 600; }

/* Parents */
.parents { max-width: var(--max); margin: 0 auto; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: transform .3s ease; }
.feature:hover { transform: translateY(-4px); }
.feature p { color: var(--muted); margin: 0; }
.devices { display: grid; grid-template-columns: 1fr auto; gap: clamp(20px, 4vw, 48px); align-items: end; margin-top: 56px; }
@media (max-width: 760px) { .devices { grid-template-columns: 1fr; justify-items: center; } }
.tablet { margin: 0; border-radius: 36px; padding: 12px; background: linear-gradient(145deg, #3a3633, #1c1a19); box-shadow: var(--shadow); }
.tablet img { border-radius: 26px; }
.devices .phone { width: clamp(200px, 22vw, 250px); }

/* Privacy */
.privacy-card { max-width: 820px; margin: 0 auto; background: var(--card); border: 1px solid var(--card-border); border-radius: 32px; padding: clamp(28px, 5vw, 52px); box-shadow: var(--shadow); }
.checks { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; color: var(--muted); }
.checks li b { color: var(--ink); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--sage); }
.links { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 700; margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--card-border); background: var(--bg-2); padding: 40px 16px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 6px; justify-items: center; text-align: center; color: var(--muted); }
.footer p { margin: 0; }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.22, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .dogfund .bar-earn { width: 52%; } .dogfund .bar-cost { width: 100%; }
}

/* Above the fold: fade in on load rather than waiting for a scroll reveal. */
.hero-in { animation: hero-in .9s cubic-bezier(.22, .8, .2, 1) both; }
.hero-pup.hero-in { animation-delay: .15s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-in { animation: none; } }

/* Phones: lead with the live pup (smaller) above the headline so it's visible without scrolling. */
@media (max-width: 860px) {
  .hero { padding-top: 12px; gap: 4px; }
  .hero-pup { order: -1; }
  .pup-stage { max-width: 280px; }
  #pup-canvas, #pup-fallback { margin-top: -36px; }
}

/* Carousel controls for desktop: arrows, drag, keyboard. */
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--card-border);
  background: var(--card); color: var(--ink); font-size: 1.3rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .2s ease, opacity .2s ease;
}
.carousel-btn:hover:not(:disabled) { transform: translateY(-2px); }
.carousel-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.carousel { cursor: grab; }
.carousel.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.carousel.dragging img { pointer-events: none; }
