/* ==========================================================================
   Pupsona — marketing site
   Single stylesheet, no build step, no external dependencies.

   Contrast notes: every foreground/background pair used for text has been
   checked against WCAG AA (4.5:1 for body, 3:1 for large text).
   - --ink on --cream ............ 14.9:1
   - --ink-muted on --cream ...... 5.77:1
   - --brand-800 on --cream ...... 5.73:1
   - white on --brand-800 ........ 5.92:1
   - white on --brand-700 ........ 4.51:1  (lightest stop of the CTA gradient)
   --brand-500/600 are decorative only: fills, glows and borders, never text.
   ========================================================================== */

/* ---------- Custom properties ---------------------------------------- */

:root {
  /* Surfaces */
  --cream: #fffbf3;
  --white: #ffffff;
  --peach: #ffeedc;
  --tan: #f4e4cf;
  --hairline: #f0e2cd;

  /* Brand — light to dark */
  --brand-500: #ff9f45; /* decorative fills only */
  --brand-600: #e8722c; /* decorative / borders */
  --brand-700: #c4551b; /* CTA gradient start  */
  --brand-800: #a8460f; /* text-safe accent    */

  /* Text */
  --ink: #2b2320;
  --ink-muted: #6f6157;
  --brown: #7a5c42;

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(74, 47, 22, 0.06), 0 2px 8px rgba(74, 47, 22, 0.05);
  --shadow-md: 0 6px 20px rgba(74, 47, 22, 0.08);
  --shadow-lg: 0 18px 50px rgba(74, 47, 22, 0.16);
  --shadow-device: 0 30px 70px rgba(74, 47, 22, 0.26);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;

  --measure: 46ch;
  --tap: 44px; /* minimum touch target */
}

/* ---------- Reset ----------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: var(--brand-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--cream);
  /* Soft warm wash, kept very low contrast so text stays legible on it. */
  background-image:
    radial-gradient(60rem 40rem at 12% -10%, rgba(255, 159, 69, 0.16), transparent 60%),
    radial-gradient(48rem 34rem at 105% 8%, rgba(232, 114, 44, 0.13), transparent 62%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility helpers ------------------------------------- */

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--brand-800);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: 50;
  transform: translateY(-200%);
  background: var(--white);
  color: var(--brand-800);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout primitives ----------------------------------------- */

.shell {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* The homepage aims to sit inside one desktop viewport: a flexible hero row
   between a compact header and a compact footer. `dvh` keeps mobile browser
   chrome from cutting the layout off. */
.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.home__main {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(1rem, 3vh, 2.25rem);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 1.6vh, 1.15rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  align-self: flex-start;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--peach);
  border: 1px solid var(--hairline);
  color: var(--brand-800);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-600);
}

.hero__title {
  font-size: clamp(2rem, 1.15rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
  max-width: 15ch;
  text-wrap: balance;
}

.hero__lede {
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  color: var(--ink-muted);
  max-width: var(--measure);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--tap);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn--primary {
  color: var(--white);
  background-image: linear-gradient(180deg, var(--brand-700), var(--brand-800));
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  color: var(--brand-800);
  background: var(--white);
  border-color: var(--hairline);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  transform: translateY(-1px);
  border-color: var(--brand-600);
}

/* ---------- Feature highlights ---------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-2xs);
}

.feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.feature__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--peach);
  border: 1px solid var(--hairline);
  color: var(--brand-800);
}

.feature__icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- Store badges ---------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-2xs);
  scroll-margin-top: 2rem;
}

.stores__link {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stores__link:hover {
  transform: translateY(-2px);
}

.stores__link img {
  width: 148px;
  height: auto;
  border-radius: 10px;
}

/* Highlight ring used by the "Download Now" jump link. */
.stores:target {
  outline: 3px solid var(--brand-600);
  outline-offset: 10px;
  border-radius: var(--radius-md);
}

/* ---------- Device mockup --------------------------------------------- */
/* A decorative CSS device frame. It is not a rendering of any manufacturer's
   product — just a shape to present the screenshot in.
   The screen uses the screenshot's exact intrinsic ratio (1320 x 2868), so the
   image fills it with no stretching and no meaningful crop. */

.stage {
  display: grid;
  place-items: center;
  scroll-margin-top: 2rem;
}

.stage__glow {
  grid-area: 1 / 1;
  width: min(30rem, 92%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 159, 69, 0.35), transparent 62%);
  filter: blur(6px);
}

