/* PenPlate site. Colours and type follow the app's design tokens (design/tokens.json):
   jade for actions, apricot for protein, warm oat background, Nunito for display, Inter for text. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --fill: #ece8e0;
  --line: #e2ded5;
  --text: #15201e;
  --text-2: #4b5856;
  --text-3: #5b6764;
  --primary: #0b7268;
  --primary-hover: #095d55;
  --on-primary: #ffffff;
  --primary-soft: #dcf1ec;
  --protein: #e26426;
  --protein-ink: #a3440f;
  --protein-soft: #fde9dc;
  --weight-ink: #5540be;
  --weight-soft: #ece9fc;
  --water-ink: #16609f;
  --water-soft: #dfeffb;
  --rose-ink: #9e2f55;
  --rose-soft: #fbe4eb;
  --hero-1: #0c766b;
  --hero-2: #095459;
  --on-hero: #ffffff;
  --on-hero-2: #ddf5f0;
  --wash: #dcf1ec;
  --bezel: #0c0f0e;
  --shadow-card: 0 1px 2px rgba(21, 32, 30, 0.04), 0 8px 24px rgba(21, 32, 30, 0.06);
  --shadow-phone: 0 40px 80px -20px rgba(9, 84, 89, 0.35), 0 18px 36px -18px rgba(21, 32, 30, 0.35);

  --display: "Nunito", "SF Pro Rounded", ui-rounded, system-ui, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-lg: 28px;
  --radius-md: 18px;
  --page: 1160px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1413;
    --surface: #172120;
    --fill: #27322f;
    --line: #2d3936;
    --text: #f1f5f3;
    --text-2: #b5c2be;
    --text-3: #96a4a0;
    --primary: #5ad6c4;
    --primary-hover: #84e3d5;
    --on-primary: #04302b;
    --primary-soft: #14332f;
    --protein: #ff9a62;
    --protein-ink: #ffb48a;
    --protein-soft: #3b2418;
    --weight-ink: #c6bcff;
    --weight-soft: #272048;
    --water-ink: #8ccbfa;
    --water-soft: #152b3d;
    --rose-ink: #ffa8c0;
    --rose-soft: #3a1c27;
    --hero-1: #0f6f66;
    --hero-2: #0a4a4e;
    --wash: #14332f;
    --bezel: #000000;
    --shadow-card: none;
    --shadow-phone: 0 40px 80px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.i {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.phone picture {
  display: block;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * 20px);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 800 21px/1 var(--display);
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

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

.nav .store-button {
  font-size: 14px;
  padding: 9px 16px;
}

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

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font: 700 16px/1.2 var(--body);
  text-decoration: none;
  white-space: nowrap;
}

.store-button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.store-button.is-soon {
  cursor: default;
}

.nav .store-button {
  background: var(--primary);
  color: var(--on-primary);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-link:hover {
  text-decoration: underline;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 0 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(42% 50% at 74% 45%, var(--wash), transparent 100%);
  z-index: -1;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
}

.hero h1 .accent {
  color: var(--primary);
}

.lede {
  margin-top: 22px;
  font-size: clamp(18px, 2vw, 20px);
  color: var(--text-2);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 32px;
}

.hero-points {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  color: var(--text-2);
  font-size: 15px;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex: none;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 560px;
}

/* ---------- Phones ---------- */

.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 390 / 844;
  padding: 9px;
  border-radius: 50px;
  background: var(--bezel);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  flex: none;
}

.phone::after {
  /* Side button, a small touch of realism. */
  content: "";
  position: absolute;
  right: -3px;
  top: 128px;
  width: 3px;
  height: 64px;
  border-radius: 0 3px 3px 0;
  background: var(--bezel);
}

.phone img,
.phone picture {
  width: 100%;
  height: 100%;
  border-radius: 41px;
  object-fit: cover;
}

.hero-visual .phone-back {
  position: absolute;
  top: 46px;
  left: calc(50% - 250px);
  transform: rotate(-7deg);
  width: 250px;
  border-radius: 45px;
  opacity: 0.98;
}

.hero-visual .phone-back img,
.hero-visual .phone-back picture {
  border-radius: 37px;
}

.hero-visual .phone-front {
  position: absolute;
  top: 0;
  left: calc(50% - 40px);
  transform: rotate(4deg);
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px 11px 11px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 40px -16px rgba(21, 32, 30, 0.35);
  font-size: 14px;
  line-height: 1.25;
  color: var(--text-2);
}

.float-chip strong {
  display: block;
  color: var(--text);
  font: 800 17px/1.2 var(--display);
}

.float-chip .tile {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

.float-chip .tile svg {
  width: 20px;
  height: 20px;
}

.chip-protein {
  left: calc(50% - 300px);
  bottom: 120px;
}

.chip-protein .tile {
  background: var(--protein-soft);
  color: var(--protein-ink);
}

.chip-dose {
  right: calc(50% - 310px);
  bottom: 28px;
}

.chip-dose .tile {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Fact strip ---------- */

.facts {
  padding: 24px 0 8px;
}

.facts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-2);
}

.facts strong {
  display: block;
  color: var(--text);
  font-weight: 650;
}

.icon-tile {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
}

.icon-tile svg {
  width: 20px;
  height: 20px;
}

.t-jade { background: var(--primary-soft); color: var(--primary); }
.t-apricot { background: var(--protein-soft); color: var(--protein-ink); }
.t-iris { background: var(--weight-soft); color: var(--weight-ink); }
.t-sky { background: var(--water-soft); color: var(--water-ink); }
.t-rose { background: var(--rose-soft); color: var(--rose-ink); }

/* ---------- Feature rows ---------- */

