/* ============================================================
   HOLEE: Editorial theme for Mennonitengemeinde Basel-Holee
   Direction: Holee Editorial. One accent (petrol). Paper ground.
   ============================================================ */

:root {
  /* Color roles: palette derived from the fse-church theme (church's choice) */
  --bg:        #FBF6ED;   /* warm cream ground */
  --surface:   #FFFFFF;   /* raised */
  --surface-2: #EFE7D6;   /* sunk / tint block */
  --ink:       #1D3131;   /* deep teal-black */
  --muted:     #5C6A66;   /* secondary ink */
  --line:      #DED4BF;   /* hairline */
  --line-strong:#CDBF9F;
  --accent:    #2F5D5E;   /* teal: interactive */
  --accent-deep:#25494A;
  --accent-ink:#FBF6ED;   /* text on accent */
  --highlight: #E7B24E;   /* amber: non-text highlight only */
  --dark:      #1D3131;   /* dark section ground */
  --focus:     #2F5D5E;

  /* Duotone for historical imagery */
  --duo-shadow:#1D3131;
  --duo-light: #FBF6ED;

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --step--1: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);
  --step-0:  clamp(1.02rem, 0.99rem + 0.16vw, 1.14rem);
  --step-1:  clamp(1.22rem, 1.14rem + 0.40vw, 1.50rem);
  --step-2:  clamp(1.55rem, 1.36rem + 0.95vw, 2.30rem);
  --step-3:  clamp(2.00rem, 1.60rem + 2.00vw, 3.40rem);
  --step-4:  clamp(2.60rem, 1.90rem + 3.50vw, 5.20rem);
  --step-5:  clamp(3.10rem, 2.10rem + 5.00vw, 6.60rem);

  /* Space scale (density ~0.30, airy) */
  --s-1: 0.5rem;
  --s-2: 0.85rem;
  --s-3: 1.35rem;
  --s-4: 2.15rem;
  --s-5: 3.4rem;
  --s-6: 5.5rem;
  --s-7: 8.5rem;

  --radius: 2px;
  --container: 74rem;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --header-h: 4.75rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset (UA-neutralising rules wrapped in :where) ---------- */
*, *::before, *::after { box-sizing: border-box; }
:where(h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,ul,ol) { margin: 0; }
:where(ul[class],ol[class]) { list-style: none; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern';
  overflow-x: hidden;
}

img, picture, svg, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
strong, b { font-weight: 600; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.008em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); line-height: 1.14; }
h4 { font-size: var(--step-1); line-height: 1.2; }
.display-italic, h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; }

p { max-width: var(--measure); }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink); font-weight: 400; }
.muted { color: var(--muted); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s-3);
}

/* ---------- Layout ---------- */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.container--narrow { --container: 46rem; }
.container--wide { --container: 84rem; }