.device {
  grid-area: 1 / 1;
  position: relative;
  padding: 10px;
  border-radius: 3.2rem;
  background: linear-gradient(155deg, #4a4441, #26211f 42%, #3a3330);
  box-shadow: var(--shadow-device), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Focus/target emphasis for the "See How It Works" jump link. */
.device:target,
.stage:target .device {
  transform: translateY(-6px) scale(1.012);
  box-shadow: var(--shadow-device), 0 0 0 4px rgba(232, 114, 44, 0.45);
}

.device__screen {
  position: relative;
  height: clamp(24rem, 62vh, 40rem);
  aspect-ratio: 1320 / 2868;
  width: auto;
  overflow: hidden;
  border-radius: 2.6rem;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.device__shot {
  width: 100%;
  height: 100%;
  /* Ratios match exactly, so `cover` neither crops nor distorts. */
  object-fit: cover;
  object-position: top center;
}

.device__island {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 31%;
  height: 26px;
  border-radius: var(--radius-pill);
  background: #111;
  z-index: 2;
}

.device__button {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #56504c, #322c2a);
}

.device__button--silence {
  left: -3px;
  top: 15%;
  height: 4%;
}

.device__button--vol-up {
  left: -3px;
  top: 23%;
  height: 8%;
}

.device__button--vol-down {
  left: -3px;
  top: 33%;
  height: 8%;
}

.device__button--power {
  right: -3px;
  top: 25%;
  height: 12%;
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.55);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-md);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-lg);
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--brand-800);
  text-decoration: underline;
}

.site-footer__legal {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- Interior pages (terms / privacy / support) ---------------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-header {
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.72);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

.page-header__back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: var(--space-sm);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}

.page-header__back:hover {
  text-decoration: underline;
}

.page__main {
  flex: 1;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.prose {
  max-width: 68ch;
  margin-inline: auto;
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose h1 {
  font-size: clamp(1.85rem, 1.3rem + 1.8vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.prose h2 {
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: var(--space-xl);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--hairline);
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: var(--space-lg);
}

.prose p,
.prose li {
  color: var(--ink-muted);
}

.prose strong {
  color: var(--ink);
}

.prose ul {
  list-style: disc;
  padding-left: 1.35rem;
}

.prose ul > li + li {
  margin-top: var(--space-2xs);
}

.prose ul li::marker {
  color: var(--brand-600);
}

.page-meta {
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

/* A visible, unmissable draft notice on the legal pages. */
.notice {
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--brand-600);
  border-left-width: 5px;
  border-radius: var(--radius-md);
  background: var(--peach);
  box-shadow: var(--shadow-sm);
}

.notice p {
  color: var(--ink);
}

.notice__title {
  font-weight: 800;
  color: var(--brand-800);
  margin-bottom: var(--space-2xs);
}

/* Support page cards */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.support-card {
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.support-card h2 {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
  font-size: 1.0625rem;
}

.support-card p {
  margin-top: var(--space-xs);
  font-size: 0.9375rem;
}

.contact-panel {
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.contact-panel h2 {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.contact-panel p {
  margin-inline: auto;
  max-width: 44ch;
}

.contact-panel .btn {
  margin-top: var(--space-md);
}

/* ---------- Responsive ------------------------------------------------ */

/* Tablet and below: stack the hero. Scrolling is expected here. */
@media (max-width: 900px) {
  .home {
    min-height: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .hero__copy {
    order: 1;
    align-items: flex-start;
  }

  .stage {
    order: 2;
  }

  .hero__title {
    max-width: 18ch;
  }

  .device__screen {
    height: min(60vh, 30rem);
  }

  .home__main {
    padding-block: var(--space-xl);
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .stores__link img {
    width: 140px;
  }

  .device__screen {
    height: min(56vh, 26rem);
  }

  .device {
    padding: 8px;
    border-radius: 2.6rem;
  }

  .device__screen {
    border-radius: 2.1rem;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Very narrow phones (~320px). */
@media (max-width: 360px) {
  .stores__link img {
    width: 132px;
  }

  .device__screen {
    height: min(52vh, 22rem);
  }
}

/* Short desktop windows: shrink the device before anything else, so the hero
   keeps fitting without the copy becoming unreadable. */
@media (min-width: 901px) and (max-height: 760px) {
  .device__screen {
    height: min(58vh, 30rem);
  }

  .hero__title {
    font-size: clamp(1.75rem, 1rem + 2.2vw, 2.6rem);
  }
}

/* ---------- Motion preferences ---------------------------------------- */

@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;
  }

  .btn:hover,
  .stores__link:hover,
  .device:target,
  .stage:target .device {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------- Print ----------------------------------------------------- */

@media print {
  body {
    background: #fff;
  }

  .page-header,
  .site-footer,
  .skip-link {
    display: none;
  }
}
