@charset "utf-8";
/* Garden Circuit Instruments — shared styles. Colors and type follow Brand Standards v1.0. */

/* ---------- Fonts: self-hosted (SIL Open Font License, see assets/fonts/OFL-*.txt) ---------- */

/* Familjen Grotesk, latin */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/familjen-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Familjen Grotesk, latin-ext */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Young Serif, latin */
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/young-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Young Serif, latin-ext */
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/young-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #1e1c19;
  --oat: #e5decf;
  --moss: #56663a;
  --clay: #a3624f;
  --pollen: #b58c39;
  --patina: #4e726d;

  --ground: var(--oat);
  --fg: var(--ink);
  --muted: rgba(30, 28, 25, 0.68);
  --rule: rgba(30, 28, 25, 0.22);
  --accent: var(--moss);

  --serif: "Young Serif", Georgia, serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

/* Dark interfaces: Oat on Ink (2.2). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--ink);
    --fg: var(--oat);
    --muted: rgba(229, 222, 207, 0.7);
    --rule: rgba(229, 222, 207, 0.24);
    --accent: var(--oat);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: var(--ink);
  --fg: var(--oat);
  --muted: rgba(229, 222, 207, 0.7);
  --rule: rgba(229, 222, 207, 0.24);
  --accent: var(--oat);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Young Serif's default 3 dips below the line; lining figures keep tun3r looking the same in every font */
  font-variant-numeric: lining-nums;
}

a { color: inherit; }

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

/* ---------- Mark ---------- */

.mark { display: block; color: var(--fg); overflow: visible; }
.mark .circuit { stroke-linejoin: miter; stroke-linecap: butt; stroke-miterlimit: 10; }
.mark .bloom   { stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Sprouts (assets/garden.js) ---------- */

/*
  One breeze for every garden. A gust crosses left to right in the first
  half of the cycle and the flowers lean with it, then ease back in the calm.
*/
:root { --breeze: 9s; --lean: 2deg; }

.sway {
  display: block;
  transform-origin: 50% 100%;     /* sways from the terminal */
  animation: sway var(--breeze) ease-in-out infinite;
}
.push { display: block; height: 100%; transform-origin: 50% 100%; }
.sway .mark { height: 100%; width: auto; max-width: 100%; }

@keyframes sway {
  0%   { transform: rotate(calc(var(--lean) * -0.5)); }
  12%  { transform: rotate(calc(var(--lean) * -0.5)); }
  42%  { transform: rotate(var(--lean)); }
  100% { transform: rotate(calc(var(--lean) * -0.5)); }
}

/* Wind lines: thin streaks that travel along gentle waves */
.wind {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--fg);
}
.wind path {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.38;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: var(--len) 200;
  stroke-dashoffset: var(--len);
  animation: gust var(--breeze) linear infinite;
  animation-delay: var(--at);
}
@keyframes gust {
  0%   { stroke-dashoffset: var(--len); opacity: 0; }
  4%   { opacity: 1; }
  34%  { opacity: 1; }
  42%  { stroke-dashoffset: -100; opacity: 0; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sway { animation: none; }
  .wind { display: none; }
}

/* ---------- Meadow: the living header on inner pages (assets/meadow.js) ---------- */

.meadow {
  position: relative;
  height: clamp(110px, 16vh, 150px);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.meadow .bed { position: absolute; inset: 0; }
.meadow .sway { position: absolute; bottom: 0; }
.meadow .wind path { stroke-opacity: 0.26; stroke-width: 1.25; }

/* ---------- Wordmark ---------- */

.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark .name {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.wordmark .sub {
  font-family: var(--sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.42em;          /* tracked +420 */
  margin-right: -0.42em;           /* optical: trailing tracking */
}

/* ---------- Small sans label (caps +140) ---------- */

.label-caps {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
/* An app name as the label (support and privacy pages) keeps its own spelling: tun3r, Layers. */
.label-caps a { text-transform: none; font-size: 14px; letter-spacing: 0.02em; }

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

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 96px;
}
.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 9vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 12px 0 28px;
}
.page h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 36px);
  line-height: 1.15;
  margin: 56px 0 12px;
}
.page p { margin: 0 0 1.1em; }
.page .lede { font-size: 20px; line-height: 1.45; font-weight: 500; }
.page .muted { color: var(--muted); }

/* Policies: many short sections, so sans subheads (brand 4.2) rather than serif headings */
.policy h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.3;
  margin: 40px 0 8px;
}
.policy ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.policy li { margin-bottom: 4px; }

/* FAQ: questions that open in place, between hairlines */
:root { interpolate-size: allow-keywords; }   /* lets browsers that support it animate to height: auto */

