/* Tended — the site. Colours and type are the app's (ios/Tended/Design/Theme.swift). */

@font-face { font-family: "Marcellus"; src: url("fonts/Marcellus-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-VF.woff") format("woff"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-Italic-VF.woff") format("woff"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --table: #172A1E;
  --table-lift: #243B2B;
  --table-deep: #0E1A12;
  --on-table: #E6EDE0;
  --on-table-soft: #9DB39C;
  --paper: #F7F3E9;
  --paper-deep: #EDE6D4;
  --ink: #1F2B23;
  --ink-soft: #4A5A4D;
  --rule: #B9C2B5;
  --frame: #2F4A36;
  --ripe: #F2C14E;
  --leaf-gold: #D2A03A;
  --leaf-keyline: #F7E7BE;
  --leaf-ink: #3A2808;
  --sun: #A9760A;
  --sun-bright: #E8BE62;
  --water: #1B6478;
  --water-bright: #7FC4D8;
  --wood: #5A3E2B;
  --soil: #2B2119;
  --soil-light: #3D2E22;

  --display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(16px, 5vw, 48px);
  --measure: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.4, .5, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--table); color: var(--on-table);
  font-family: var(--body); font-size: 19px; line-height: 1.55;
  font-variant-numeric: oldstyle-nums; overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--leaf-keyline); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--ripe); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: .005em; text-wrap: balance; }
.sub, .head p, .price-note, .marquee-note { text-wrap: pretty; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* a soft light from above, and the faintest grain */
.glow { position: absolute; inset: 0 0 auto; height: 1100px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 55% at 50% 0%, rgba(98,140,96,.30), transparent 70%),
              radial-gradient(40% 35% at 85% 20%, rgba(210,160,58,.10), transparent 70%); }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- header: a floating frosted bar ---------- */
.top { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; padding: 0 var(--gutter); pointer-events: none; }
.bar {
  pointer-events: auto; max-width: calc(var(--measure) - 2 * var(--gutter)); margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 7px 7px 7px 10px; border-radius: 999px;
  background: rgba(23,42,30,.55); border: 1px solid rgba(230,237,224,.10);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.top.scrolled .bar { background: rgba(14,26,18,.78); border-color: rgba(230,237,224,.14); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-table); font-family: var(--display); font-size: 21px; line-height: 1; flex: 0 0 auto; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: flex; gap: 4px; margin-left: auto; }
.bar nav a { color: var(--on-table-soft); text-decoration: none; font-size: 17px; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.bar nav a:hover { color: var(--on-table); background: rgba(230,237,224,.07); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--paper); color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s; flex: 0 0 auto;
}
.cta:hover { color: var(--ink); background: #fff; transform: translateY(-1px); }
@media (max-width: 760px) {
  .bar nav a:not(.keep) { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(120px, 18vh, 170px); text-align: center; overflow-x: clip; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(230,237,224,.16); background: rgba(230,237,224,.05); color: var(--on-table-soft);
  font-size: 16px; line-height: 1.3;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf-gold); box-shadow: 0 0 10px var(--leaf-gold); }
.hero h1 { font-size: clamp(40px, 8.4vw, 96px); line-height: 1.02; margin: 22px auto 0; max-width: 11.5em; letter-spacing: -.005em; }
.hero h1 .soft { display: block; color: var(--on-table-soft); }
.hero .sub { margin: 22px auto 0; max-width: 31em; font-size: clamp(19px, 2.1vw, 22px); color: var(--on-table); opacity: .92; }
.store { margin-top: 30px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
/* Until the app is live this is a quiet "coming soon" plate; swap in Apple's official badge then. */
.soon {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 14px;
  border: 1px solid rgba(230,237,224,.22); background: rgba(14,26,18,.6); color: var(--on-table); font-size: 17px;
}
.soon svg { width: 18px; height: 18px; fill: currentColor; }

/* three phones, fanned */
.stage { position: relative; height: clamp(400px, 50vw, 620px); margin-top: clamp(40px, 6vw, 72px); perspective: 1600px;
  clip-path: inset(-400px -100vw 0 -100vw); /* the phones sink below the fold line, never into the next section */ }
.phone {
  position: absolute; left: 50%; top: 0; width: clamp(200px, 27vw, 330px); margin: 0;
  border-radius: clamp(26px, 3.6vw, 46px); padding: clamp(5px, .7vw, 8px); background: #0B140E;
  box-shadow: 0 0 0 1px rgba(230,237,224,.12), 0 40px 80px -20px rgba(0,0,0,.7), 0 10px 30px rgba(0,0,0,.35);
  will-change: transform;
}
.phone img { width: 100%; height: auto; aspect-ratio: 598 / 1300; object-fit: cover; border-radius: clamp(21px, 3vw, 39px); background: var(--table-deep); }
.phone.mid { z-index: 3; transform: translateX(-50%); }
.phone.left { z-index: 2; transform: translateX(-118%) translateY(9%) rotate(-7deg) scale(.88); opacity: .9; }
.phone.right { z-index: 2; transform: translateX(18%) translateY(9%) rotate(7deg) scale(.88); opacity: .9; }
.stage::after { /* the phones sink into the dark below */
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -2px; height: 45%; z-index: 4; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--table) 88%);
}
@media (max-width: 640px) {
  .stage { height: 104vw; }
  .phone { width: 56vw; }
  .phone.left { transform: translateX(-104%) translateY(10%) rotate(-8deg) scale(.82); }
  .phone.right { transform: translateX(4%) translateY(10%) rotate(8deg) scale(.82); }
}

