/* =========================================================
   ATIS Terrassenüberdachungen — Design Tokens
   Aesthetic: Editorial Bauhaus / German Luxury
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,300;1,9..144,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@300..600&display=swap');

:root {
  /* === Color tokens === */
  --ink: #0E0E0E;
  --ink-soft: #1A1918;
  --charcoal: #2A2926;
  --graphite: #4A4844;
  --stone: #8A857C;
  --linen: #E8DFD0;
  --bone: #F5F0E8;
  --paper: #FAF7F1;
  --pearl: #FFFEFA;

  --sand: #C9B89A;
  --ember: #C8763A;
  --ember-soft: #E8A971;
  --moss: #4A5240;

  /* Semantic */
  --bg: var(--paper);
  --bg-elev: var(--pearl);
  --bg-dark: var(--ink);
  --bg-charcoal: var(--charcoal);
  --fg: var(--ink);
  --fg-muted: var(--graphite);
  --fg-subtle: var(--stone);
  --border: rgba(14, 14, 14, 0.08);
  --border-strong: rgba(14, 14, 14, 0.18);

  /* Typography */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  /* Scale (perfect-fifth-ish for display, modular for body) */
  --fs-overline: 0.72rem;
  --fs-body-sm: 0.875rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-lead: 1.375rem;
  --fs-h6: 1.25rem;
  --fs-h5: 1.5rem;
  --fs-h4: 2rem;
  --fs-h3: 2.75rem;
  --fs-h2: 3.75rem;
  --fs-h1: clamp(2.25rem, 8vw, 7.5rem);
  --fs-display: clamp(3.5rem, 14vw, 14rem);

  /* Spacing (base 8) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;
  --sp-40: 10rem;

  /* Radii — kept subtle for premium feel */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 200ms;
  --t-med: 480ms;
  --t-slow: 900ms;

  /* Layout */
  --container: 1440px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* Prevent horizontal overflow on mobile */
html, body { max-width: 100vw; overflow-x: hidden; }
@media (max-width: 600px) {
  :root { --sp-32: 5rem; --sp-24: 4rem; --sp-20: 3.5rem; --sp-16: 3rem; }
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: 'ss01', 'ss03', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* German long-word handling for narrow viewports */
@media (max-width: 600px) {
  p, li, dd, .lead, .hero-lead, .editorial-body p, .manifesto-text p {
    overflow-wrap: anywhere;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: normal;
  }
  h1, h2, h3, h4, .hero h1, .page-hero h1 {
    overflow-wrap: anywhere;
    hyphens: manual;
  }
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--ember); color: var(--paper); }

/* === Grain overlay (subtle paper texture) === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.05' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: multiply;
}

/* === Typography primitives === */
.fr-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.fr-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: 'opsz' 100;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.fr-italic {
  font-style: italic;
  font-variation-settings: 'opsz' 14;
}
.overline {
  font-family: var(--font-mono);
  font-size: var(--fs-overline);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
}
@media (max-width: 600px) {
  .overline { letter-spacing: 0.1em; font-size: 0.65rem; }
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--fg-muted);
  font-weight: 300;
  max-width: 56ch;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--sp-32); }
.section-tight { padding-block: var(--sp-20); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-8);
  min-height: 48px;
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid transparent;
  position: relative;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .btn { padding: var(--sp-4) var(--sp-6); font-size: 0.82rem; width: 100%; justify-content: center; white-space: normal; }
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--ember);
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.btn .arrow { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* === Reveal animation === */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
