/* Glowy+ — glowyplus.app
   One file, no build step. Tokens mirror the app's design system (Core/Design/Theme.swift).
   Light-first: the product is a soft blush/lavender brand, so light is the default surface. */

:root {
  color-scheme: light dark;

  /* Core palette — from the app's Theme.swift */
  --rose-petal: #F4C7D7;
  --soft-blush: #F9DCE6;
  --soft-lavender: #E9DDF7;
  --dusty-mauve: #C88FA3;
  --muted-berry: #B76E8A;
  --deep-plum: #5E3A4D;
  --sage-mist: #DDECE4;
  --champagne: #F3E7DD;

  /* Surfaces */
  --bg-deep: #FFF7FA;
  --bg-base: #FFF7FA;
  --bg-grad-end: var(--soft-lavender);
  --text: #3B2130;
  --text-muted: rgba(59, 33, 48, 0.74);
  --text-faint: rgba(59, 33, 48, 0.62);

  /* Accent that is safe as text on the current surface (>=4.5:1 on #FFF7FA) */
  --accent-text: #A3586F;

  /* Semantic */
  --positive: #4F7F60;
  --caution: #B4763F;
  --avoid: #C05561;

  /* Gradients */
  --gradient-action: linear-gradient(to top right, var(--muted-berry), var(--dusty-mauve), #B49BD8);
  --gradient-aurora: radial-gradient(120% 80% at 50% 0%, var(--soft-lavender) 0%, #FFF1F6 55%, var(--bg-deep) 100%);

  /* Glass */
  --glass-fill: rgba(94, 58, 77, 0.045);
  --glass-border: rgba(94, 58, 77, 0.13);
  --radius-card: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 48px rgba(94, 58, 77, 0.13);

  /* Type scale */
  --fs-display: clamp(2.75rem, 6vw, 4.5rem);
  --fs-h2: clamp(2rem, 4vw, 3rem);
  --fs-h3: clamp(1.35rem, 2.2vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1.6vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;
  --section-pad: clamp(var(--space-64), 10vw, var(--space-128));
  --content-max: 1120px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-deep: #1B191C;
    --bg-base: #211F24;
    --text: #F5F0F2;
    --text-muted: rgba(245, 240, 242, 0.72);
    --text-faint: rgba(245, 240, 242, 0.60);
    --accent-text: #F0B4C8;
    --gradient-aurora: radial-gradient(120% 80% at 50% 0%, #322A38 0%, #211F24 60%, #1B191C 100%);
    --glass-fill: rgba(255, 255, 255, 0.055);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.5);
    --gradient-action: linear-gradient(to top right, #E89AB5, #F0B4C8, #C8B4E8);
  }
}

/* ---------- Base ---------- */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-deep);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--gradient-aurora);
}

html { scroll-behavior: smooth; }

::selection { background: var(--rose-petal); color: #3B2130; }

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 1px var(--space-8);
  white-space: nowrap;
}

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

h1, h2, h3 { margin: 0 0 var(--space-16); line-height: 1.15; }

h1 {
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 { font-size: var(--fs-h3); font-weight: 700; }

p { margin: 0 0 var(--space-16); max-width: 68ch; }

a { color: var(--accent-text); text-underline-offset: 3px; }

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.section { padding-block: var(--section-pad); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: 1.6;
}

.eyebrow {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--space-12);
}

.grad-text {
  background: var(--gradient-action);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-color-scheme: dark) {
  .grad-text {
    /* Lighter stops so large text keeps 3:1 on the dark surface */
    background: linear-gradient(to top right, #F0B4C8, #E8C4DC, #CBB4EC);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: var(--space-16);
  z-index: 100;
  padding: var(--space-12) var(--space-16);
  background: var(--bg-base);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  transform: translateY(-200%);
}

.skip-link:focus-visible { transform: none; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-fill);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg-base); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  flex-wrap: wrap;
  padding-block: var(--space-12);
}

.brand {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 600;
}

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

