/* Design tokens from "Ether & Elm" (DESIGN.md) */
:root {
  --background: #f8faf7;
  --on-surface: #191c1b;
  --on-surface-variant: #434843;
  --surface-container-low: #f2f4f1;
  --surface-container-lowest: #ffffff;
  --primary: #334537;
  --on-primary: #ffffff;
  --primary-container: #4a5d4e;
  --on-primary-container: #c0d5c2;
  --primary-fixed-dim: #b7ccb9;
  --on-primary-fixed-variant: #394b3d;
  --secondary: #586153;
  --on-secondary-fixed-variant: #40493c;
  --tertiary-fixed: #e0e4de;
  --outline: #737872;
  --outline-variant: #c3c8c1;

  --margin: 20px;
  --container: 1280px;
  --radius: 0.25rem;
  --radius-lg: 0.5rem;
}

@media (min-width: 768px) {
  :root { --margin: 64px; }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--on-surface);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary-fixed-dim); color: var(--on-primary-fixed-variant); }

a { color: inherit; }
img { max-width: 100%; display: block; }

.label {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px var(--margin);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__brand {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--primary);
  text-decoration: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (min-width: 768px) {
  .nav__links { gap: 32px; }
}

.nav__link {
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color 0.3s;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--primary); }

.nav__link--secondary { display: none; }
@media (min-width: 768px) {
  .nav__link--secondary { display: inline; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s, background-color 0.3s;
}
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { opacity: 0.9; }
.btn--secondary { border-color: var(--outline); color: var(--primary); }
.btn--secondary:hover { background: rgba(255, 255, 255, 0.25); }
.btn--small { padding: 8px 24px; background: var(--primary-container); color: var(--on-primary-container); }
.btn--small:hover { background: var(--primary); }

/* ---------- Home ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}
.hero__mist {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.2));
  pointer-events: none;
}
.hero__center {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 var(--margin);
}

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(74, 93, 78, 0.05);
  width: 100%;
  max-width: 672px;
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
@media (min-width: 768px) {
  .glass-card { padding: 80px; }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--secondary);
  opacity: 0.7;
}

.hero__title {
  margin: 16px 0 0;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--primary);
}
@media (min-width: 768px) {
  .hero__title { font-size: 48px; letter-spacing: -0.04em; }
}

.divider { width: 48px; height: 1px; background: var(--outline-variant); opacity: 0.5; }

.hero__text {
  margin: 0;
  max-width: 28rem;
  font-size: 18px;
  color: var(--on-surface-variant);
}

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px var(--margin);
  color: var(--on-secondary-fixed-variant);
}
@media (min-width: 768px) {
  .footer { flex-direction: row; }
}
.footer__copy { opacity: 0.6; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { text-decoration: none; transition: color 0.3s; }
.footer__links a:hover { color: var(--primary); }

.footer--overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 30;
  color: #fff;
  text-shadow: 0 1px 8px rgba(14, 31, 19, 0.6);
}
.footer--overlay .footer__copy { opacity: 0.85; }
.footer--overlay .footer__links a:hover { color: var(--primary-fixed-dim); }

/* ---------- News ---------- */
.page-hero {
  position: relative;
  height: 44vh;
  min-height: 320px;
  overflow: hidden;
}
.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(248, 250, 247, 0.0) 40%, var(--background));
}
.page-hero__title {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--margin);
}
.page-hero__title h1 {
  margin: 12px 0 0;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary);
}
@media (min-width: 768px) {
  .page-hero__title h1 { font-size: 48px; }
}

.news {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px var(--margin) 96px;
  display: grid;
  gap: 24px;
}

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(195, 200, 193, 0.4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.4s;
}
.entry:hover { box-shadow: 0 20px 40px rgba(74, 93, 78, 0.07); }

@media (min-width: 768px) {
  .entry { grid-template-columns: 280px 1fr; }
  .entry--no-image { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .entry { grid-template-columns: 320px 1fr; }
}

.entry__media {
  display: block;
  background: var(--surface-container-low);
  align-self: start;
}
.entry__media img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s;
}
a.entry__media:hover img { opacity: 0.88; }

.entry__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .entry__body { padding: 40px; }
}

.entry__title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--primary);
}

.entry__meta {
  align-self: flex-start;
  margin: 0;
  padding: 6px 12px;
  border-radius: var(--radius);
  background: var(--tertiary-fixed);
  color: var(--primary);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entry__text p { margin: 0 0 12px; color: var(--on-surface-variant); }
.entry__text p:last-child { margin-bottom: 0; }
.entry__text a { color: var(--primary); text-underline-offset: 4px; }
.entry__cta { margin-top: auto; align-self: flex-start; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px var(--margin) 96px;
}
.legal h1 {
  margin: 12px 0 40px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary);
}
@media (min-width: 768px) {
  .legal h1 { font-size: 48px; }
}
.legal h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--primary);
}
.legal p, .legal li { color: var(--on-surface-variant); }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal a { color: var(--primary); text-underline-offset: 4px; }
.legal address { font-style: normal; margin: 0 0 16px; color: var(--on-surface-variant); }
.legal .todo { background: var(--tertiary-fixed); padding: 0 6px; border-radius: var(--radius); }
