/*
  It Girl website. One stylesheet for every page.
  Colours, radii and shadows come from the app's design system
  (ItGirl/DesignSystem/Palettes/Palette+Blush.swift and Tokens/).
  Light mode only, like the app.
*/

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Palette: Blush Sticker */
  --canvas: #FBF3F1;
  --canvas-deep: #F6E9E6;
  --paper: #FFFFFF;
  --ink: #1A1616;
  --ink-secondary: #5E5553;
  --ink-muted: #736865;
  --hairline: #EADFDB;
  --blush: #F4C9CF;
  --rose: #E58FA3;
  --rose-deep: #B0516A;
  --butter: #F6E7B8;
  --matcha: #CFE0BF;
  --sky: #CFE0EE;
  --lilac: #DCD3EE;

  /* Radii */
  --r-photo: 16px;
  --r-card: 20px;
  --r-sheet: 28px;
  --r-row: 28px;
  --r-label: 3px;
  --r-tag: 2px;

  /* Warm two-layer shadows (shadowTint 0x3D2A26) */
  --sh-paper: 0 1px 2px rgba(61, 42, 38, 0.04), 0 4px 16px rgba(61, 42, 38, 0.06);
  --sh-pill: 0 1px 4px rgba(61, 42, 38, 0.05), 0 5px 20px rgba(61, 42, 38, 0.07);
  --sh-sticker: 0 1px 3px rgba(61, 42, 38, 0.10), 0 8px 24px rgba(61, 42, 38, 0.14);
  --sh-float: 0 1px 4px rgba(61, 42, 38, 0.05), 0 8px 28px rgba(61, 42, 38, 0.09);

  /* Type */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --page: 1120px;
  --reading: 680px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Stickers may bleed past the screen edge; the page itself never scrolls sideways. */
main { overflow-x: hidden; overflow-x: clip; }

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

a { color: var(--rose-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 10;
  padding: 10px 18px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  box-shadow: var(--sh-pill);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

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

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

.site-header {
  position: relative;
  z-index: 3;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--sh-paper);
}
.brand span {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.2px;
}
.brand span em { font-style: italic; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-secondary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.7); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: var(--sh-paper); }
@media (max-width: 479px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 8px 9px; font-size: 14.5px; }
  .brand span { font-size: 23px; }
  .brand img { width: 36px; height: 36px; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:active { transform: none; }
}
.btn-dark { background: var(--ink); color: var(--paper); box-shadow: var(--sh-pill); }
.btn-dark:hover { color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--ink); box-shadow: var(--sh-pill); }
.btn-paper:hover { color: var(--ink); }
.btn svg { flex: none; }
.btn small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  opacity: 0.8;
}
.btn .btn-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

/* ---------- Shared type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.4px;
  line-height: 1.04;
  margin: 0;
}
.display em { font-style: italic; }

.tag {
  display: inline-block;
  padding: 5px 10px 4px;
  background: var(--blush);
  color: var(--ink);
  border-radius: var(--r-tag);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  transform: rotate(-3deg);
  box-shadow: var(--sh-paper);
}

.overline {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* A die-cut "sticker": white border, soft warm shadow, a small tilt. */
.sticker-shot {
  margin: 0;
  background: var(--paper);
  padding: 7px;
  border-radius: 30px;
  box-shadow: var(--sh-sticker);
}
.sticker-shot img {
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
}

.paper-label {
  display: inline-block;
  padding: 8px 14px;
  background: var(--paper);
  border-radius: var(--r-label);
  box-shadow: var(--sh-paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 12px rgba(61, 42, 38, 0.12));
}

/* ---------- Landing: hero ---------- */

