/* ═══════════════════════════════════════════════════════════════
   GREEN SERENITY — site styles
   ═══════════════════════════════════════════════════════════════
   The palette is lifted verbatim from the app's AppColors class
   (lib/core/theme/app_colors.dart) so the site and the app read as
   one thing.

   No web fonts, no CDN, no analytics: every byte here is served
   from green-serenity.com. A privacy policy that quietly loads a
   third-party font while telling you it collects nothing is not a
   privacy policy worth reading.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --forest: #2d5a3d;
  --sage: #9caf88;
  --mint: #b8e0c8;
  --soft-green: #d4e8d1;
  --light-mint: #e8f5e9;

  --ivory: #fdfcf8;
  --beige: #f5f0e8;
  --sand: #ede8df;
  --stone: #8a8b82;

  --text: #2c3e2d;
  --text-2: #5c6b5d;
  --text-3: #8a958b;

  --teal: #7eb5a6;
  --coral: #e8a598;
  --amber: #d4b896;

  --card: #ffffff;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 2px 12px rgba(45, 90, 61, 0.06);
  --shadow-lift: 0 8px 28px rgba(45, 90, 61, 0.10);

  --measure: 68ch;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--forest);
  text-decoration-color: rgba(45, 90, 61, 0.3);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

/* Visible focus, never removed — keyboard users have to be able to
   see where they are. */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ── Layout ──────────────────────────────────────────────── */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--doc {
  max-width: 800px;
}

section {
  padding: 72px 0;
}

/* ── Header ──────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 248, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--sand);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--forest);
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  background:
    radial-gradient(
      ellipse 80% 60% at 50% -10%,
      var(--light-mint) 0%,
      transparent 70%
    ),
    linear-gradient(180deg, var(--ivory) 0%, var(--beige) 100%);
  padding: 84px 0 76px;
  text-align: center;
  border-bottom: 1px solid var(--sand);
}

.hero__mark {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  object-fit: cover;
  margin: 0 auto 26px;
  box-shadow: var(--shadow-lift);
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--forest);
}

.hero__tagline {
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  color: var(--text-2);
  max-width: 34ch;
  margin: 0 auto 14px;
  font-weight: 500;
}

.hero__blurb {
  color: var(--text-2);
  max-width: var(--measure);
  margin: 0 auto 34px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--soft-green);
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 22px;
}

/* ── Store buttons ───────────────────────────────────────── */

.stores {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: none;
}

.store-btn small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.2;
}

.store-btn strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.2;
}

/* Not published yet: reads as a label, not a broken link. */
.store-btn--pending {
  background: var(--card);
  color: var(--text-2);
  border: 1.5px dashed var(--sage);
  box-shadow: none;
  cursor: default;
}

.store-btn--pending:hover {
  transform: none;
  box-shadow: none;
}

/* ── Section headings ────────────────────────────────────── */

.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  letter-spacing: -0.02em;
  color: var(--forest);
  margin: 0 0 12px;
  line-height: 1.2;
}

.section-head p {
  color: var(--text-2);
  margin: 0;
}

/* ── Cards ───────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: var(--forest);
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.96rem;
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--soft-green);
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  font-size: 1.4rem;
}

/* Exactly four cards: auto-fit gives three across and one orphan on a
   desktop width, which reads as a mistake. Two rows of two does not. */
@media (min-width: 780px) {
  .grid--pair {
    grid-template-columns: repeat(2, 1fr);
  }
}

.alt {
  background: var(--beige);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}

/* ── Promise strip (no ads / no accounts / offline) ──────── */

.promises {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.promise {
  text-align: center;
  padding: 24px 18px;
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
}

.promise strong {
  display: block;
  color: var(--forest);
  font-size: 1.02rem;
  margin-bottom: 5px;
}

.promise span {
  color: var(--text-2);
  font-size: 0.9rem;
}

/* ── Languages ───────────────────────────────────────────── */

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  justify-content: center;
}

.lang {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.93rem;
  color: var(--text-2);
  font-weight: 500;
}

.lang span {
  margin-right: 7px;
}

/* ── Partners ────────────────────────────────────────────── */

/* Six partners. A grid of three keeps them in two even rows; flex-wrap
   fitted five on the first row and stranded the sixth. */