/* ---------- Pills & buttons ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: var(--glass-fill);
  color: var(--accent-text);
  font-weight: 600;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}

.pill::before {
  content: "";
  width: var(--space-8);
  height: var(--space-8);
  border-radius: 50%;
  background: var(--positive);
  flex: none;
}

.btn {
  display: inline-block;
  padding: var(--space-12) var(--space-32);
  border-radius: var(--radius-pill);
  background: var(--gradient-action);
  color: #FFFFFF;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.1); }

.text-link { font-weight: 600; }

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

.hero { padding-block: var(--section-pad) var(--space-64); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-48);
  align-items: center;
}

.hero-copy .lead { margin-block: var(--space-24); }

.phone-shot picture { display: block; }

.phone-shot img {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}

/* ---------- Split section ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-48);
  align-items: center;
}

/* ---------- Points (dl) ---------- */

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-24);
  margin: var(--space-32) 0 0;
}

.point dt { font-weight: 700; margin-bottom: var(--space-4); }

.point dd { margin: 0; color: var(--text-muted); }

/* ---------- Cards ---------- */

.card {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

@supports not (backdrop-filter: blur(1px)) {
  /* Light-first fallback: an opaque surface stands in for the blur. */
  .card { background: #FFFFFF; }
  @media (prefers-color-scheme: dark) {
    .card { background: #353238; }
  }
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-24);
  list-style: none;
  margin: var(--space-48) 0 0;
  padding: 0;
}

.feature-card { padding: var(--space-24); }

.feature-card .feature-img {
  border-radius: calc(var(--radius-card) - 8px);
  border: 1px solid var(--glass-border);
  margin-bottom: var(--space-24);
}

.feature-card h3 { margin-bottom: var(--space-8); }

.feature-card p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- FAQ ---------- */

.faq-wrap h2 { margin-bottom: var(--space-32); }

.faq-item {
  margin-bottom: var(--space-16);
  padding: var(--space-16) var(--space-24);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.125rem;
  padding-block: var(--space-8);
}

.faq-item summary:hover { color: var(--accent-text); }

.faq-item p { color: var(--text-muted); margin: var(--space-8) 0; }

/* ---------- Prose (privacy, terms, support) ---------- */

.prose { max-width: 760px; }

.prose h1 { margin-bottom: var(--space-8); }

.prose .updated {
  color: var(--text-faint);
  font-size: var(--fs-small);
  margin-bottom: var(--space-48);
}

.prose section { margin-bottom: var(--space-48); }

.prose h2 { font-size: var(--fs-h3); margin-bottom: var(--space-12); }

.prose p { color: var(--text-muted); }

.prose .lead { margin-bottom: var(--space-48); }

/* ---------- 404 ---------- */

.not-found { text-align: center; }

.not-found p { margin-inline: auto; }

.not-found .btn { margin-top: var(--space-16); }

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

.site-footer {
  border-top: 1px solid var(--glass-border);
  padding-block: var(--space-48);
  margin-top: var(--space-96);
}

.footer-inner { display: grid; gap: var(--space-16); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a { font-weight: 600; text-decoration: none; }

.footer-links a:hover { text-decoration: underline; }

.footer-contact { color: var(--text-muted); font-size: var(--fs-small); margin: 0; }

.footer-copyright { color: var(--text-faint); font-size: var(--fs-small); margin: 0; }

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

@media (max-width: 820px) {
  .hero-inner,
  .split { grid-template-columns: 1fr; }

  .split-shot { order: -1; }

  .phone-shot img { max-width: 300px; }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Glowy+ additions ---------- */

.brand-plus { color: var(--muted-berry); }
@media (prefers-color-scheme: dark) { .brand-plus { color: var(--darkAccent, #F0B4C8); } }

.locale-link {
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.locale-link:hover { background: var(--glass-fill); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-16);
  margin-top: var(--space-24);
}
.cta-note { font-size: var(--fs-small); color: var(--text-muted); }

/* Apple's App Store badge. The rules it has to satisfy are in scripts/build.js next to
   storeCta(); the ones that show up here are: at least 40px tall onscreen (54px, which also
   clears the 44px touch target), a quarter of the badge height of clear space on every side,
   and no modification — so no scale, rotate, filter or opacity transition on the badge itself.
   The focus ring is offset so it sits outside the badge rather than over it. */
.cta-badge {
  --badge-h: 54px;
  display: inline-block;
  /* Clear space: one quarter of the badge height, on all four sides. */
  margin: calc(var(--badge-h) / 4);
  margin-left: 0;
  border-radius: 8px;
  line-height: 0;
}
.cta-badge img {
  height: var(--badge-h);
  width: auto;
  display: block;
}
.cta-badge:focus-visible {
  outline: 3px solid var(--accent-strong, #B76E8A);
  outline-offset: 4px;
}
@media (max-width: 480px) {
  .cta-badge { --badge-h: 48px; }
}

.note {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: var(--space-24);
}

/* Verdict list — mirrors the four verdicts the app actually returns. */
.verdicts {
  list-style: none;
  margin: var(--space-32) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-12);
}

.verdict {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-12);
  align-items: baseline;
  padding: var(--space-12) var(--space-16);
  border-radius: 14px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-left-width: 4px;
}

.verdict-label {
  font-weight: 700;
  font-size: var(--fs-small);
  white-space: nowrap;
}
.verdict-body { color: var(--text-muted); font-size: var(--fs-small); }

.verdict-great { border-left-color: var(--positive); }
.verdict-great .verdict-label { color: var(--positive); }
.verdict-caution { border-left-color: var(--caution); }
.verdict-caution .verdict-label { color: var(--caution); }
.verdict-notpriority { border-left-color: var(--dusty-mauve); }
.verdict-notpriority .verdict-label { color: var(--text-muted); }
.verdict-avoid { border-left-color: var(--avoid); }
.verdict-avoid .verdict-label { color: var(--avoid); }

@media (prefers-color-scheme: dark) {
  .verdict-great .verdict-label { color: #A8C5B0; }
  .verdict-great { border-left-color: #A8C5B0; }
  .verdict-caution .verdict-label { color: #F5C4A1; }
  .verdict-caution { border-left-color: #F5C4A1; }
  .verdict-avoid .verdict-label { color: #E8909A; }
  .verdict-avoid { border-left-color: #E8909A; }
}

/* Comparison — the wedge, stated plainly. */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-24);
  margin-top: var(--space-48);
}

.compare-col { padding: var(--space-32); }
.compare-col h3 { margin-bottom: var(--space-16); }
.compare-col ul { margin: 0; padding-left: 1.1em; }
.compare-col li { margin-bottom: var(--space-12); color: var(--text-muted); }
.compare-col li::marker { color: var(--text-faint); }

.compare-them { opacity: 0.86; }
.compare-us {
  border-color: var(--dusty-mauve);
  box-shadow: 0 18px 48px rgba(184, 110, 138, 0.18);
}
.compare-us li::marker { color: var(--muted-berry); }
@media (prefers-color-scheme: dark) {
  .compare-us { border-color: #F0B4C8; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5); }
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: var(--space-48) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-32);
}

.step h3 { margin-bottom: var(--space-8); }
.step p { color: var(--text-muted); margin: 0; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-action);
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: var(--space-16);
}

.footer-disclaimer {
  font-size: var(--fs-small);
  color: var(--text-faint);
  max-width: 60ch;
}

/* ---------- Founder story ---------- */

.founder-wrap { max-width: 780px; }

.founder-quote {
  margin: var(--space-32) 0 0;
  padding: var(--space-32);
  border-radius: var(--radius-card);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--dusty-mauve);
}

.founder-quote p {
  font-size: var(--fs-lead);
  line-height: 1.55;
  margin-bottom: var(--space-16);
}

.founder-quote cite {
  font-style: normal;
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--accent-text);
}

/* Draft marker — deliberately ugly. Placeholder copy must never ship unnoticed. */
.is-draft { outline: 3px dashed var(--avoid); outline-offset: -12px; }

.draft-banner {
  display: inline-block;
  margin: 0 0 var(--space-24);
  padding: var(--space-8) var(--space-16);
  border-radius: 8px;
  background: var(--avoid);
  color: #FFFFFF;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Four feature cards read better as a 2x2 than as 3+1 with a hole in the row. */
@media (min-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card .feature-img { max-width: 320px; }
}

/* ---------- Skincare-order guide (/ordem-do-skincare/, /en/skincare-order/) ---------- */

/* The picker hides steps with the `hidden` attribute; several of these blocks are flex/grid,
   which would otherwise win over the UA's `[hidden] { display: none }`. */
[hidden] { display: none !important; }

.guide-narrow { max-width: 820px; }

.guide-answer-section { padding-block: var(--section-pad) var(--space-32); }

/* The answer-first block: the direct answer, before any preamble. */
.guide-answer {
  max-width: none;
  font-size: var(--fs-lead);
  line-height: 1.65;
  padding: var(--space-24) var(--space-32);
  border-radius: var(--radius-card);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--dusty-mauve);
}

.guide-answer strong { color: var(--text); }
.lead strong { color: var(--text); }

/* ---------- The routine picker ---------- */

.order-tool {
  display: grid;
  gap: var(--space-32);
  margin-top: var(--space-32);
}

@media (min-width: 900px) {
  .order-tool {
    grid-template-columns: minmax(240px, 300px) 1fr;
    align-items: start;
  }
}

.order-picker {
  min-width: 0;
  margin: 0;
  padding: var(--space-24);
  border-radius: var(--radius-card);
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
}

.order-picker legend {
  padding-inline: var(--space-8);
  font-weight: 700;
}

.order-hint {
  font-size: var(--fs-small);
  color: var(--text-faint);
  margin: var(--space-8) 0 var(--space-16);
}

.order-options { display: grid; gap: var(--space-4); }

.order-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-8);
  border-radius: 12px;
  font-size: var(--fs-small);
  cursor: pointer;
}

.order-option:hover { background: var(--glass-fill); }

.order-option input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--muted-berry);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-16) 0 0;
}

.order-btn {
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent-text);
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  cursor: pointer;
}

.order-btn:hover { background: var(--glass-fill); }

.order-results { display: grid; gap: var(--space-32); }

@media (min-width: 700px) {
  .order-results { grid-template-columns: repeat(2, 1fr); }
}

.order-column { min-width: 0; }

.order-column h3 { margin-bottom: var(--space-16); }

/* Numbering is a CSS counter on purpose: a hidden step generates no box, so the remaining
   steps renumber themselves with no JavaScript involved. */
.order-list {
  list-style: none;
  counter-reset: glowystep;
  display: grid;
  gap: var(--space-12);
  margin: 0;
  padding: 0;
}

.order-step {
  counter-increment: glowystep;
  display: flex;
  align-items: flex-start;
  gap: var(--space-16);
  padding: var(--space-16);
  border-radius: 18px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
}

.order-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-action);
  color: #FFFFFF;
  font-size: var(--fs-small);
  font-weight: 700;
}

.order-num::before { content: counter(glowystep); }

.order-step-body { min-width: 0; }

.order-step-body h4 {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.3;
}

.order-step-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-small);
}

.order-badge {
  display: inline-block;
  margin-left: var(--space-8);
  padding: 1px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: 1px;
}

.order-empty {
  margin: 0;
  color: var(--text-faint);
  font-size: var(--fs-small);
}

/* ---------- What the guide is honest about ---------- */

.debate-grid {
  display: grid;
  gap: var(--space-24);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: var(--space-32);
}

.debate-card { padding: var(--space-24); }

.debate-card h3 {
  font-size: 1.1875rem;
  margin-bottom: var(--space-8);
}

.debate-card p {
  margin: 0;
  color: var(--text-muted);
}