.hero {
  position: relative;
  padding: 16px 0 56px;
}
.hero .wrap {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-copy { position: relative; z-index: 2; text-align: center; }
.hero-copy .tag { margin-bottom: 18px; }
.hero h1 { font-size: clamp(46px, 12vw, 84px); }
.hero .promise {
  max-width: 30ch;
  margin: 18px auto 28px;
  color: var(--ink-secondary);
  font-size: 19px;
  line-height: 1.5;
}
.hero .fineprint {
  margin: 14px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.hero-art {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 1 / 1.12;
}
.hero-art .sticker-shot { position: absolute; width: 54%; }
.hero-art .shot-a { left: 3%; top: 8%; transform: rotate(-6deg); z-index: 1; }
.hero-art .shot-b { right: 3%; top: 0; transform: rotate(4deg); z-index: 2; }
.hero-art .shot-label {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%) rotate(-2deg);
  white-space: nowrap;
}
.hero-art .deco-bow { width: 26%; left: -6%; top: -4%; z-index: 3; transform: rotate(-14deg); }
.hero-art .deco-matcha { width: 24%; right: -7%; bottom: 10%; z-index: 3; transform: rotate(10deg); }
.hero-art .deco-sparkle { width: 13%; right: 6%; top: -6%; z-index: 3; }

@media (min-width: 900px) {
  .hero { padding: 24px 0 88px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .hero-copy { text-align: left; }
  .hero .promise { margin-left: 0; }
  .hero-art { max-width: 500px; }
}

/* ---------- Landing: features ---------- */

.section { position: relative; padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(36px, 8vw, 54px); }
.section-head p { margin: 14px auto 0; color: var(--ink-secondary); max-width: 46ch; }

.features {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .features > :last-child { grid-column: span 2; }
}
/* Seven cards on three columns: the first and last span two, so rows come out even.
   Wide cards centre their content and get a bigger sticker so they never look empty. */
@media (min-width: 980px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .features > :first-child { grid-column: span 2; }
}
@media (min-width: 640px) {
  .features > :last-child,
  .features > :first-child:is(:nth-last-child(n)) { align-items: center; }
  .features > :last-child img { width: 92px; height: 92px; }
  .features > :last-child p { max-width: 48ch; }
}
@media (min-width: 980px) {
  .features > :first-child img { width: 92px; height: 92px; }
  .features > :first-child p { max-width: 48ch; }
}
@media (min-width: 640px) and (max-width: 979px) {
  .features > :first-child { align-items: flex-start; }
}

.feature {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 20px 22px;
  background: var(--paper);
  border-radius: var(--r-row);
  box-shadow: var(--sh-paper);
}
.feature img {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: contain;
  transform: rotate(-6deg);
  filter: drop-shadow(0 4px 8px rgba(61, 42, 38, 0.12));
}
.feature:nth-child(even) img { transform: rotate(6deg); }
.feature h3 {
  margin: 2px 0 4px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
}
.feature h3 em { font-style: italic; }
.feature p { margin: 0; color: var(--ink-secondary); font-size: 15.5px; line-height: 1.55; }

/* ---------- Landing: peek ---------- */

.peek {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.peek li { position: relative; text-align: center; }
.peek li:nth-child(1) .sticker-shot { transform: rotate(-3.5deg); }
.peek li:nth-child(2) .sticker-shot { transform: rotate(3deg) translateY(18px); }
.peek .paper-label { position: relative; margin-top: -18px; z-index: 2; transform: rotate(2deg); white-space: nowrap; }
@media (max-width: 420px) { .peek .paper-label { font-size: 13.5px; padding: 7px 10px; } }
.peek li:nth-child(2) .paper-label { transform: rotate(-2deg) translateY(18px); }

/* ---------- Landing: promise band ---------- */

.band {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 26px;
  background: var(--paper);
  border-radius: var(--r-sheet);
  box-shadow: var(--sh-paper);
  text-align: center;
}
.band h2 { font-size: clamp(32px, 7vw, 46px); }
.band p { margin: 14px auto 0; max-width: 52ch; color: var(--ink-secondary); }
.band .deco-heart { width: 72px; right: -14px; top: -26px; transform: rotate(12deg); }
.band .deco-candle { width: 64px; left: -12px; bottom: -24px; transform: rotate(-8deg); }

.cta { text-align: center; padding: 64px 0 72px; }
.cta h2 { font-size: clamp(40px, 9vw, 64px); margin-bottom: 26px; }

/* ---------- Inner pages ---------- */

.page-head { padding-top: 20px; padding-bottom: 8px; text-align: center; }
.page-head .tag { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(44px, 11vw, 68px); }
.page-head .lede {
  max-width: 42ch;
  margin: 16px auto 0;
  color: var(--ink-secondary);
  font-size: 18px;
}
.page-head .meta { margin: 14px 0 0; color: var(--ink-muted); font-size: 14px; }

.reading {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 28px var(--gutter) 64px;
}

.toc {
  margin: 0 0 32px;
  padding: 20px 22px;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--sh-paper);
}
.toc h2 {
  margin: 0 0 10px;
  color: var(--ink-muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.toc ol {
  margin: 0;
  padding-left: 22px;
  columns: 1;
  font-size: 15.5px;
  line-height: 1.5;
}
.toc li { margin: 0 0 7px; break-inside: avoid; }
.toc li::marker { color: var(--ink-muted); }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 32px; } }

.prose { overflow-wrap: break-word; }
.prose h2 {
  margin: 44px 0 10px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.2px;
}
.prose h2 em { font-style: italic; }
.prose h3 {
  margin: 28px 0 6px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.prose p, .prose li { color: var(--ink); line-height: 1.65; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--rose-deep); }
.prose strong { font-weight: 600; }
.prose .muted { color: var(--ink-secondary); }

.summary {
  margin: 0 0 8px;
  padding: 22px 22px 8px;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--sh-paper);
}
.summary h2 { margin-top: 0; font-size: 28px; }
.summary ul { padding-left: 20px; }

.table-wrap {
  margin: 8px 0 20px;
  overflow-x: auto;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--sh-paper);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
th, td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}
tr:last-child td { border-bottom: 0; }
th { font-weight: 600; font-size: 13px; color: var(--ink-muted); letter-spacing: 0.4px; text-transform: uppercase; }
td:first-child { font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
  tr:last-child { border-bottom: 0; }
  td { padding: 2px 0; border: 0; white-space: normal; }
  td:first-child { white-space: normal; margin-bottom: 4px; }
  td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--ink-muted);
    font-weight: 600;
  }
}

/* Support */
.contact-card {
  position: relative;
  margin: 0 0 36px;
  padding: 26px 24px;
  background: var(--paper);
  border-radius: var(--r-sheet);
  box-shadow: var(--sh-paper);
  text-align: center;
}
.contact-card h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 32px; font-weight: 400; line-height: 1.1; }
.contact-card h2 em { font-style: italic; }
.contact-card p { margin: 0 auto 18px; max-width: 40ch; color: var(--ink-secondary); }
.contact-card .address { margin: 14px auto 0; font-size: 15px; color: var(--ink-muted); overflow-wrap: anywhere; }
.contact-card .deco-tea { width: 70px; right: -10px; top: -28px; transform: rotate(10deg); }

.faq { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.faq > li {
  padding: 20px 22px 8px;
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--sh-paper);
}
.faq h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.15;
}
.faq p, .faq li li { font-size: 16px; }
.path {
  font-weight: 600;
  white-space: normal;
}

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

.site-footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas-deep);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--ink); font-weight: 500; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0; color: var(--ink-muted); font-size: 14px; }
.site-footer .brand span { font-size: 22px; }
.site-footer .brand img { width: 32px; height: 32px; border-radius: 8px; }