.js .stage { animation: stageIn 1.4s var(--ease) .35s both; }
@keyframes stageIn { from { opacity: 0; transform: translateY(60px); } }

/* ---------- sections ---------- */
section.block { position: relative; padding-top: clamp(72px, 11vw, 140px); }
section.block.tight { padding-top: clamp(24px, 4vw, 48px); }
section.block.after-hero { padding-top: clamp(32px, 5vw, 64px); }
.head { text-align: center; max-width: 40em; margin: 0 auto clamp(30px, 5vw, 52px); }
.head h2 { font-size: clamp(36px, 5.6vw, 60px); line-height: 1.06; margin-top: 18px; }
.head h2 .soft { color: var(--on-table-soft); }
.head p { margin-top: 14px; color: var(--on-table-soft); font-size: clamp(19px, 2vw, 21px); }

/* how to play: four steps */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 24px); }
.step {
  position: relative; border-radius: 22px; overflow: hidden; background: rgba(14,26,18,.55);
  border: 1px solid rgba(230,237,224,.09); display: flex; flex-direction: column;
  transition: transform .5s var(--ease), border-color .3s;
}
.step:hover { transform: translateY(-3px); border-color: rgba(230,237,224,.18); }
.step .pic { aspect-ratio: 16 / 10; overflow: hidden; background: var(--table-deep); }
.step .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.step:hover .pic img { transform: scale(1.03); }
.step .txt { padding: 22px 24px 26px; }
.step .num { font-family: var(--display); color: var(--leaf-gold); font-size: 16px; letter-spacing: .14em; }
.step h3 { font-size: clamp(25px, 2.6vw, 30px); margin: 4px 0 8px; }
.step p { color: var(--on-table); opacity: .88; }
.step b { font-weight: 600; color: var(--leaf-keyline); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

/* ---------- the plants, drifting by ---------- */
.marquee { position: relative; overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 16px; width: max-content; animation: drift 90s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(calc(-50% - 8px)); } }
.plant { flex: 0 0 auto; width: 132px; margin: 0; border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.plant img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }
.plant figcaption { font-family: var(--display); color: var(--ink); text-align: center; font-size: 16px; padding: 6px 0 8px; }
.marquee-note { text-align: center; color: var(--on-table-soft); font-style: italic; margin-top: 18px; padding: 0 var(--gutter); }