.features {
  padding: 72px 0 24px;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-intro h2 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.section-intro p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 19px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 44px 0;
}

.feature + .feature {
  border-top: 1px solid var(--line);
}

.feature-copy {
  max-width: 480px;
}

.feature.reverse .feature-copy {
  order: 2;
  justify-self: start;
}

.feature:not(.reverse) .feature-copy {
  justify-self: end;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text-2);
}

.feature h3 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.feature-copy > p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 18px;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}

.checks li {
  position: relative;
  padding-left: 32px;
  color: var(--text);
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--primary-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230b7268' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 15px no-repeat;
}

.feature-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.feature-visual::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--glow, var(--primary-soft));
  filter: blur(8px);
  opacity: 0.75;
}

.feature-visual .phone {
  width: 270px;
}

.glow-apricot { --glow: var(--protein-soft); }
.glow-iris { --glow: var(--weight-soft); }
.glow-rose { --glow: var(--rose-soft); }

.note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-3);
}

/* ---------- Privacy band ---------- */

.privacy-band {
  margin: 56px 0 0;
}

.privacy-card {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: clamp(32px, 5vw, 64px);
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: var(--on-hero);
}

.privacy-card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.privacy-card h2 {
  font-size: clamp(30px, 4vw, 46px);
  max-width: 16em;
}

.privacy-card > p {
  margin-top: 16px;
  color: var(--on-hero-2);
  font-size: 19px;
  max-width: 38em;
}

.privacy-grid {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.privacy-grid li {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-hero-2);
  font-size: 15px;
  line-height: 1.5;
}

.privacy-grid strong {
  display: block;
  color: var(--on-hero);
  font: 800 18px/1.3 var(--display);
  margin-bottom: 6px;
}

.privacy-card .text-link {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  color: var(--on-hero);
}

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

.faq {
  padding: 88px 0 24px;
}

.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 56px 20px 24px;
  font: 700 18px/1.35 var(--body);
  position: relative;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--fill)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%234b5856' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  transition: transform 0.2s ease;
}

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

.faq details p {
  padding: 0 24px 22px;
  color: var(--text-2);
}

/* ---------- Closing call to action ---------- */

.closing {
  padding: 88px 0 96px;
  text-align: center;
}

.closing img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 26px;
  box-shadow: 0 20px 40px -18px rgba(9, 84, 89, 0.55);
}

.closing h2 {
  font-size: clamp(32px, 4.6vw, 52px);
}

.closing p {
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: 19px;
  max-width: 32em;
}

.closing .cta-row {
  justify-content: center;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  font-size: 14px;
  color: var(--text-3);
}

.site-footer .wrap {
  display: grid;
  gap: 18px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--text);
}

.disclaimer {
  max-width: 80ch;
  line-height: 1.55;
}

/* ---------- Legal and support pages ---------- */

.doc {
  padding: 48px 0 80px;
}

.doc article {
  max-width: 760px;
  margin: 0 auto;
}

.doc h1 {
  font-size: clamp(34px, 5vw, 48px);
}

.doc .updated {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 15px;
}

.doc .summary {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--text);
}

.doc .summary ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.doc h2 {
  font-size: 26px;
  margin-top: 44px;
}

.doc h3 {
  font-size: 19px;
  margin-top: 26px;
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 12px;
  color: var(--text-2);
}

.doc li + li {
  margin-top: 6px;
}

.doc strong {
  color: var(--text);
}

.doc .table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 560px;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}

.doc th {
  color: var(--text);
  font-weight: 650;
  background: var(--fill);
}

.contact-card {
  margin-top: 20px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.contact-card .email {
  font: 800 22px/1.3 var(--display);
  color: var(--text);
  user-select: all;
}

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

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found h1 {
  font-size: clamp(36px, 6vw, 56px);
}

.not-found p {
  margin-top: 14px;
  color: var(--text-2);
}

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

@media (max-width: 980px) {
  .hero .wrap,
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    padding-top: 36px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-copy .lede {
    margin-left: auto;
    margin-right: auto;
  }
  .cta-row,
  .hero-points {
    justify-content: center;
  }
  .hero-visual {
    min-height: 600px;
  }
  .facts ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feature,
  .feature.reverse {
    gap: 36px;
    text-align: left;
  }
  .feature .feature-copy,
  .feature.reverse .feature-copy {
    order: 1;
    justify-self: center;
  }
  .feature-visual {
    order: 2;
  }
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav a:not(.store-button) {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .hero-visual {
    min-height: 470px;
  }
  .phone {
    width: 228px;
    padding: 8px;
    border-radius: 40px;
  }
  .phone img,
  .phone picture {
    border-radius: 33px;
  }
  .hero-visual .phone-back {
    width: 196px;
    left: calc(50% - 178px);
    top: 40px;
    border-radius: 36px;
  }
  .hero-visual .phone-back img,
  .hero-visual .phone-back picture {
    border-radius: 29px;
  }
  .hero-visual .phone-front {
    left: calc(50% - 50px);
  }
  .chip-protein {
    left: 0;
    bottom: 120px;
  }
  .chip-dose {
    right: 0;
    bottom: 12px;
  }
  .float-chip {
    padding: 9px 12px 9px 9px;
    font-size: 13px;
  }
  .float-chip strong {
    font-size: 15px;
  }
  .float-chip .tile {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .facts ul {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-visual .phone {
    width: 236px;
  }
  .feature-visual::before {
    width: 280px;
    height: 280px;
  }
  .nav .store-button {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .checks li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%235ad6c4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  .faq summary::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%23b5c2be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .faq summary::after {
    transition: none;
  }
}
