/* ==========================================================================
   DEN GRØNNE SMARAGD — Stylesheet
   ========================================================================== */

/* CSS variables
   -------------------------------------------------------------------------- */
:root {
  /* Colors — inspired by the emerald name, the landscape, and the architecture */
  --color-emerald: #0e5c45;
  --color-emerald-dark: #08382a;
  --color-emerald-light: #4a9b7e;
  --color-sand: #f6f3ec;
  --color-sand-dark: #e8e2d5;
  --color-ink: #1a1f1c;
  --color-text: #2a2f2c;
  --color-muted: #6b6f6c;
  --color-line: #dcdcd2;
  --color-white: #ffffff;
  --color-accent: #c9a961;

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Layout */
  --max-width: 1240px;
  --max-width-narrow: 840px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  /* Transitions */
  --t-fast: 0.2s ease;
  --t-med: 0.35s ease;
}

/* Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-emerald);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover {
  color: var(--color-emerald-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-emerald);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-sm);
  max-width: 68ch;
}

p + p {
  margin-top: 0;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: var(--color-muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-emerald);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--color-emerald);
  vertical-align: middle;
  margin-right: 0.75rem;
  transform: translateY(-2px);
}

/* Layout helpers
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

section.tight {
  padding: var(--space-lg) 0;
}

.bg-sand {
  background-color: var(--color-sand);
}

.bg-sand-dark {
  background-color: var(--color-sand-dark);
}

.bg-emerald {
  background-color: var(--color-emerald);
  color: var(--color-white);
}

.bg-emerald h1,
.bg-emerald h2,
.bg-emerald h3,
.bg-emerald h4,
.bg-emerald p {
  color: var(--color-white);
}

.bg-emerald a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-ink);
  letter-spacing: 0.02em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--color-emerald);
}

.site-logo .sub {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 2px;
}

.site-nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.site-nav a {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--color-emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-emerald);
  text-decoration: none;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  margin: 5px auto;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--color-ink);
  color: var(--color-white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.0) 30%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 2;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: var(--space-xl) 0 var(--space-lg);
  max-width: 720px;
}

.hero-content .eyebrow {
  color: var(--color-sand-dark);
}

.hero-content .eyebrow::before {
  background: var(--color-sand-dark);
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
}

.hero-address {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: var(--space-md);
  color: rgba(255, 255, 255, 0.85);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* Page header (for subpages) */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
  background: var(--color-sand);
  border-bottom: 1px solid var(--color-line);
}

.page-header h1 {
  max-width: 20ch;
  margin-bottom: var(--space-sm);
}

.page-header .lede {
  max-width: 55ch;
}

/* Intro / about block
   -------------------------------------------------------------------------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: center;
}

.intro-grid img {
  border-radius: 2px;
  box-shadow: 0 20px 40px -20px rgba(14, 92, 69, 0.25);
}

/* Feature grid (4 sections on home) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-emerald);
  box-shadow: 0 16px 32px -16px rgba(14, 92, 69, 0.2);
  text-decoration: none;
}

.feature-card h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  margin-bottom: 0.4rem;
}

.feature-card h3 {
  color: var(--color-ink);
  margin-bottom: 0;
}

.feature-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.feature-card .arrow {
  color: var(--color-emerald);
  font-weight: 500;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--t-med);
}

.feature-card:hover .arrow {
  gap: 1rem;
}

/* Info cards (contact / board members) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.info-card {
  background: var(--color-white);
  border-left: 3px solid var(--color-emerald);
  padding: var(--space-md);
}

.info-card h4 {
  margin-bottom: var(--space-sm);
}

.info-card .meta {
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Two-column content */
.two-col {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.two-col .label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-emerald);
  padding-top: 0.35rem;
}

.two-col .content > :last-child {
  margin-bottom: 0;
}

/* Roster (board members) */
.roster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 2rem;
}

.roster dt {
  font-weight: 500;
  color: var(--color-ink);
}

.roster dd {
  color: var(--color-text);
}

/* Notices / callouts */
.notice {
  background: var(--color-sand);
  border-left: 4px solid var(--color-accent);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.notice-emerald {
  border-left-color: var(--color-emerald);
  background: rgba(14, 92, 69, 0.05);
}

.notice h3 {
  margin-bottom: var(--space-xs);
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Document list */
.doc-section {
  margin-bottom: var(--space-lg);
}

.doc-section h3 {
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-emerald);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.doc-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.5rem 1.5rem;
}

.doc-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-line);
}

.doc-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.96rem;
  line-height: 1.4;
}

.doc-list a::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 22px;
  flex-shrink: 0;
  background-color: var(--color-emerald);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z'/%3E%3C/svg%3E");
  margin-top: 2px;
}

.doc-list a:hover {
  color: var(--color-emerald);
  text-decoration: none;
}

.doc-list .year {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--color-emerald);
  color: var(--color-white);
  border: 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}

.btn:hover {
  background: var(--color-emerald-dark);
  color: var(--color-white);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-emerald);
  border: 1px solid var(--color-emerald);
}

.btn-outline:hover {
  background: var(--color-emerald);
  color: var(--color-white);
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-emerald-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.site-footer a {
  color: var(--color-white);
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.site-footer h4 {
  color: var(--color-sand-dark);
  margin-bottom: var(--space-sm);
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer .footer-brand h3 {
  color: var(--color-white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.site-footer .footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Figure / image captions */
figure {
  margin: 0;
}

figure.wide {
  margin: var(--space-lg) calc(-1 * var(--space-md));
}

figure img {
  width: 100%;
}

figcaption {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding-top: 0.5rem;
  font-style: italic;
}

/* Utility */
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.text-center { text-align: center; }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .intro-grid,
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 700px) {
  section {
    padding: var(--space-lg) 0;
  }

  .page-header {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-line);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--t-med);
  }

  .site-nav[data-open="true"] {
    max-height: 80vh;
  }

  .site-nav ul {
    flex-direction: column;
    padding: var(--space-sm) var(--space-md) var(--space-md);
    gap: 0;
  }

  .site-nav li {
    border-bottom: 1px solid var(--color-line);
  }

  .site-nav li:last-child {
    border-bottom: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.9rem 0;
  }

  .site-nav a::after {
    display: none;
  }

  .roster {
    grid-template-columns: 1fr;
    gap: 0.2rem 0;
  }

  .roster dd {
    margin-bottom: 0.6rem;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  figure.wide {
    margin: var(--space-md) 0;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .site-logo { font-size: 1.2rem; }
  .hero { min-height: 70vh; }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .hero-scroll {
    display: none;
  }

  body {
    font-size: 11pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
