/* ===========================================================================
   Parzelle37 — shared stylesheet for every page on parzelle37.app
   ---------------------------------------------------------------------------
   Loaded by: index.html, privacy.html, terms.html and their /en/ counterparts.
   invite.html deliberately keeps its own styles — it is a functional page in
   the sign-up flow, not a marketing page, and is not worth the regression risk.

   Colours live in custom properties so a change happens once, not six times.
   Every text/background pair below was measured against WCAG 2.1 AA with
   scripts/contrast.js — do not introduce a new grey by eye. The three that
   failed on the first pass (#6c8465, #7a8c75) are gone on purpose; --muted
   replaces both at 5.2:1 on the page background and 5.5:1 on white.
   =========================================================================== */

:root {
  /* Brand */
  --green-900: #2d5a27;
  --green-700: #3d6b33;
  --green-600: #4a7c3f;
  --green-100: #e8f5e3;

  /* Surfaces */
  --bg: #f4faf1;
  --surface: #ffffff;
  --surface-alt: #e8f1e3;
  --border: #d0e4c8;

  /* Text — all AA-verified against --bg and --surface */
  --ink: #2d3e2d;
  --body: #3a4a3a;
  --lead: #52684f;
  --muted: #5a6e54;

  /* Accents */
  --warn-bg: #fffde7;
  --warn-border: #f9a825;
  --warn-ink: #5d4037;
  --draft-bg: #ffebee;
  --draft-border: #c62828;
  --draft-ink: #b71c1c;

  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 8px 24px rgba(45, 90, 39, .10);
  --measure: 780px;   /* legal/prose pages */
  --measure-wide: 980px; /* landing page */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* --- Accessibility basics ------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

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

/* --- Site header --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 250, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--green-900);
  text-decoration: none;
  font-size: 17px;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 10px;
  border-radius: 8px;
}
.site-nav a:hover { background: var(--green-100); color: var(--green-900); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 13px;
}
.lang-switch a { padding: 6px 8px; }
.lang-switch [aria-current="true"] {
  font-weight: 700;
  color: var(--green-900);
  background: var(--green-100);
}

.btn-sm {
  background: var(--green-600);
  color: #fff !important;
  padding: 8px 15px !important;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--green-900); }

@media (max-width: 720px) {
  .site-nav .hide-sm { display: none; }
  .site-header .bar { padding: 10px 16px; gap: 10px; }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-900) 100%);
  color: #fff;
  padding: 56px 24px 60px;
  text-align: center;
}

/* The generic `p` rule below sets a dark body colour. Without this the hero
   copy renders near-black on dark green — state the colour explicitly rather
   than relying on inheritance that a later rule overrides. */
.hero p { color: #fff; }

.hero img.logo {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
}
.hero h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -.5px;
}
.hero .tagline {
  font-size: 20px;
  max-width: 560px;
  margin: 0 auto 12px;
}
.hero .sub {
  font-size: 15.5px;
  color: rgba(255, 255, 255, .88);
  max-width: 500px;
  margin: 0 auto 26px;
}

.hero-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* --- Hero: two columns on desktop, copy above visual on mobile ------------ */

.hero-split {
  max-width: var(--measure-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  align-items: center;
}
.hero-split .hero-copy { text-align: center; }

@media (min-width: 900px) {
  .hero { text-align: left; padding: 64px 24px 68px; }
  .hero-split { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .hero-split .hero-copy { text-align: left; }
  .hero-split .hero-copy .tagline,
  .hero-split .hero-copy .sub { margin-left: 0; margin-right: 0; }
  .hero-split .hero-actions { justify-content: flex-start; }
  .hero img.logo { margin-bottom: 14px; }
}

/* --- Hero visual: a stylised garden plan ---------------------------------
   Deliberately built from markup rather than an image: it works today,
   before any screenshots exist, weighs nothing, and previews the one screen
   that explains the product. The screenshot section further down is the
   place for real captures.
   ------------------------------------------------------------------------- */

.plan-card {
  background: rgba(255, 255, 255, .97);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26);
  transform: rotate(-1.2deg);
  max-width: 420px;
  margin: 0 auto;
}
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}
.plan-title { font-weight: 700; color: var(--green-900); font-size: 15px; }
.plan-weather {
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}
/* Colours, labels and pins mirror the real garden plan rather than inventing a
   look: beds are soil brown with a white label (garden_zone.dart defaultColor),
   plants are emoji pins scattered at their own positions, and the two status
   badges are the same blue 💧 / orange 🧺 circles the app draws on a bed. */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.bed {
  position: relative;
  background: #a0784a;
  border-radius: 8px;
  min-height: 60px;
}
.bed.raised { background: #8a6540; }
.bed.flower { background: #9a7050; }
.bed.lawn   { background: #7cb87a; }
.bed.shed   { background: #8b6914; }
.bed.tree   { background: #2d5a27; border-radius: 50%; }
.bed.w2 { grid-column: span 2; }
.bed.w3 { grid-column: span 3; }

.bed .label {
  position: absolute;
  top: 4px;
  left: 3px;
  right: 3px;
  text-align: center;
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  letter-spacing: .1px;
}
.bed .pin {
  position: absolute;
  font-size: 15px;
  line-height: 1;
  transform: translate(-50%, -50%);
}
.bed .bdg {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
}
.bed .bdg.water { top: -5px; right: -5px; background: #1565c0; }
.bed .bdg.harvest { top: -5px; left: -5px; background: #e67e22; }
.plan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 0 2px;
}
.plan-chips span {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 20px;
  padding: 4px 10px;
}

@media (prefers-reduced-motion: reduce) {
  .plan-card { transform: none; }
}

/* --- Trust row ----------------------------------------------------------- */

.trust {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 24px;
  transform: translateY(-22px);
}
.trust ul {
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: var(--shadow);
}
.trust li {
  font-size: 14px;
  color: var(--body);
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .trust ul { border-radius: var(--radius); }
}

/* --- Layout -------------------------------------------------------------- */

main { max-width: var(--measure-wide); margin: 0 auto; padding: 0 24px 64px; }
main.prose { max-width: var(--measure); margin: 40px auto; }

section { margin-top: 56px; scroll-margin-top: 76px; }

h2 {
  font-size: 23px;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 8px;
}
main.prose h2 {
  font-size: 18px;
  margin: 36px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
h3 { font-size: 15px; font-weight: 600; color: var(--green-700); margin: 20px 0 6px; }

p { margin-bottom: 12px; color: var(--body); }
.lead { font-size: 16.5px; color: var(--lead); margin-bottom: 24px; max-width: 680px; }

ul { margin: 8px 0 16px 20px; color: var(--body); }
ul li { margin-bottom: 6px; }

a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.highlight {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  font-size: 14px;
  color: var(--warn-ink);
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 16px;
}
.contact-box p { margin-bottom: 4px; }

/* --- Draft warning (removed before launch) ------------------------------- */

.todo {
  background: var(--draft-bg);
  border: 2px dashed var(--draft-border);
  color: var(--draft-ink);
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 20px;
}
.todo ul { margin: 10px 0 0 20px; font-weight: 500; }
.todo code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 4px; }

/* Collapsed by default: this is a note to ourselves, not page content, and
   fully expanded it pushes the real content a screen further down. The
   warning line itself stays visible so it can't be forgotten. */
details.todo > summary { cursor: pointer; list-style: none; }
details.todo > summary::-webkit-details-marker { display: none; }
details.todo > summary::after { content: " ▸"; }
details.todo[open] > summary::after { content: " ▾"; }

/* --- USP band ------------------------------------------------------------ */

.usp {
  background: var(--surface);
  border: 2px solid var(--green-600);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.usp h2 { margin-bottom: 6px; }
.usp p:last-child { margin-bottom: 0; }

/* --- Features ------------------------------------------------------------ */

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.feature h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--green-900);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature ul { margin: 0 0 0 18px; font-size: 15px; }
.feature li { margin-bottom: 5px; }

/* --- Screenshot slots ----------------------------------------------------
   Sized 9:16 so dropping real screenshots in later causes no layout shift.
   ------------------------------------------------------------------------- */

/* Fixed-width strip rather than a full-width grid: three 9:16 slots stretched
   across the page turn into a wall you have to scroll past. Scrolls sideways
   on narrow screens instead of stacking into another wall. */
.shot-strip {
  display: flex;
  gap: 14px;
  justify-content: center;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.shot {
  flex: 0 0 188px;
  aspect-ratio: 9 / 16;
  scroll-snap-align: start;
  background: var(--surface-alt);
  border: 2px dashed #a8c69c;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

@media (max-width: 680px) {
  .shot-strip { justify-content: flex-start; }
  .shot { flex-basis: 164px; }
}

/* --- Pricing ------------------------------------------------------------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}
.plan.paid { border: 2px solid var(--green-600); box-shadow: var(--shadow); }
.plan .badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--green-600);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
}
.plan .name { font-size: 20px; font-weight: 700; color: var(--green-900); }
.plan .price { font-size: 27px; font-weight: 700; margin: 6px 0 4px; color: var(--ink); }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .per { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.plan ul { margin: 0 0 0 18px; font-size: 15px; }
.plan li { margin-bottom: 5px; }
.note { font-size: 14px; color: var(--lead); margin-top: 16px; }

/* --- FAQ ----------------------------------------------------------------- */

.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 22px;
}
.faq details { border-bottom: 1px solid #e4f0de; padding: 14px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary {
  font-weight: 600;
  color: var(--green-900);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋ "; color: var(--green-600); font-weight: 700; }
.faq details[open] summary::before { content: "－ "; }
.faq p { margin-top: 8px; font-size: 15px; }
.faq p:last-child { margin-bottom: 0; }

/* --- CTA ----------------------------------------------------------------- */

.cta {
  background: linear-gradient(135deg, var(--green-600) 0%, var(--green-900) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .92); margin-bottom: 18px; }

.btn {
  display: inline-block;
  background: #fff;
  color: var(--green-900);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 30px;
  margin: 6px 6px 0;
}
.btn:hover { text-decoration: none; background: var(--green-100); }
.btn.ghost {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .26); }

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

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 30px 24px 44px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.site-footer nav a { margin: 0 8px; }
.imprint { font-size: 13px; margin-top: 12px; line-height: 1.6; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 680px) {
  .hero { padding: 32px 20px 40px; }
  .hero img.logo { width: 64px; height: 64px; margin-bottom: 12px; }
  .hero h1 { font-size: 27px; }
  .hero .tagline { font-size: 17px; }
  .hero .sub { font-size: 15px; margin-bottom: 20px; }
  .hero-split { gap: 26px; }
  .plan-card { padding: 13px; }
  .bed { min-height: 54px; }
  .features, .plans { grid-template-columns: 1fr; }
  main { padding: 0 16px 44px; }
  main.prose { padding: 0 16px 44px; }
  section { margin-top: 40px; }
}
