/* ==========================================================================
   Pawmodoro marketing site — design tokens
   Palette pulled directly from the app's own theme system
   (src/features/focus/themes.ts): Danny (cream, default), Benny (slate),
   Teddy (gold). Amber is the app's real notification accent color.
   ========================================================================== */

:root {
  --cream: #ede8de;
  --cream-shadow: #d9c8ab;
  --ink: #2b2620;
  --ink-soft: rgba(43, 38, 32, 0.62);
  --ink-faint: rgba(43, 38, 32, 0.32);

  --slate: #303540;
  --slate-shadow: #0c0e13;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.68);

  --gold: #deb735;
  --gold-shadow: #e6b619;

  --amber: #e0a458;
  --amber-deep: #c07d34;

  /* live theme surface — swapped by js/main.js when a companion is picked */
  --surface: var(--cream);
  --surface-shadow: var(--cream-shadow);
  --on-surface: var(--ink);
  --on-surface-soft: var(--ink-soft);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --content-width: 1120px;
  --gutter: clamp(20px, 5vw, 64px);

  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.7s var(--ease-soft), color 0.7s var(--ease-soft);
  overflow-x: hidden;
}

/* Only Benny is a dark theme (isLight: false in the app's
   src/features/focus/themes.ts) — Danny and Teddy both use dark ink on a
   light background, so only Benny gets white ink here. */
body[data-theme="benny"] {
  --on-surface: var(--white);
  --on-surface-soft: var(--white-soft);
}

/* The dial's bevel is a direct translation of the app's own bevel recipe
   (src/components/soft-ui/soft-surface.tsx SHADOW_STEPS/HIGHLIGHT_STEPS):
   three near-zero-blur shadow layers at shrinking offset (7/5/3px) and
   three highlight layers (5/3.5/2px), stacked to fake a soft edge without
   ever reading as a diffuse glow. Offsets are fixed px regardless of
   element size in the app too, so every dial layer (outer/face/knob)
   shares the exact same box-shadow value. Plain rgba on purpose — this
   box-shadow silently fails to paint with color-mix()/color() values in
   some engines even though it resolves fine in computed style. */
body[data-theme="danny"] {
  --surface: var(--cream);
  --surface-shadow: var(--cream-shadow);
  --dial-bevel:
    7px 7px 1px 0 rgba(217, 200, 171, 0.5),
    5px 5px 1px 0 rgba(217, 200, 171, 0.55),
    3px 3px 1px 0 rgba(217, 200, 171, 0.6),
    -5px -5px 1px 0 rgba(255, 255, 255, 0.7),
    -3.5px -3.5px 1px 0 rgba(255, 255, 255, 0.8),
    -2px -2px 1px 0 rgba(255, 255, 255, 0.9);
}
body[data-theme="benny"] {
  --surface: var(--slate);
  --surface-shadow: var(--slate-shadow);
  --dial-bevel:
    7px 7px 1px 0 rgba(12, 14, 19, 0.55),
    5px 5px 1px 0 rgba(12, 14, 19, 0.6),
    3px 3px 1px 0 rgba(12, 14, 19, 0.68),
    -5px -5px 1px 0 rgba(255, 255, 255, 0.14),
    -3.5px -3.5px 1px 0 rgba(255, 255, 255, 0.17),
    -2px -2px 1px 0 rgba(255, 255, 255, 0.2);
}
body[data-theme="teddy"] {
  --surface: var(--gold);
  --surface-shadow: var(--gold-shadow);
  --dial-bevel:
    7px 7px 1px 0 rgba(230, 182, 25, 0.5),
    5px 5px 1px 0 rgba(230, 182, 25, 0.55),
    3px 3px 1px 0 rgba(230, 182, 25, 0.6),
    -5px -5px 1px 0 rgba(255, 255, 255, 0.6),
    -3.5px -3.5px 1px 0 rgba(255, 255, 255, 0.7),
    -2px -2px 1px 0 rgba(255, 255, 255, 0.8);
}

h1, h2, h3, h4 {
  font-family: "Fredoka", "Inter", sans-serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2.5px solid var(--amber-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--on-surface) 10%, transparent);
  transition: background-color 0.7s var(--ease-soft), border-color 0.7s var(--ease-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
}

.brand img { width: 32px; height: 32px; border-radius: 50%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.78;
  transition: opacity 0.2s ease;
}
.nav-links a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  padding: 6px;
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px var(--gutter) 24px;
    background: var(--surface);
    border-bottom: 1px solid color-mix(in srgb, var(--on-surface) 10%, transparent);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease-soft), transform 0.25s var(--ease-soft);
  }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Buttons & badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft);
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
body[data-theme="benny"] .btn-primary,
body[data-theme="teddy"] .btn-primary {
  background: var(--on-surface);
  color: var(--surface);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0,0,0,0.35); }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid color-mix(in srgb, var(--on-surface) 22%, transparent);
  font-size: 0.92rem;
  cursor: default;
}
.store-badge svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.25; }
.store-badge-text small { font-size: 0.72rem; opacity: 0.65; }
.store-badge-text strong { font-size: 0.92rem; font-weight: 600; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 64px var(--gutter) 40px;
  overflow: hidden;
}

.hero-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 48px;
  align-items: center;
}

.hero-eyebrow-mark {
  width: 46px; height: 46px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  max-width: 15ch;
}

.hero-sub {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--on-surface-soft);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-dog-dock {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 22px;
}

.hero-dog {
  width: min(44%, 168px);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.12));
}
body[data-theme="benny"] .hero-dog {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.4)) brightness(0) invert(1);
}
body[data-theme="teddy"] .hero-dog {
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.18));
}

@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.hero-dog { animation: breathe 5.5s ease-in-out infinite; }