.section { padding-block: var(--s-6); }
.section + .section { padding-top: 0; }
.section--tint { background: var(--surface-2); padding-block: var(--s-6); }
.section--accent { background: var(--accent); color: var(--accent-ink); padding-block: var(--s-6); }
.section--accent .eyebrow { color: color-mix(in srgb, var(--accent-ink) 78%, var(--accent)); }
.section--accent a { color: var(--accent-ink); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.95em 1.6em; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.15s var(--ease);
}
.btn--primary { background: var(--accent-deep); color: var(--accent-ink); }
.btn--primary:hover { background: #1B3839; }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.section--accent .btn--primary { background: var(--accent-ink); color: var(--accent); }
.section--accent .btn--primary:hover { background: color-mix(in srgb, var(--accent-ink) 88%, var(--accent)); }

.link-arrow {
  display: inline-flex; align-items: baseline; gap: 0.5em;
  font-weight: 600; font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  border-bottom: 2px solid var(--highlight); padding-bottom: 0.25em;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-arrow::after { content: '\2192'; transition: transform 0.25s var(--ease); }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
.link-arrow:hover::after { transform: translateX(4px); }

.text-link { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); }
.text-link:hover { text-decoration-color: var(--accent); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: var(--s-3); top: -100vh; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.7em 1.1em; border-radius: var(--radius);
}
.skip-link:focus { top: var(--s-3); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), transform 0.45s var(--ease);
}
.site-header[data-scrolled='true'] { border-bottom-color: var(--line); }
.site-header[data-hidden='true'] { transform: translateY(-100%); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand__mark { width: 2.75rem; height: auto; flex-shrink: 0; display: block; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-size: 1.34rem; font-weight: 600; letter-spacing: 0.01em; }
.brand__sub { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Primary nav (desktop) */
.primary-nav { display: none; }
@media (min-width: 62rem) {
  .primary-nav { display: block; }
  .primary-nav > ul { display: flex; align-items: center; gap: var(--s-4); list-style: none; margin: 0; padding: 0; }
  .primary-nav a {
    display: inline-block; text-decoration: none; color: var(--ink);
    font-size: var(--step--1); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
    padding-block: 0.4em; position: relative;
  }
  .primary-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -0.15em; height: 2px;
    background: var(--highlight); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
  }
  .primary-nav li:hover > a::after,
  .primary-nav .current-menu-item > a::after,
  .primary-nav .current-menu-parent > a::after,
  .primary-nav a:focus-visible::after { transform: scaleX(1); }
  .primary-nav .menu-item-has-children { position: relative; }
  .primary-nav .sub-menu {
    position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px);
    min-width: 15rem; background: var(--surface); border: 1px solid var(--line);
    padding: var(--s-2); display: grid; gap: 0.1rem;
    opacity: 0; visibility: hidden; transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
    box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--ink) 40%, transparent);
  }
  .primary-nav .menu-item-has-children:hover .sub-menu,
  .primary-nav .menu-item-has-children:focus-within .sub-menu {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
  }
  .primary-nav .sub-menu a { text-transform: none; letter-spacing: 0; font-weight: 500; padding: 0.55em 0.7em; }
  .primary-nav .sub-menu a::after { display: none; }
  .primary-nav .sub-menu a:hover { background: var(--surface-2); color: var(--accent); }
}
.header-cta { display: none; }
@media (min-width: 62rem) { .header-cta { display: inline-flex; } }
/* Intern: one button to the public website instead of its navigation, on all screen sizes. */
.header-public { display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap; }
.header-public__kurz { display: none; }
@media (max-width: 40rem) { .header-public__lang { display: none; } .header-public__kurz { display: inline; } }
/* Intern: dark header like the footer, light logo (logo-cream) and text. */
.site-header { background: var(--ink); color: var(--bg); border-bottom-color: var(--ink); }
.site-header[data-scrolled='true'] { border-bottom-color: var(--ink); }
.site-header .brand { color: var(--bg); }
.site-header .brand__sub { color: color-mix(in srgb, var(--bg) 62%, var(--ink)); }
.site-header .header-public { border-color: color-mix(in srgb, var(--bg) 40%, var(--ink)); color: var(--bg); }
.site-header .header-public:hover { border-color: var(--highlight); color: var(--highlight); }
.site-header .header-public:focus-visible { outline-color: var(--highlight); }
/* "Holee - intern": the word intern in italics, same size as the name. */
.brand__intern { white-space: nowrap; }
.brand__intern i { font-style: italic; font-weight: inherit; }
/* Phones: logo, name and button side by side without overflowing; the button keeps its room. */
.site-header .brand { flex-shrink: 1; min-width: 0; }
.site-header .header-public { flex-shrink: 0; }
@media (max-width: 30rem) {
  .site-header__inner { gap: var(--s-2); }
  .site-header .brand { gap: 0.5rem; }
  .site-header .brand__mark { width: 2.2rem; }
  .site-header .brand__name { font-size: 1.15rem; }
  .site-header .brand__sub { font-size: 0.56rem; letter-spacing: 0.08em; }
  .site-header .header-public { padding: 0.55em 0.8em; font-size: 0.78rem; }
}

/* Mobile nav toggle + overlay */
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
  width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; cursor: pointer; padding: 0 0.7rem;
}
@media (min-width: 62rem) { .nav-toggle { display: none; } }
.nav-toggle span { height: 1.5px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  padding: calc(var(--header-h) + var(--s-4)) var(--gutter) var(--s-5);
  overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s var(--ease);
}
.mobile-nav[data-open='true'] { clip-path: inset(0 0 0 0); }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav > ul > li { border-top: 1px solid var(--line); }
.mobile-nav > ul > li:last-child { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; text-decoration: none; color: var(--ink); padding: 0.9em 0; font-family: var(--font-display); font-size: var(--step-2); }
.mobile-nav .sub-menu a { font-family: var(--font-body); font-size: var(--step-0); padding: 0.5em 0 0.5em var(--s-3); color: var(--muted); }
.mobile-nav .sub-menu { padding-bottom: 0.6em; }
body[data-nav-open='true'] { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(84svh, 48rem);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: var(--s-6) var(--s-5);
  overflow: clip;
}
@media (max-width: 47.99rem) {
  .hero { min-height: auto; padding-block: var(--s-4) var(--s-5); justify-content: flex-start; }
}
.hero__canvas-wrap {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 1; }
.hero__emboss {
  position: absolute; top: 50%; right: -4vw; transform: translateY(-50%);
  width: min(40rem, 54vw); color: var(--ink);
}
@media (max-width: 47.99rem) {
  .hero__emboss { right: -22%; width: 24rem; opacity: 0.7; }
}
.hero__emboss img, .emboss-mark { width: 100%; height: auto; opacity: 0.06; }
.hero__emboss { display: block; }
.has-webgl .hero__emboss { display: none; }

