/* =========================================================================
   Montessori Farm Aulendiebach — Design System
   Palette: olive #31401C · sage #B7BF7A · warm-white #FAFAF3 ·
            bordeaux #8C1818 · anthracite #404040
   Type: Display = Pacifico (sparingly) · Body = Avenir → Mulish fallback
   ========================================================================= */

:root {
  /* Brand */
  --olive:        #31401C;
  --olive-700:    #3d5025;
  --olive-600:    #4a6030;
  --sage:         #B7BF7A;
  --sage-200:     #d3d9a8;
  --sage-050:     #eef0dc;
  --cream:        #F2F1DF;
  --paper:        #FAFAF3;   /* near-white warm page bg */
  --paper-2:      #FFFFFF;
  --bordeaux:     #8C1818;
  --bordeaux-600: #a52121;
  --ink:          #2c2c26;   /* near-black warm */
  --ink-soft:     #404040;   /* anthracite */
  --ink-mute:     #6d6d63;

  /* Roles */
  --bg:           var(--paper);
  --fg:           var(--ink);
  --accent:       var(--bordeaux);

  /* Type */
  --font-body: "Avenir Next", "Avenir", "Mulish", system-ui, sans-serif;
  --font-script: "Pacifico", "Brush Script MT", cursive;

  /* Spacing / radius / shadow */
  --container: 1200px;
  --container-wide: 1340px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;
  --r-xl: 38px;
  --shadow-sm: 0 2px 10px rgba(49,64,28,.06);
  --shadow-md: 0 14px 40px -18px rgba(49,64,28,.30);
  --shadow-lg: 0 40px 90px -40px rgba(49,64,28,.45);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.62;
  font-size: 17px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--sage); color: var(--olive); }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--olive);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--bordeaux);
  line-height: 1.3;
}
.eyebrow {
  font-family: var(--font-script);
  color: var(--bordeaux);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  display: inline-block;
  margin-bottom: .35rem;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.32rem); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-mute); }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.container-wide { max-width: var(--container-wide); }