.faq { border-top: 1px solid var(--rule); margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
/* a thin plus that turns to a cross when open */
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition: transform .3s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 34px 20px 0; }
.faq .answer p { margin: 0; }
.faq .answer p + p { margin-top: 0.7em; }
.faq + h2 { margin-top: 56px; }

/* Step lists, and lists inside answers */
.steps, .faq .answer ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.faq .answer ul { margin: 0; }
.steps li, .faq .answer li { margin-bottom: 6px; }
.steps li::marker, .faq .answer li::marker { color: var(--accent); }

/* A short aside set off by a Moss rule */
.note {
  margin: 28px 0 0;
  padding: 2px 0 2px 18px;
  border-left: 2px solid var(--accent);
}

.faq details::details-content {
  height: 0;
  overflow: clip;
  transition: height .3s ease, content-visibility .3s allow-discrete;
}
.faq details[open]::details-content { height: auto; }
@media (prefers-reduced-motion: reduce) {
  .faq details::details-content, .faq summary::after { transition: none; }
}

/* App product pages: icon beside the name, then one line and the App Store link */
.app-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 28px;
}
.app-hero h1 { margin: 6px 0 0; font-size: clamp(40px, 7vw, 60px); }
.app-icon {
  flex: none;
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 22.4%;            /* iOS icon corner */
  background: var(--rule);         /* shows until the icon file is in place */
  overflow: hidden;
}
.app-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-more { margin-top: 40px; font-size: 15px; color: var(--muted); }
.app-list { list-style: none; margin: 0; padding: 0; }
.app-list li { padding: 10px 0; border-top: 1px solid var(--rule); }
.app-list li:last-child { border-bottom: 1px solid var(--rule); }
.app-list a { text-decoration: none; text-underline-offset: 4px; }
.app-list a:hover { color: var(--accent); text-decoration: underline; }
.app-more a { color: inherit; text-underline-offset: 4px; }
.app-more a:hover { color: var(--fg); }

/* Help & privacy on app pages: two full-width rows between hairlines */
.app-links { margin-top: 56px; }
.app-links .label-caps { margin: 0 0 12px; }
.app-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: color .2s;
}
.app-links a:last-child { border-bottom: 1px solid var(--rule); }
.app-links small {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.app-links a::after {
  content: "→";
  flex: none;
  color: var(--muted);
  transition: transform .2s, color .2s;
}
.app-links a:hover, .app-links a:focus-visible { color: var(--accent); }
.app-links a:hover::after, .app-links a:focus-visible::after { color: var(--accent); transform: translateX(4px); }

@media (max-width: 560px) {
  .app-hero { gap: 18px; }
  .app-icon { width: 88px; height: 88px; }
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--ground);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--accent); }
:root[data-theme="dark"] .button:hover { color: var(--ink); }
/* Not out yet: an outline in place of the App Store button, not clickable */
.button.soon,
.button.soon:hover {
  background: transparent;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--rule);
  cursor: default;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button:hover { color: var(--ink); }
}

.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  font-size: 14px;
  color: var(--muted);
}
.foot a { color: inherit; }
.foot .lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
  text-decoration: none;
}
.foot .lockup .mark { height: 44px; width: auto; }   /* full mark ≥ 40px tall */
.foot .lockup .wordmark { gap: 6px; }
.foot .lockup .name { font-size: 20px; }
.foot .lockup .sub { font-size: 9px; }

/* Navigation: quiet links in the footer row, after the content */
.paths { display: flex; gap: 24px; }
.paths a {
  text-decoration: none;
  text-underline-offset: 4px;
}
.paths a:hover, .paths a:focus-visible { color: var(--fg); text-decoration: underline; }
.paths a[aria-current] { color: var(--fg); }

@media (max-width: 560px) {
  .page { padding: 48px 16px 72px; }
  .foot { padding: 24px 16px 32px; flex-direction: column; align-items: flex-start; }
}

/* ---------- Sound switch (assets/sound.js): top-right of the garden and the meadow ---------- */

.sound-toggle {
  position: absolute;
  z-index: 3;
  top: max(18px, env(safe-area-inset-top));
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
}
.sound-toggle:hover, .sound-toggle.on { color: var(--fg); }
.sound-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-toggle .wave { opacity: 0; transition: opacity .2s; }
.sound-toggle.on .wave { opacity: 1; }
/* On, but waiting for this page's first tap: faint waves, gently breathing */
.sound-toggle.asleep { color: var(--fg); }
.sound-toggle.asleep .wave { opacity: .35; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .sound-toggle.asleep .wave { animation: none; } }
.meadow .sound-toggle { top: 10px; }

@media (max-width: 560px) {
  .sound-toggle span { display: none; }   /* icon only beside the small lockup */
  .sound-toggle { right: 8px; }
}