.hero__inner { position: relative; z-index: 2; }
.hero__title {
  font-size: clamp(2.55rem, 1.5rem + 4.4vw, 4.7rem);
  font-weight: 400; line-height: 1.06; letter-spacing: -0.015em; max-width: 18ch;
}
.hero__title em { color: var(--ink); }
.hero .eyebrow { margin-bottom: var(--s-3); }
.hero__lede { margin-top: var(--s-4); max-width: 34rem; }
.hero__actions { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); }

.hero__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, var(--bg) 34%, color-mix(in srgb, var(--bg) 55%, transparent) 62%, transparent 100%);
}

/* ---------- Meta strip ---------- */
.meta-strip { border-block: 1px solid var(--line); }
.meta-strip ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 48rem) { .meta-strip ul { grid-template-columns: repeat(3, 1fr); } }
.meta-strip li { padding: var(--s-3) 0; display: flex; flex-direction: column; gap: 0.15rem; }
@media (min-width: 48rem) {
  .meta-strip li + li { border-left: 1px solid var(--line); padding-left: var(--s-4); }
}
.meta-strip .k { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.meta-strip .v { font-family: var(--font-display); font-size: var(--step-1); }

/* ---------- Reveal (JS hides, so content stays visible if JS fails) ---------- */
.reveal { transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-pre { opacity: 0; transform: translateY(1.4rem); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-pre { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Figures / images ---------- */
figure.media { margin: 0; }
figure.media img { width: 100%; border-radius: var(--radius); }
figure.media figcaption { margin-top: var(--s-2); font-size: var(--step--1); color: var(--muted); }
.media--bleed { width: 100vw; margin-inline: calc(50% - 50vw); }
.media--bleed img { border-radius: 0; aspect-ratio: 21 / 9; object-fit: cover; max-height: 66vh; }
.media--bleed figcaption { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }

/* Historical imagery: restrained teal duotone via filter (reliable, light) */
.is-historical { position: relative; isolation: isolate; }
.is-historical img {
  filter: grayscale(1) brightness(1.07) contrast(0.98) sepia(0.55) hue-rotate(140deg) saturate(0.72);
}
.is-historical::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  mix-blend-mode: multiply;
}

/* placeholder while real images pending */
.ph {
  display: block; width: 100%;
  border-radius: var(--radius); background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)), var(--surface-2) 62%);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.ph--portrait { aspect-ratio: 3 / 4; }
.ph--wide { aspect-ratio: 16 / 9; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--bg) 86%, var(--ink)); padding-block: var(--s-6) var(--s-4); margin-top: var(--s-7); }
.site-footer a { color: color-mix(in srgb, var(--bg) 90%, var(--ink)); text-decoration: none; }
.site-footer a:hover { color: var(--bg); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.footer-grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 52rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { font-size: var(--step-2); color: var(--bg); max-width: 20ch; }
.site-footer .eyebrow { color: color-mix(in srgb, var(--bg) 62%, var(--ink)); }
.footer-contact { font-style: normal; line-height: 1.9; }
.footer-meta { margin-top: var(--s-5); padding-top: var(--s-3); border-top: 1px solid color-mix(in srgb, var(--bg) 22%, var(--ink)); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--step--1); color: color-mix(in srgb, var(--bg) 60%, var(--ink)); }

/* ---------- Prose (long-form pages) ---------- */
.prose > * + * { margin-top: var(--s-3); }
.prose h2 { margin-top: var(--s-5); font-size: var(--step-2); }
.prose h3 { margin-top: var(--s-4); font-size: var(--step-1); }
.prose p, .prose li { max-width: var(--measure); }
.prose ul { list-style: none; padding: 0; }
.prose ul li { position: relative; padding-left: 1.4em; }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 0.6em; height: 2px; background: var(--highlight); }
.prose blockquote {
  margin: var(--s-5) 0; padding-left: var(--s-3); border-left: 3px solid var(--highlight);
  font-family: var(--font-display); font-size: var(--step-2); font-style: italic; line-height: 1.3; color: var(--ink);
}
.prose a { color: var(--accent); text-decoration: underline; text-decoration-color: var(--line-strong); }
.prose a.btn, .prose a.link-arrow { text-decoration: none; }
.prose a.btn--primary { color: var(--accent-ink); }
.prose a.btn--primary:hover { color: var(--accent-ink); }
.prose a.link-arrow { color: var(--ink); }

/* ---------- Utility ---------- */
.stack-sm > * + * { margin-top: var(--s-2); }
.stack > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-4); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Mobile-Startseite: statisches Bild des 3D-Motivs ---------- */
.hero__poster { display: none; }
@media (max-width: 47.99rem) {
  .hero { min-height: 68svh; }
  .hero__emboss { display: none; }
  .hero__poster {
    display: block; position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    object-position: center 58%; opacity: 0.9; pointer-events: none;
  }
  .has-webgl .hero__poster { display: none; }
}