.partners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 780px) {
  .partners {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.partner {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.partner img {
  height: 46px;
  width: auto;
  margin: 0 auto 11px;
  object-fit: contain;
}

.partner span {
  font-size: 0.86rem;
  color: var(--text-3);
  font-weight: 500;
}

/* ── Project facts ───────────────────────────────────────── */

.facts {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 30px;
}

.fact {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 18px 20px;
}

.fact dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  font-weight: 700;
  margin-bottom: 5px;
}

.fact dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
}

/* ── Callouts ────────────────────────────────────────────── */

.callout {
  background: var(--light-mint);
  border: 1px solid var(--mint);
  border-left: 5px solid var(--forest);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 30px 0;
}

.callout h3,
.callout h2 {
  margin-top: 0;
  color: var(--forest);
}

.callout > *:last-child {
  margin-bottom: 0;
}

.callout--urgent {
  background: #fdf1ee;
  border-color: var(--coral);
  border-left-color: #c9553d;
}

.callout--urgent h2,
.callout--urgent h3 {
  color: #a8402b;
}

.callout--note {
  background: var(--beige);
  border-color: var(--sand);
  border-left-color: var(--sage);
}

/* ── Documents (privacy, terms, support) ─────────────────── */

.doc-header {
  background: linear-gradient(180deg, var(--light-mint) 0%, var(--ivory) 100%);
  padding: 62px 0 42px;
  border-bottom: 1px solid var(--sand);
}

.doc-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  color: var(--forest);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.doc-header p {
  color: var(--text-2);
  margin: 0;
}

.doc {
  padding: 52px 0 76px;
}

.doc h2 {
  font-size: 1.4rem;
  color: var(--forest);
  margin: 44px 0 14px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  scroll-margin-top: 90px;
}

.doc h2:first-child {
  margin-top: 0;
}

.doc h3 {
  font-size: 1.08rem;
  color: var(--text);
  margin: 28px 0 10px;
}

.doc p,
.doc li {
  color: var(--text-2);
  max-width: var(--measure);
}

.doc ul,
.doc ol {
  padding-left: 24px;
}

.doc li {
  margin-bottom: 9px;
}

.doc li::marker {
  color: var(--sage);
}

.doc strong {
  color: var(--text);
}

/* Tables scroll inside their own box rather than pushing the page
   sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--sand);
  border-radius: 14px;
  background: var(--card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--sand);
  vertical-align: top;
  color: var(--text-2);
}

th {
  background: var(--beige);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:last-child td {
  border-bottom: none;
}

code {
  background: var(--beige);
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.87em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  color: var(--forest);
  word-break: break-word;
}

/* Table of contents on the long legal pages. */
.toc {
  background: var(--beige);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
}

.toc strong {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 34px;
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* ── FAQ ─────────────────────────────────────────────────── */

details.faq {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

details.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--forest);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::after {
  content: "+";
  font-size: 1.35rem;
  color: var(--sage);
  font-weight: 400;
  line-height: 1;
  flex: none;
}

details.faq[open] summary::after {
  content: "\2212";
}

details.faq .faq__body {
  padding: 0 22px 20px;
}

details.faq .faq__body > *:first-child {
  margin-top: 0;
}

details.faq .faq__body > *:last-child {
  margin-bottom: 0;
}

/* ── EU funding band ─────────────────────────────────────── */

.eu-band {
  background: var(--beige);
  border-top: 1px solid var(--sand);
  padding: 40px 0;
}

.eu-band .wrap {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.eu-band img {
  height: 62px;
  width: auto;
  flex: none;
}

.eu-band p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-3);
  max-width: 62ch;
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────── */

.site-footer {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.72);
  padding: 52px 0 34px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 34px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 9px;
  font-size: 0.93rem;
}

.footer-grid p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 24px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

/* ── Utilities ───────────────────────────────────────────── */

.center {
  text-align: center;
}

.muted {
  color: var(--text-3);
  font-size: 0.9rem;
}

.mt-0 {
  margin-top: 0;
}

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

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  section {
    padding: 54px 0;
  }
  .hero {
    padding: 58px 0 52px;
  }
  .card {
    padding: 24px;
  }
  .nav {
    gap: 16px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .stores,
  .eu-band {
    display: none;
  }
  body {
    background: #fff;
    font-size: 12pt;
  }
  .doc-header {
    background: none;
    border: none;
    padding: 0 0 20px;
  }
}
