/* Growney website: the app's «pocket garden» style (docs/DESIGN.md): warm
   paper, pencil-ink outlines drawn a little unevenly, hard shadows instead of
   soft glows, Rubik for text and Pangolin for the hand-written moments. */

@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/Rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Pangolin";
  src: url("/assets/fonts/Pangolin.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #FAF3E3;
  --surface: #FFFBF2;
  --surface-soft: #F2E6CC;
  --primary: #4F7059;
  --primary-shadow: #3A5442;
  --primary-soft: #DCE6D3;
  --on-primary: #FFFBF2;
  --text: #432E33;
  --muted: #6E5A5F;
  --ink: #432E33;
  --line: rgba(67, 46, 51, .8);
  --goal: #D4AE48;
  --goal-soft: #F4E3B0;
  --goal-text: #432E33;
  --card-shadow: #E6D6B8;
  --grain: .45;
  /* Corners drawn by hand: no two the same. */
  --r-card: 30px 24px 32px 22px / 24px 32px 22px 30px;
  --r-pill: 22px 18px 24px 16px / 18px 24px 16px 22px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #3B3437;
    --surface: #48403F;
    --surface-soft: #544A49;
    --primary: #557A60;
    --primary-shadow: #34503D;
    --primary-soft: #45554A;
    --on-primary: #FFF8EC;
    --text: #F1E5D1;
    --muted: #D3C4B4;
    --ink: #251F21;
    --line: rgba(185, 172, 157, .8);
    --goal: #D4AE48;
    --goal-soft: #594D35;
    --goal-text: #2E2729;
    --card-shadow: #2A2427;
    --grain: .35;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Rubik", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  position: relative;
}
/* The paper's grain, over everything and never in the way. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/assets/img/grain.png") repeat;
  background-size: 128px;
  opacity: var(--grain);
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration-color: var(--goal);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--goal); outline-offset: 3px; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  background: var(--primary);
  color: var(--on-primary);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-weight: 700;
}
.skip:focus { top: 16px; }

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Pangolin", "Rubik", sans-serif;
  font-size: 1.75rem;
  text-decoration: none;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); }
.top-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-nav > a {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-weight: 500;
  text-decoration: none;
}
.top-nav > a:hover { background: var(--surface-soft); }
.langs {
  display: flex;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
}
.langs a {
  padding: 6px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
}
.langs a:hover { color: var(--text); }
.langs a[aria-current="true"] { background: var(--text); color: var(--bg); }

/* Landing */

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  text-wrap: balance;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 32px;
  padding-block: 24px 56px;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 16px;
  border-radius: var(--r-pill);
  background: var(--goal-soft);
  border: 1.5px solid var(--line);
  font-family: "Pangolin", "Rubik", sans-serif;
  font-size: 1.125rem;
  transform: rotate(-1.5deg);
}
.lead { max-width: 34em; margin: 0 0 28px; color: var(--muted); font-size: 1.25rem; }
.hero-art {
  display: grid;
  place-items: center;
  max-width: 100%;
}
.hero-art img { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.pill-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 5px 0 var(--primary-shadow); }
.pill-goal { background: var(--goal); color: var(--goal-text); box-shadow: 0 5px 0 #A88830; }
.pill:active { transform: translateY(5px); box-shadow: none; }

.section { padding-block: 48px; }
.section-head { max-width: 40em; margin: 0 auto 32px; text-align: center; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.125rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}
.card {
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 2.2px solid var(--line);
  box-shadow: 0 4px 0 var(--card-shadow);
}
.card:nth-child(3n+1) { transform: rotate(-.6deg); }
.card:nth-child(3n+3) { transform: rotate(.5deg); }
.card img {
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
  object-fit: contain;
}
.card h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  padding: 28px;
  border-radius: var(--r-card);
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--goal);
  border: 2px solid var(--ink);
  color: var(--goal-text);
  font-family: "Pangolin", "Rubik", sans-serif;
  font-size: 1.5rem;
}
.steps h3 { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; }
.steps p { margin: 0; color: var(--muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-weight: 500;
}
.chips li:nth-child(odd) { transform: rotate(-1deg); }
.chips li:nth-child(even) { transform: rotate(1deg); }

.band {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--r-card);
  background: var(--goal-soft);
  border: 2.2px solid var(--line);
  box-shadow: 0 4px 0 var(--card-shadow);
}
.band img { width: 200px; }
.band h2 { font-family: "Pangolin", "Rubik", sans-serif; font-weight: 400; }
.band p { margin: 0 0 20px; font-size: 1.125rem; }

/* Legal and help pages */

.doc {
  max-width: 820px;
  margin: 8px auto 64px;
  padding: clamp(24px, 5vw, 56px);
  border-radius: var(--r-card);
  background: var(--surface);
  border: 2.2px solid var(--line);
  box-shadow: 0 4px 0 var(--card-shadow);
}
.doc h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); }
.doc h2 { margin: 40px 0 8px; font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.doc h3 { margin: 24px 0 4px; font-size: 1.125rem; font-weight: 700; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 1.25em; }
.doc li + li { margin-top: 6px; }
.updated { margin: 0 0 24px; color: var(--muted); }
.note { margin: 16px 0; padding: 16px 20px; border-radius: var(--r-card); background: var(--surface-soft); border: 1.5px solid var(--line); }
.note p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; min-width: 560px; border-collapse: separate; border-spacing: 0; font-size: .9375rem; }
th, td { padding: 10px 14px; border-bottom: 1.5px dashed var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); font-weight: 700; }
th:first-child { border-radius: 14px 0 0 14px; }
th:last-child { border-radius: 0 14px 14px 0; }

details { margin: 10px 0; padding: 14px 20px; border-radius: var(--r-card); background: var(--surface-soft); border: 1.5px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 700; }
details[open] summary::after { content: "−"; }
details p { margin: 8px 0 4px; }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: var(--r-card);
  background: var(--primary-soft);
  border: 1.5px solid var(--line);
}
.contact p { margin: 0; }

.center { text-align: center; }
.center img { margin: 0 auto 8px; }

/* Footer */

.foot { padding-block: 32px 40px; color: var(--muted); font-size: .9375rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .pill { transition: none; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; width: min(100%, 360px); margin-inline: auto; }
  .lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .band { grid-template-columns: 1fr; text-align: center; }
  .band img { margin-inline: auto; width: 160px; }
  .band .actions { justify-content: center; }
}

/* Apple's own badge, as Apple draws it: never restyled (Apple's guidelines). */
.store-badge { display: inline-flex; align-items: center; }
.store-badge img { height: 53px; width: auto; }
