/* style.css — design tokens, reset, typography, motion primitives */
:root {
  /* --- Core palette (names preserved for calendar/contact/gallery JS+CSS) --- */
  --white: #faf8f3;         /* warm paper */
  --paper: #f3ece0;         /* soft limestone */
  --stone: #cbb99a;
  --stone-light: #e6dcca;
  --olive: #4a5e3a;
  --olive-dark: #35462a;
  --terracotta: #bd6543;    /* primary accent — Elba brick */
  --terracotta-light: #d68a68;
  --terracotta-deep: #9c4d30;
  --charcoal: #262320;      /* warm ink */
  --charcoal-light: #5b544c;
  --teal: #35756a;
  --teal-dark: #275a51;
  --cream: #f4eee3;
  --shadow: rgba(38, 35, 32, 0.12);

  /* --- Semantic --- */
  --ink: var(--charcoal);
  --muted: var(--charcoal-light);
  --accent: var(--terracotta);
  --line: rgba(38, 35, 32, 0.10);

  /* --- Fonts --- */
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', sans-serif;

  /* --- Fluid type scale --- */
  --fs-display: clamp(3.4rem, 9vw, 7.5rem);
  --fs-h2: clamp(2.2rem, 4.6vw, 3.8rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.6rem);
  --fs-lead: clamp(1.1rem, 1.7vw, 1.4rem);
  --fs-body: 1rem;
  --fs-eyebrow: 0.72rem;

  /* --- Spacing --- */
  --space-section: clamp(5rem, 11vw, 9rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 1240px;
  --maxw-narrow: 720px;

  /* --- Shape & depth --- */
  --radius: 4px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --shadow-sm: 0 2px 14px rgba(38, 35, 32, 0.07);
  --shadow-md: 0 14px 40px -12px rgba(38, 35, 32, 0.22);
  --shadow-lg: 0 30px 80px -28px rgba(38, 35, 32, 0.4);

  /* --- Motion --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: none;
  background: var(--paper);
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  line-height: 1.72;
  overflow-x: hidden;
}

/* Parchment texture backdrop — pinned to the viewport, shows through
   every light (transparent) section for one continuous aged-paper surface. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(250, 248, 243, 0.34), rgba(250, 248, 243, 0.34)),
    url("../images/Assets/parchment.jpg");
  background-size: cover, cover;
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.35s var(--ease);
}
a:hover { color: var(--terracotta); }

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

/* --- Layout primitives --- */
.section { padding: var(--space-section) var(--gutter); position: relative; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

/* --- Eyebrow (used sparingly) --- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--terracotta);
  margin-bottom: 1.1rem;
}

/* --- Section titles --- */
.section-title {
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.02;
}
.section-title.center { text-align: center; }

/* Legacy centered title look for gallery/calendar/contact headings kept subtle */
.section-gallery .section-title,
.section-calendar .section-title,
.section-contact .section-title,
.section-highlights .section-title {
  text-align: center;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  max-width: 20ch;
}

.section-placeholder {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--muted);
  font-size: var(--fs-lead);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 1.1rem 1.5rem;
  background: rgb(48, 112, 102);   /* same turquoise as the header/nav */
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}
.footer p { opacity: 0.75; }

/* Der Footer folgt dem Header: gleiche Farbe, gleiche Textur, gleiche Linie.
   Die Klassen setzt nav.js aus config.header (bzw. den Vorschau-Parametern),
   damit oben und unten nie auseinanderlaufen. Die Linie sitzt hier oben statt
   unten — das ist die Entsprechung zur Kante unter dem Header. */
.footer.ftr-color { background-color: var(--hdr-col); }
.footer.ftr-texture {
  background-image: url("../images/Assets/parchment.jpg");
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}
.footer.ftr-border { border-top: 1.5px solid rgba(255, 255, 255, 0.55); }

::selection { background: var(--terracotta); color: var(--white); }

/* --- Grain overlay (fixed, non-repainting) --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
}

/* --- Reveal primitives (only activate when JS+GSAP confirm support) --- */
html.motion-ready [data-reveal],
html.motion-ready .gallery-item { opacity: 0; will-change: transform, opacity; }
html.motion-ready .hero-content { opacity: 0; }

/* Legacy fade class still used by main.js fallback */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.9s var(--ease) forwards; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.motion-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .grain { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ===== Scroll effects (effects.js) ===== */
.fx-slats { position: absolute; inset: 0; display: flex; pointer-events: none; z-index: 3; }
.fx-slats i { flex: 1 1 0; background: url("../images/Assets/parchment.jpg") center / cover; box-shadow: 0 0 2px rgba(243,236,224,0.6); will-change: transform; }
.fx-word { display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.05; }
.fx-word > span { display: inline-block; will-change: transform; }
/* narrower editorial column variant */
.section.section--narrow .section-inner, .section--narrow .overview-layout { max-width: 760px; }
