/*
 * styles.css — the landing page for Purify.
 *
 * The page borrows the app's own design tokens (src/styles/tokens.css): the same
 * surfaces, text levels, radii and Nunito, so the site and the product read as
 * one thing. Green means "safe to clean" and amber means "Check First" here,
 * exactly as they do in the app; neither is used as decoration.
 *
 * Type is larger than the app's: the app is a 13 px window, this is a page read
 * at arm's length, so the steps are scaled up and the ratio between them kept.
 *
 * Nunito itself sits in fonts.css.
 */

:root {
  color-scheme: light;

  --text-primary: #2e2d2b;
  --text-secondary: #64625e;

  --surface-base: #f6f5f3;
  --surface-card: #ffffff;

  --fill-secondary: #efedea;
  --fill-secondary-hover: #e8e6e2;

  --border-subtle: #e6e3df;
  --border-strong: #d5d2cd;

  --action-primary: #353431;
  --action-primary-hover: #42403d;
  --on-action-primary: #ffffff;

  --status-safe-text: #1f7a35;
  --status-safe-fill: #e6f4ea;
  --status-check-text: #8a5300;
  --status-check-fill: #faeeda;

  --shot-shadow: 0 1px 2px rgba(46, 45, 43, 0.06), 0 14px 34px rgba(46, 45, 43, 0.1);

  --font: "Nunito Variable", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shell: 980px;
  --gutter: 24px;
  --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --text-primary: #eceae6;
    --text-secondary: #a6a39d;

    --surface-base: #171615;
    --surface-card: #1e1d1c;

    --fill-secondary: #282725;
    --fill-secondary-hover: #2f2e2c;

    --border-subtle: #302f2d;
    --border-strong: #3d3b38;

    --action-primary: #eceae6;
    --action-primary-hover: #f6f4f1;
    --on-action-primary: #171615;

    --status-safe-text: #5fd36b;
    --status-safe-fill: #1b2e22;
    --status-check-text: #f2b84b;
    --status-check-fill: #332910;

    --shot-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 44px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.08;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.18;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--status-safe-text);
  outline-offset: 2px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  border-radius: var(--radius-md);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav > a:not(.button) {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
}

.nav > a:not(.button):hover {
  background: var(--fill-secondary);
  color: var(--text-primary);
}

.nav > .button {
  margin-left: 10px;
}

.menu-button {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--action-primary);
  color: var(--on-action-primary);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}

.button:hover {
  background: var(--action-primary-hover);
}

.button-quiet {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.button-quiet:hover {
  background: var(--fill-secondary);
  border-color: var(--border-strong);
}

.button-small {
  min-height: 38px;
  padding: 0 18px;
  font-size: 15px;
}

/* Safety tags, the app's own chips */

.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-check {
  background: var(--status-check-fill);
  color: var(--status-check-text);
}

/* Hero */

.hero {
  padding-top: 76px;
}

.lede {
  max-width: 58ch;
  margin-bottom: 28px;
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.shot {
  margin: 0;
}

.shot-hero {
  margin-top: 44px;
}

.frame {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
  box-shadow: var(--shot-shadow);
}

.frame img {
  display: block;
  width: 100%;
}

/* The hero loop is 16:9 and fills the frame edge to edge; the width/height
 * attributes carry the same ratio, so the frame holds its shape before the
 * first frame arrives and nothing letterboxes. */
.frame video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface-card);
}

figcaption {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* What it clears */

.clears {
  padding-top: 104px;
}

.section-lede {
  max-width: 62ch;
  color: var(--text-secondary);
}

.rows {
  display: grid;
  gap: 72px;
  margin-top: 48px;
}

.row-block {
  display: grid;
  gap: 24px;
  align-items: start;
}

.row-text p {
  color: var(--text-secondary);
}

/* Safety */

.safety {
  margin-top: 104px;
  padding: 72px 0;
  background: var(--surface-card);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.safety-inner {
  display: grid;
  gap: 32px;
  align-items: start;
}

.safety-text p {
  color: var(--text-secondary);
}

.checks,
.includes {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.checks li,
.includes li {
  position: relative;
  padding-left: 30px;
}

.checks li::before,
.includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 19px;
  height: 19px;
  border-radius: var(--radius-pill);
  background: var(--status-safe-fill);
}

.checks li::after,
.includes li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 7px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--status-safe-text);
  border-bottom: 2px solid var(--status-safe-text);
  transform: rotate(42deg);
}

/* Pricing */

.pricing {
  padding-top: 104px;
}

.price-card {
  max-width: 620px;
  margin-top: 36px;
  padding: 28px 30px 30px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.includes {
  margin-top: 0;
}

.price-row {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.price-figure {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.012em;
}

/* The regular price, still shown while the launch price runs. */
.price-was {
  margin-right: 8px;
  color: var(--text-secondary);
  font-size: 20px;
  font-weight: 700;
}

.price-buy {
  margin-top: 12px;
}

/* The checkout button is a form submit, not a link. Same look either way. */
button.button {
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
  appearance: none;
}

/* Questions */

.faq {
  padding-top: 104px;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 36px;
}

.faq details {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0 22px;
}

.faq details[open] {
  background: var(--fill-secondary);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 140ms ease-out;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq details p {
  margin: -2px 0 20px;
  max-width: 72ch;
  color: var(--text-secondary);
}

/* Footer */

.footer {
  margin-top: 104px;
  padding: 36px 0 56px;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.footer-brand img {
  border-radius: var(--radius-sm);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-right: auto;
}

.footer-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer .meta {
  margin: 0;
  font-weight: 600;
}

/* Wider screens: text beside the screenshots, the app's own two column rhythm */

@media (min-width: 860px) {
  .row-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 32px;
  }

  .safety-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
  }

  .safety-inner > .shot {
    order: -1;
  }
}

/* Phones: one column, targets at 44 px, no chrome that overflows */

@media (max-width: 780px) {
  body {
    font-size: 16px;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav {
    display: none;
    margin: 0;
  }

  .nav[data-open] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-height);
    gap: 2px;
    padding: 12px var(--gutter) 16px;
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav[data-open] > a:not(.button) {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 16px;
  }

  .nav[data-open] > .button {
    margin: 10px 0 0;
    justify-content: center;
  }

  .hero {
    padding-top: 48px;
  }

  .clears,
  .pricing,
  .faq {
    padding-top: 72px;
  }

  .safety {
    margin-top: 72px;
    padding: 56px 0;
  }

  .footer {
    margin-top: 72px;
  }

  .button-small {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }
}
