:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --ink: #161c14;
  --muted: #646b60;
  --line: #e3e1d8;
  --field: #f3f2ec;
  --accent: #1f3a1c;
  --accent-ink: #ffffff;
  --accent-soft: #e5ecdf;
  --leaf: #8fbf5a;
  --danger: #b3342c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 30, 15, .06), 0 12px 40px -12px rgba(20, 30, 15, .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111410;
    --surface: #1a1f18;
    --ink: #ecefe7;
    --muted: #a3aa9d;
    --line: #2c3329;
    --field: #232a21;
    --accent: #a9d37a;
    --accent-ink: #10200c;
    --accent-soft: #24301f;
    --danger: #ee8a82;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 18px; } }
h1, h2 { line-height: 1.05; font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 0 0 .5em; }
h2 { font-size: 1.5rem; margin: 0 0 .8em; }

/* --- Goiburu sinplea (beste orrietan) --- */
.site-header .wrap { padding-block: 22px; }
.brand { font-weight: 800; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }

/* --- Hero --- */
.hero {
  position: relative; isolation: isolate; color: #fff;
  min-height: clamp(460px, 82vh, 760px); display: flex; align-items: flex-end;
  background: #1a2a14;
}
.hero picture, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.hero img { object-fit: cover; object-position: 50% 45%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(8, 16, 6, .88) 0%, rgba(8, 16, 6, .45) 42%, rgba(8, 16, 6, .05) 75%),
    linear-gradient(to right, rgba(8, 16, 6, .35), transparent 60%);
}
.hero-inner { width: 100%; padding-block: 120px 56px; }
.hero h1 { text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.kicker {
  margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--leaf);
}
.kicker::before { content: ""; display: inline-block; width: 28px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 44px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { margin: 0; font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats dt { font-size: .92rem; color: rgba(255, 255, 255, .78); margin-top: 6px; }
.hero-cta { margin-top: 32px; }

/* --- Edukia --- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 72px; align-items: start; }
.manifest { padding-top: 64px; font-size: 1.1rem; }
.manifest .lead { font-size: clamp(1.15rem, 2vw, 1.3rem); line-height: 1.5; font-weight: 500; }
.manifest p, .manifest li { max-width: 66ch; }
.manifest li { margin-bottom: .4em; }
.manifest-title { font-size: clamp(1.45rem, 2.8vw, 1.9rem); line-height: 1.2; margin: 0 0 1em; max-width: 26ch; }
.manifest strong { font-weight: 700; }
.demand {
  margin: 2em 0 0; padding: 22px 26px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 12px 12px 0;
  font-size: 1.15rem; line-height: 1.55;
}
.demand p { margin: 0; }
.demand ol { margin: .6em 0 0; padding-left: 1.3em; }
.demand li { margin: .25em 0; max-width: none; }
.manifest li::marker { color: var(--accent); font-weight: 700; }

.sign-card {
  position: sticky; top: 24px; margin-top: -220px; z-index: 1;
  background: var(--surface); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.sign-card h2 { margin-bottom: .9em; }
.hero .hero-cta { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 8px; }
  .manifest { padding-top: 40px; }
  .sign-card { position: static; margin-top: 24px; }
  .hero .hero-cta { display: inline-block; }
}
@media (max-width: 480px) { .sign-card { padding: 22px; margin-inline: -6px; } }

/* --- Formularioa --- */
.field { margin: 0 0 16px; border: 0; padding: 0; }
.field > label, legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; padding: 0; }
input[type=text], input[type=email] {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid transparent;
  border-radius: 10px; background: var(--field); color: var(--ink); transition: border-color .15s, background .15s;
}
input[type=text]:focus, input[type=email]:focus { outline: none; border-color: var(--accent); background: var(--surface); }
button:focus-visible, a:focus-visible, .choice:has(input:focus-visible), .check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  position: relative; display: inline-flex; align-items: center; padding: 8px 16px;
  border-radius: 999px; cursor: pointer; background: var(--field); font-size: .95rem; font-weight: 500;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { background: var(--accent); color: var(--accent-ink); }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: .92rem; line-height: 1.5; cursor: pointer; }
.check input { margin: 2px 0 0; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.help { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
.has-error input[type=text], .has-error input[type=email] { border-color: var(--danger); }
.alert { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.button {
  display: inline-block; font: inherit; font-weight: 700; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); padding: 13px 26px;
  border-radius: 999px; text-decoration: none; transition: transform .15s, filter .15s;
}
.button:hover { filter: brightness(1.1); }
.button:active { transform: translateY(1px); }
.button.light { background: #fff; color: #16240f; }
.button.wide { width: 100%; margin-top: 8px; padding-block: 14px; }
.button.danger { background: var(--danger); color: #fff; }
.small { font-size: .82rem; line-height: 1.5; }
.muted { color: var(--muted); }
.sign-card .small { margin: 14px 0 0; }

/* --- Sinatzaileak --- */
.signers { margin: 96px 0 24px; }
.signers h2 { display: flex; align-items: baseline; gap: 14px; }
.names { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.names li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: .95rem; }

/* --- Beste orriak --- */
.panel { max-width: 640px; margin: 32px auto 64px; background: var(--surface); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
@media (max-width: 480px) { .panel { padding: 24px; } }
.panel h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.prose h2 { font-size: 1.15rem; margin-top: 1.6em; margin-bottom: .4em; letter-spacing: -.01em; }

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer .wrap { padding-block: 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }
@media (min-width: 901px) {
  .hero h1 { font-size: clamp(2.6rem, 4.6vw, 3.6rem); max-width: calc(100% - 470px); }
}

/* --- Partekatu (mugikorretan) --- */
.share { margin: 2em 0 0; }
.share-btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; cursor: pointer;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent);
}
.share-btn:active { background: var(--accent-soft); }

/* --- Mugikorreko beheko botoia --- */
.sticky-cta { display: none; }
@media (max-width: 900px) {
  .sticky-cta {
    display: block; position: fixed; z-index: 10; left: 16px; right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    text-align: center; font-weight: 700; text-decoration: none; padding: 15px 20px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45);
    transition: transform .25s, opacity .25s;
  }
  .sticky-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
  body:has(.sticky-cta) .site-footer { padding-bottom: 72px; }
}
.panel .share { margin: 1.4em 0 1.6em; }
.panel .share-btn { background: var(--accent); color: var(--accent-ink); padding: 13px 24px; }
.panel .share-btn:active { filter: brightness(1.1); background: var(--accent); }

/* --- Proba-faseko oharra --- */
.beta-bar {
  background: #f4b63f; color: #2a1f0e; text-align: center; font-size: .9rem; line-height: 1.4;
  padding: 9px 16px; padding-top: calc(9px + env(safe-area-inset-top, 0px));
}
.beta-bar strong {
  display: inline-block; background: #2a1f0e; color: #f4b63f; border-radius: 4px;
  font-size: .72rem; letter-spacing: .12em; padding: 2px 7px; margin-right: 8px; vertical-align: 1px;
}