/* ---------- ways to play ---------- */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 24px); }
.mode { border-radius: 22px; overflow: hidden; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); transition: transform .5s var(--ease); }
.mode:hover { transform: translateY(-4px); }
.mode .pic { aspect-ratio: 4 / 3; overflow: hidden; }
.mode .pic img { width: 100%; height: 100%; object-fit: cover; }
.mode .txt { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.mode h3 { font-size: 28px; color: var(--frame); }
.mode p { margin-top: 6px; color: var(--ink-soft); }
.tag-pill { align-self: flex-start; margin-top: auto; padding-top: 14px; font-size: 13px; letter-spacing: .1em; line-height: 1.6; text-transform: uppercase; font-weight: 500; }
.tag-pill span { display: inline-block; padding: 3px 10px; border-radius: 999px; }
.tag-pill .free { background: #E2EADF; color: #2F4A36; }
.tag-pill .whole { background: #F4E6C4; color: #6B4A08; }
.price-note { text-align: center; color: var(--on-table-soft); margin: 26px auto 0; max-width: 36em; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } .mode .pic { aspect-ratio: 16 / 9; } }

/* ---------- see it in action ---------- */
.film { display: flex; flex-direction: column; align-items: center; }
.film-frame {
  position: relative; width: min(100%, 560px); aspect-ratio: 4 / 5; border-radius: 28px; overflow: hidden;
  background: var(--paper); box-shadow: 0 40px 90px -30px rgba(0,0,0,.75), 0 0 0 1px rgba(247,231,190,.25);
}
.film-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.sound {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1px solid rgba(47,74,54,.25); background: rgba(247,243,233,.86); color: var(--frame);
  font: inherit; font-size: 16px; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .2s, transform .15s var(--ease);
}
.sound:hover { background: #fff; }
.sound:active { transform: scale(.96); }
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; stroke: none; }
.sound .on { display: none; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }
.film-store { margin-top: 26px; }

/* ---------- sign-up ---------- */
.plate-card {
  position: relative; max-width: 720px; margin: 0 auto; background: var(--paper); color: var(--ink); border-radius: 26px;
  padding: clamp(32px, 6vw, 56px) clamp(22px, 6vw, 56px); text-align: center; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  overflow: hidden;
}
.plate-card h2 { position: relative; font-size: clamp(32px, 5vw, 46px); color: var(--frame); line-height: 1.08; margin-top: 16px; }
.plate-card > p { position: relative; margin: 12px auto 26px; max-width: 28em; color: var(--ink-soft); }
.plate-card .eyebrow { position: relative; color: var(--ink-soft); border-color: var(--rule); background: rgba(47,74,54,.05); }
.signup { position: relative; display: flex; gap: 8px; max-width: 470px; margin: 0 auto; padding: 6px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule), 0 8px 20px -8px rgba(31,43,35,.25); }
.signup input[type=email] { flex: 1; min-width: 0; min-height: 48px; font: inherit; font-size: 18px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); }
.signup input[type=email]:focus { outline: none; }
.signup:focus-within { box-shadow: inset 0 0 0 2px var(--frame), 0 8px 20px -8px rgba(31,43,35,.25); }
.signup input[type=email]::placeholder { color: #8A8478; }
.signup button { min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--frame); color: var(--paper); font: inherit; font-size: 18px; cursor: pointer; white-space: nowrap; transition: background .2s, transform .15s; }
.signup button:hover { background: #24402D; }
.signup button:active { transform: scale(.97); }
.signup button[disabled] { opacity: .6; cursor: wait; }
.form-note { position: relative; font-size: 16px; color: var(--ink-soft); margin-top: 14px; min-height: 1.5em; }
.form-note.err { color: #9A3B2B; }
.form-note.ok { color: var(--frame); font-weight: 600; }
@media (max-width: 480px) {
  .signup { flex-direction: column; border-radius: 22px; }
  .signup button { width: 100%; }
}

/* ---------- help ---------- */
.help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 22px); }
.help article { background: rgba(14,26,18,.5); border: 1px solid rgba(230,237,224,.09); border-radius: 22px; padding: 24px 26px; }
.help h3 { font-size: 24px; color: var(--leaf-keyline); margin-bottom: 8px; }
.help p + p { margin-top: 10px; }
.path { font-weight: 600; color: var(--on-table); }
.placeholder { background: rgba(242,193,78,.16); border: 1px dashed var(--ripe); border-radius: 6px; padding: 0 6px; color: var(--ripe); font-style: normal; }
@media (max-width: 720px) { .help { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer { margin-top: clamp(80px, 11vw, 140px); padding: 28px 0 40px; border-top: 1px solid rgba(230,237,224,.09); color: var(--on-table-soft); font-size: 16px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
footer .brand { font-size: 18px; color: var(--on-table-soft); }
footer .brand img { width: 26px; height: 26px; border-radius: 6px; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--on-table-soft); text-decoration: none; }
footer a:hover { color: var(--on-table); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero .reveal { transition-duration: 1.1s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .marquee .track, .js .stage { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- the privacy page ---------- */
.doc { position: relative; max-width: 760px; margin: 0 auto; padding: 116px var(--gutter) 0; }
.doc .paper { background: var(--paper); color: var(--ink); border-radius: 24px; padding: clamp(28px, 6vw, 60px); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6); }
.doc h1 { font-size: clamp(36px, 6vw, 50px); color: var(--frame); line-height: 1.1; }
.doc .date { font-style: italic; color: var(--ink-soft); margin: 8px 0 28px; }
.doc h2 { font-size: 24px; color: var(--frame); margin: 30px 0 6px; }
.doc p + p { margin-top: 12px; }
.doc a { color: var(--water); }
.doc .sign { margin-top: 32px; font-style: italic; }
.doc .placeholder { color: #7A5A06; background: #F4E6C4; border-color: var(--sun); }
.doc h3 { font-family: var(--body); font-weight: 600; font-size: 19px; color: var(--ink); margin: 18px 0 4px; }
.doc ul { margin: 10px 0 0; padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.doc ul + p, .doc p + ul, .doc .table-wrap + p { margin-top: 12px; }
.doc b { font-weight: 600; }
.doc .summary { margin: 26px 0 8px; padding: 6px 24px 22px; border-radius: 16px; background: var(--paper-deep); }
.doc .summary h2 { margin-top: 18px; }
.doc .table-wrap { overflow-x: auto; margin-top: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--rule); }
.doc th { font-weight: 600; color: var(--frame); }
.doc td:nth-child(2) { white-space: nowrap; }
.doc .credit { margin-top: 18px; font-size: 14px; color: var(--ink-soft); }

/* ---------- small phones ---------- */
@media (max-width: 400px) {
  body { font-size: 18px; }
  .eyebrow { font-size: 14px; padding: 5px 12px; }
  .soon { font-size: 16px; padding: 0 16px; white-space: nowrap; }
  .brand { font-size: 19px; }
  .cta { padding: 0 14px; font-size: 16px; }
  .step .txt, .help article { padding: 20px; }
}
@media (max-width: 360px) {
  .bar nav { display: none; }
  .cta { margin-left: auto; }
}
@media (max-width: 480px) {
  .doc th, .doc td { padding: 8px 6px; }
  .doc .summary { padding: 4px 18px 18px; }
}