.section { padding-block: clamp(64px, 9vw, 130px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section--olive { background: var(--olive); color: #eef0e2; }
.section--olive h1, .section--olive h2, .section--olive h3 { color: #fff; }
.section--sage { background: var(--sage-050); }
.center { text-align: center; }
.maxw-680 { max-width: 680px; }
.maxw-760 { max-width: 760px; }
.mx-auto { margin-inline: auto; }
.grid { display: grid; gap: clamp(20px, 2.4vw, 34px); }
.stack-sm { display: flex; flex-direction: column; gap: 14px; }

/* ---------- sun / ray motif (very subtle) ---------- */
.rays {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.rays::before {
  content: ""; position: absolute;
  top: var(--ray-y, -30%); left: var(--ray-x, 50%);
  width: 160vmax; height: 160vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    color-mix(in oklab, var(--olive) 100%, transparent) 0deg 0.35deg,
    transparent 0.35deg 7deg);
  opacity: var(--ray-opacity, .035);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 62%);
          mask-image: radial-gradient(circle at center, #000 0%, transparent 62%);
}
.section--olive .rays::before { background: repeating-conic-gradient(from 0deg at 50% 50%, #fff 0deg .35deg, transparent .35deg 7deg); opacity: .05; }
.rays--sage::before { background: repeating-conic-gradient(from 0deg at 50% 50%, var(--olive) 0deg .35deg, transparent .35deg 7deg); }
.has-rays > .container, .has-rays > * { position: relative; z-index: 1; }

/* fine linen texture (used very sparingly: footer / single bands) */
.linen {
  background-image:
    repeating-linear-gradient(45deg, rgba(49,64,28,.022) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(49,64,28,.022) 0 1px, transparent 1px 5px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-weight: 700; font-size: 1.02rem; letter-spacing: .005em;
  padding: .9em 1.5em; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, color .25s, border-color .25s;
  line-height: 1; text-align: center; cursor: pointer; background: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--primary { background: var(--bordeaux); color: #fff; box-shadow: 0 12px 26px -12px rgba(140,24,24,.7); }
.btn--primary:hover { background: var(--bordeaux-600); box-shadow: 0 18px 34px -12px rgba(140,24,24,.7); }
.btn--olive { background: var(--olive); color: #fff; }
.btn--olive:hover { background: var(--olive-600); }
.btn--ghost { border-color: rgba(49,64,28,.28); color: var(--olive); }
.btn--ghost:hover { border-color: var(--olive); background: rgba(49,64,28,.04); }
.btn--light { background: #fff; color: var(--olive); }
.btn--light:hover { background: #fff; box-shadow: var(--shadow-md); }
.btn--lg { padding: 1.05em 1.8em; font-size: 1.08rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4em; font-weight: 700; color: var(--bordeaux);
  position: relative;
}
.link-arrow::after { content:""; position:absolute; left:0; bottom:-3px; height:2px; width:100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow .arrow { transition: transform .35s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: rgba(49,64,28,.10); box-shadow: 0 6px 24px -18px rgba(49,64,28,.5); background: color-mix(in oklab, var(--paper) 94%, transparent); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand .brand-text b { color: var(--olive); font-weight: 800; font-size: .98rem; letter-spacing: -.01em; }
.brand .brand-text span { color: var(--ink-mute); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: .55em .8em; border-radius: 999px; font-weight: 600; font-size: .95rem; color: var(--ink-soft);
  position: relative; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--olive); background: rgba(49,64,28,.05); }
.nav a.active { color: var(--olive); }
.nav a.active::after { content:""; position:absolute; left:50%; transform:translateX(-50%); bottom:2px; width:5px; height:5px; border-radius:50%; background: var(--bordeaux); }
.header-cta { margin-left: 8px; }

.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(49,64,28,.18); background: #fff; align-items:center; justify-content:center; flex-direction: column; gap: 5px; }
.nav-toggle span { display:block; width: 22px; height: 2px; background: var(--olive); transition: transform .3s, opacity .3s; }
.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); }

/* mobile drawer */
.mobile-nav { display: none; }

@media (max-width: 980px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav {
    display: block; position: fixed; inset: 78px 0 auto 0; z-index: 55;
    background: var(--paper); border-bottom: 1px solid rgba(49,64,28,.12);
    box-shadow: var(--shadow-md); padding: 14px clamp(20px,5vw,40px) 26px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .35s var(--ease);
    max-height: calc(100vh - 78px); overflow:auto;
  }
  .mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .mobile-nav a { display: block; padding: .85em .4em; font-size: 1.15rem; font-weight: 700; color: var(--olive); border-bottom: 1px solid rgba(49,64,28,.08); }
  .mobile-nav .btn { margin-top: 18px; width: 100%; }
}

/* ---------- footer (light) ---------- */
.site-footer { background: var(--cream); color: var(--ink-soft); position: relative; overflow: hidden; border-top: 1px solid rgba(49,64,28,.12); }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--olive); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: clamp(28px, 4vw, 60px); padding-block: clamp(56px, 7vw, 88px); position: relative; z-index: 1; }
.footer-logos { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.footer-logos img { height: 67px; width: auto; }
.footer-logos .chip { background: transparent; border-radius: 0; padding: 0; display:flex; align-items:center; box-shadow: none; border: 0; }
.footer-col h4 { color: var(--olive); font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; font-weight: 800; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a { font-weight: 500; }
.footer-news input { width: 100%; padding: .85em 1em; border-radius: 12px; border: 1px solid rgba(49,64,28,.18); background: var(--paper-2); color: var(--ink); font-family: inherit; font-size: .98rem; }
.footer-news input::placeholder { color: var(--ink-mute); }
.footer-news input:focus { outline:none; border-color: var(--olive); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(49,64,28,.18); color: var(--olive); display:flex; align-items:center; justify-content:center; transition: background .25s, transform .25s, border-color .25s; }
.footer-social a:hover { background: rgba(49,64,28,.06); border-color: rgba(49,64,28,.3); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(49,64,28,.12); padding-block: 22px; display:flex; flex-wrap:wrap; gap: 8px 26px; align-items:center; justify-content:space-between; position: relative; z-index: 1; font-size: .88rem; color: var(--ink-mute); }
.footer-bottom .legal { display:flex; gap: 22px; flex-wrap: wrap; }
@media (max-width: 880px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-grid { grid-template-columns: 1fr; } }

/* ---------- image placeholders (brand-color fields + motif label) ---------- */
.ph {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: var(--ph-bg, var(--sage-050));
  display: flex; align-items: flex-end; min-height: 200px; isolation: isolate;
}
.ph::before {
  content:""; position: absolute; inset: 0; z-index: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 2px, transparent 2px 13px);
}
.ph::after {
  content:""; position:absolute; inset:0; z-index:0;
  background: radial-gradient(120% 80% at 80% -10%, rgba(255,255,255,.22), transparent 60%);
}
.ph__label {
  position: relative; z-index: 1; margin: 14px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(4px);
  color: var(--olive); font-size: .76rem; font-weight: 700; letter-spacing: .02em;
  padding: .5em .8em; border-radius: 8px; display: inline-flex; align-items: center; gap: .5em; max-width: calc(100% - 28px);
}
.ph__label::before { content:""; width:8px; height:8px; border-radius:2px; background: var(--bordeaux); flex-shrink: 0; }
.ph__label .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 600; }
.ph--olive { --ph-bg: var(--olive); }
.ph--olive .ph__label { color: var(--olive); }
.ph--sage  { --ph-bg: var(--sage); }
.ph--bordeaux { --ph-bg: var(--bordeaux); }
.ph--sage2 { --ph-bg: #c7cd92; }
.ph[data-ratio="4/3"] { aspect-ratio: 4/3; }
.ph[data-ratio="3/2"] { aspect-ratio: 3/2; }
.ph[data-ratio="16/9"] { aspect-ratio: 16/9; }
.ph[data-ratio="1/1"] { aspect-ratio: 1/1; }
.ph[data-ratio="3/4"] { aspect-ratio: 3/4; }

/* ---------- cards ---------- */
.card {
  background: var(--paper-2); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-sm); border: 1px solid rgba(49,64,28,.07);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  position: relative; overflow: hidden;
}
.card--link:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(49,64,28,.14); }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay: .08s; }
.reveal[data-delay="2"]{ transition-delay: .16s; }
.reveal[data-delay="3"]{ transition-delay: .24s; }
.reveal[data-delay="4"]{ transition-delay: .32s; }
.reveal[data-delay="5"]{ transition-delay: .40s; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1 !important; transform:none !important; } html{ scroll-behavior:auto; } }

/* section heading block */
.sec-head { max-width: 720px; margin-bottom: clamp(34px, 4vw, 56px); }
.sec-head.center { margin-inline: auto; }
.sec-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.sec-head p { margin-top: 1rem; }

/* divider with tiny sun */
.sun-divider { display:flex; align-items:center; justify-content:center; gap: 14px; color: var(--sage); }
.sun-divider::before, .sun-divider::after { content:""; height:1px; width: 60px; background: currentColor; opacity:.6; }
.sun-divider .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bordeaux); box-shadow: 0 0 0 4px rgba(140,24,24,.12); }

/* utility */
.pill-tag { display:inline-flex; align-items:center; gap:.5em; font-size:.8rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color: var(--olive); background: var(--sage-050); border:1px solid rgba(49,64,28,.1); padding:.4em .85em; border-radius:999px; }
