/* Fiwa — shared stylesheet for every page.
   Colors come from the app (see SITE-NOTES.md). System fonts only: no external requests. */

:root {
  /* App surfaces */
  --cream: #F4EEE2;
  --card: #FFFFFF;
  --accent: #2F6B3F;
  --ink: #23201B;
  --ink-soft: #5B5449;
  --line: rgba(35, 32, 27, 0.10);

  /* The three garden areas */
  --physical: #4DA659;
  --rest: #9480D9;
  --free-time: #F5806B;
  --badge-ink: #1C1A17;

  --radius: 24px;
  --gutter: 16px;
  --max: 1080px;

  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #171613;
    --card: #292622;
    --accent: #66B87A;
    --ink: #F1ECE2;
    --ink-soft: #B9B1A3;
    --line: rgba(241, 236, 226, 0.12);
  }
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main { flex: 1; }

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--font-round);
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

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

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

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

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

.site-header { padding: 14px 0 6px; }

.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand lang"
    "nav   nav";
  align-items: center;
  row-gap: 8px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 22px;
  justify-self: start;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.site-nav { grid-area: nav; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  padding: 6px 0;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }

.lang-switch {
  grid-area: lang;
  display: flex;
  gap: 2px;
  background: var(--card);
  border-radius: 999px;
  padding: 3px;
  font-size: 13px;
  font-weight: 700;
}
.lang-switch a, .lang-switch span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
}
.lang-switch [aria-current="true"] {
  background: var(--accent);
  color: var(--cream);
}

@media (min-width: 760px) {
  .site-header { padding: 20px 0 10px; }
  .site-header .wrap {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    column-gap: 32px;
  }
  .site-nav ul { justify-content: flex-end; gap: 0 26px; }
}

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

.site-footer {
  margin-top: 64px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}
.site-footer ul {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
.site-footer p { margin: 4px 0; }

/* ---------- Generic page (placeholders) ---------- */

.page { padding: 40px 0 0; }
.page h1 { font-size: clamp(32px, 7vw, 48px); }
.page .soon { color: var(--ink-soft); font-size: 18px; }

/* ---------- Home: hero ---------- */

.hero { padding: 8px 0 0; }
.hero .wrap {
  display: grid;
  gap: 24px;
}

.garden {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 361 / 288;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(#73B8F2, #D9F0FC);
  container-type: inline-size;
  isolation: isolate;
}
.garden canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.garden .grass {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18.06%; /* 52 of 288 points, as in the app */
  background: linear-gradient(#8CC766, #66A64D);
  display: flex;
  align-items: center;
  gap: 1.1%;
  padding: 0 2.2%;
}
.garden .badge {
  flex: 1;
  text-align: center;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 12px;
  font-size: 3.4cqw;
  line-height: 1;
  color: var(--badge-ink);
  padding: 0.45em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge.physical { background: var(--physical); }
.badge.rest { background: var(--rest); }
.badge.free-time { background: var(--free-time); }

.hero-text { text-align: center; }
.hero-text h1 {
  font-size: clamp(44px, 12vw, 72px);
  color: var(--accent);
  margin-bottom: 0;
}
.tagline {
  font-family: var(--font-round);
  font-weight: 600;
  font-size: clamp(20px, 5vw, 26px);
  margin: 2px 0 14px;
}
.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 20px;
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 16px;
}
.coming-soon svg { width: 18px; height: 18px; flex: none; }

@media (min-width: 900px) {
  .hero { padding-top: 32px; }
  .hero .wrap {
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 56px;
  }
  .hero-text { text-align: left; order: -1; }
  .lead { margin-left: 0; }
}

/* ---------- Home: three points ---------- */

.points { padding: 64px 0 0; }
.points h2, .postcard h2 { font-size: clamp(26px, 6vw, 36px); }
.points-intro { text-align: center; margin-bottom: 24px; }

.point-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.point {
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px 20px;
}
.point h3 { font-size: 21px; display: flex; align-items: center; gap: 10px; }
.point p { margin: 0; color: var(--ink-soft); }
.dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex: none;
}
.dot.physical { background: var(--physical); }
.dot.free-time { background: var(--free-time); }
.dot.accent { background: var(--accent); }

@media (min-width: 760px) {
  .point-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

/* ---------- Home: postcard ---------- */

.postcard { padding: 64px 0 0; }
.postcard .wrap {
  display: grid;
  gap: 28px;
  align-items: center;
}
.postcard-text p { color: var(--ink-soft); margin: 0 0 12px; }

.postcard-frame {
  width: min(100%, 300px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 18px;
  background: var(--card);
  border: 2px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--ink-soft);
  font-family: var(--font-round);
  font-weight: 600;
}

@media (min-width: 760px) {
  .postcard .wrap { grid-template-columns: 1.2fr 1fr; gap: 56px; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade-in 0.6s ease-out both; }
  @keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}
