/* ─────────────────────────────────────────────────────────────────
   ECOGRAM website — shared styles.
   Brand colors mirror the Flutter app's EgPalette tokens so the web
   and mobile surfaces feel like one product:
       green   #1F8A3E   (primary)
       yellow  #F2B807   (accent)
       bg      #FBFAF6   (off-white)
   ───────────────────────────────────────────────────────────────── */

:root {
  --green: #1F8A3E;
  --green-dark: #15662C;
  --green-soft: #E2F2E5;
  --yellow: #F2B807;
  --yellow-soft: #FFF2C8;
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --border: #E6E3D8;
  --text: #0F1A14;
  --text-muted: #5C6B62;
  --text-subtle: #8A968D;
  --danger: #C9342E;
  --danger-soft: #F8DDDB;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Layout ────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.nav {
  position: sticky;
  top: 0;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .eco { color: var(--green); }
.brand .gram { color: var(--yellow); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.cta {
  background: var(--green);
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.nav-links a.cta:hover { background: var(--green-dark); }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
  max-width: 760px;
  margin: 0 auto 18px;
}
.hero h1 em { font-style: italic; color: var(--green); }
.hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 32px;
}
.hero .badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); text-decoration: none; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a02622; text-decoration: none; }

/* ─── Sections ──────────────────────────────────────────────────── */
section { padding: 64px 0; }
section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  text-align: center;
}
section .sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 48px;
}

.features {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}
.feature .icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}
.feature p { color: var(--text-muted); font-size: 14px; }

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { border-color: var(--green); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--text-subtle); margin-top: 6px; }

.notice {
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13.5px;
}
.notice-info { background: var(--green-soft); color: var(--green); }
.notice-warn { background: var(--yellow-soft); color: #8B6F00; }
.notice-error { background: var(--danger-soft); color: var(--danger); }
.notice-success { background: var(--green-soft); color: var(--green-dark); }

/* ─── Legal pages (privacy, terms) ───────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.65;
}
.legal-h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}
.legal-updated {
  color: var(--text-subtle);
  font-size: 13px;
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 19px;
  font-weight: 800;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal p { color: var(--text-muted); margin-bottom: 14px; }
.legal ul {
  color: var(--text-muted);
  padding-left: 22px;
  margin-bottom: 14px;
}
.legal ul li { margin-bottom: 6px; }
.legal a { font-weight: 600; }
.legal strong { color: var(--text); }

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.foot-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--text-muted); }
.foot-links a:hover { color: var(--green); }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.cta) { display: none; }
  .hero { padding: 56px 0 40px; }
  section { padding: 48px 0; }
  .form-card { padding: 24px; }
}
