/* ============================================================
   Cosy Fox — Base
   Reset + typographic defaults. Loaded after tokens.css.
   ============================================================ */

/* ---------- Reset ---------- */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

ul[role="list"], ol[role="list"] { padding: 0; list-style: none; }

html:focus-within { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, svg {
  max-width: 100%;
  display: block;
  height: auto;
}

input, button, textarea, select { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--color-mustard);
  color: var(--color-espresso);
}

/* ---------- Self-hosted fonts ----------
   Drop woff2 files into assets/fonts/ with these exact filenames
   and the @font-face declarations will pick them up automatically.
   Until they're present, the body-stack falls back to system fonts. */

@font-face {
  font-family: "Inter";
  src: local("Inter Regular"), local("Inter-Regular"),
       url("../assets/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: local("Inter Light"), local("Inter-Light"),
       url("../assets/fonts/Inter-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: local("Inter Medium"), local("Inter-Medium"),
       url("../assets/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: local("Cormorant Garamond Medium"), local("CormorantGaramond-Medium"),
       url("../assets/fonts/CormorantGaramond-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: local("Cormorant Garamond SemiBold"), local("CormorantGaramond-SemiBold"),
       url("../assets/fonts/CormorantGaramond-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Typography ---------- */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-base);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-headline);
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 600; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { text-wrap: pretty; max-width: var(--content-narrow); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-espresso-soft);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1.5px;
  background: var(--hairline-accent);
  vertical-align: middle;
}
.eyebrow--center::before { display: none; }
.eyebrow--no-mark::before { display: none; }
.scene--dark .eyebrow { color: var(--on-dark-soft); }
.scene--dark .eyebrow::before { background: var(--hairline-accent); }

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
}

.lead {
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.25rem);
  line-height: var(--lh-relaxed);
  color: var(--color-text-soft);
  max-width: var(--content-narrow);
}

.fine {
  font-size: var(--fs-small);
  color: var(--color-text-soft);
}

.price {
  font-family: var(--font-body);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Links inside prose */
.prose a {
  border-bottom: 1px solid var(--color-line-strong);
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.prose a:hover { border-color: var(--color-mustard); }

/* Focus visible — for keyboard users */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-mustard);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-espresso);
  color: var(--color-creme);
  z-index: var(--z-modal);
}
.skip-link:focus { top: 0; }

/* ============================================================
   CSS-native Motion (Index 3.0)
   View Transitions + Scroll-driven Animations, beide als
   progressive enhancement — Browsers ohne Support zeigen
   den Final-State direkt.
   ============================================================ */

/* Cross-Page View Transitions (Chromium ≥ 126, Firefox-Labs)
   — sanfter Übergang zwischen den HTML-Seiten ohne SPA */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--dur-vt);
  animation-timing-function: var(--ease-vt);
}

/* Scroll-driven reveal (Chromium ≥ 115, Safari/FF unter @supports-Gate)
   — fade + leichtes hochziehen, getrieben vom Element-In-View-Progress */
@supports (animation-timeline: view()) {
  .reveal-on-view {
    animation: cf-fade-up linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}
@keyframes cf-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced-Motion Gate: alle Motion-Effekte aus, finale Zustände direkt.
   Tokens-Durations sind oben schon auf 0 — diese Regel kümmert sich um
   keyframe-Animations und View Transitions. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
  .reveal-on-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