/* -- the dial itself: an exact recreation of the app's soft-ui dial
   (src/components/soft-ui/circular-dial.tsx + dial-time-picker.tsx) —
   two concentric raised "soft" circles plus a paw-print knob riding the
   ring, rather than a generic progress-ring/clock-face treatment. */
.dial-outer {
  position: relative;
  width: min(84%, 300px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--dial-bevel);
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.dial-outer:active { cursor: grabbing; }

.dial-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--dial-bevel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dial-minutes {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-variant-numeric: tabular-nums;
  color: var(--on-surface);
  line-height: 1;
}
.dial-minutes-label {
  margin-top: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--on-surface-soft);
}

.dial-knob {
  --knob-angle: 97.08deg; /* matches 25 minutes on the real 1-90 range, before JS takes over */
  position: absolute;
  width: 19%;
  height: 19%;
  left: calc(50% + sin(var(--knob-angle)) * 39.5%);
  top: calc(50% - cos(var(--knob-angle)) * 39.5%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--dial-bevel);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: left 0.12s var(--ease-soft), top 0.12s var(--ease-soft);
}
.dial-outer.is-dragging .dial-knob { transition: none; }
.dial-knob svg { width: 62%; height: 62%; }

/* ==========================================================================
   Companion picker
   ========================================================================== */

.section { padding: 96px var(--gutter); }
.section-head {
  max-width: 620px;
  margin: 0 0 48px;
}
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--on-surface-soft);
}

.companions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.companion-card {
  position: relative;
  text-align: left;
  padding: 26px 22px 24px;
  border-radius: var(--radius-lg);
  border: 1.5px solid color-mix(in srgb, var(--on-surface) 14%, transparent);
  background: color-mix(in srgb, var(--on-surface) 4%, transparent);
  transition: border-color 0.3s var(--ease-soft), transform 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft);
}
.companion-card:hover { transform: translateY(-4px); }
.companion-card[aria-pressed="true"] {
  border-color: var(--on-surface);
  background: color-mix(in srgb, var(--on-surface) 9%, transparent);
}

.companion-swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  margin-bottom: 18px;
  border: 1.5px solid color-mix(in srgb, var(--on-surface) 18%, transparent);
}
.companion-card[data-swatch="danny"] .companion-swatch { background: #ede8de; }
.companion-card[data-swatch="benny"] .companion-swatch { background: #303540; }
.companion-card[data-swatch="teddy"] .companion-swatch { background: #deb735; }

.companion-card h3 { font-size: 1.2rem; margin-bottom: 3px; }
.companion-breed {
  font-size: 0.88rem;
  color: var(--on-surface-soft);
  margin-bottom: 14px;
  display: block;
}
.companion-desc { font-size: 0.94rem; color: var(--on-surface-soft); }

.companion-check {
  position: absolute;
  top: 22px; right: 20px;
  width: 22px; height: 22px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s var(--ease-soft), transform 0.25s var(--ease-soft);
}
.companion-card[aria-pressed="true"] .companion-check {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 760px) {
  .companions { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Features — editorial rows, not a card grid
   ========================================================================== */

.feature-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 28px;
  padding: 36px 0;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 12%, transparent);
}
.feature-row:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-surface) 12%, transparent); }

.feature-icon {
  width: 44px; height: 44px;
  stroke: var(--on-surface);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-copy h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.feature-copy p {
  color: var(--on-surface-soft);
  max-width: 60ch;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .feature-row { grid-template-columns: 44px minmax(0,1fr); gap: 18px; }
}

/* ==========================================================================
   How it works
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--on-surface) 5%, transparent);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--on-surface);
  color: var(--surface);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--on-surface-soft); font-size: 0.95rem; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Privacy strip (mini callout before footer)
   ========================================================================== */

.privacy-strip {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 44px var(--gutter);
  margin: 0 var(--gutter) 96px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--on-surface) 6%, transparent);
}
.privacy-strip h3 { font-size: 1.3rem; margin-bottom: 10px; }
.privacy-strip p { color: var(--on-surface-soft); max-width: 56ch; }

@media (max-width: 700px) {
  .privacy-strip { grid-template-columns: 1fr; text-align: left; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
  padding: 56px var(--gutter) 40px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 12%, transparent);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand { max-width: 360px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--on-surface-soft); font-size: 0.94rem; }

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-surface-soft);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.95rem;
  opacity: 0.85;
}
.footer-col a:hover { opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--on-surface) 10%, transparent);
  font-size: 0.85rem;
  color: var(--on-surface-soft);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive — hero
   ========================================================================== */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin: 0 auto; order: -1; }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-page {
  padding: 64px var(--gutter) 100px;
}
.legal-header { max-width: 720px; margin: 0 auto 48px; }
.legal-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.legal-header .updated {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--on-surface-soft);
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
}
.legal-body h2 {
  font-size: 1.3rem;
  margin-top: 42px;
  margin-bottom: 14px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li {
  color: var(--on-surface-soft);
  font-size: 1rem;
  margin-bottom: 14px;
}
.legal-body ul { padding-left: 22px; margin: 0 0 14px; }
.legal-body strong { color: var(--on-surface); font-weight: 600; }
.legal-body a { color: var(--on-surface); text-decoration: underline; text-underline-offset: 3px; }

.legal-toc {
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--on-surface) 5%, transparent);
  font-size: 0.92rem;
}
.legal-toc h2 { font-size: 0.85rem; margin-bottom: 10px; color: var(--on-surface-soft); font-family: "Inter", sans-serif; font-weight: 600; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.legal-toc li { margin-bottom: 6px; }
.legal-toc a { opacity: 0.85; }
.legal-toc a:hover { opacity: 1; }

@media (max-width: 600px) {
  .legal-toc ol { columns: 1; }
}
