/* =============================================
   Atelier für Leben & Tod — Stylesheet
   Design: Contemplative, reduziert, würdevoll
   ============================================= */

/* === Self-hosted Fonts === */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-regular-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-regular-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Design Tokens === */
/* TOKENS-START */

:root {
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Inter', 'Segoe UI', sans-serif;
  --bg: #f5efe6;
  --surface: color-mix(in srgb, #f5efe6 80%, #fff);
  --surface-hover: color-mix(in srgb, #f5efe6 90%, #fff);
  --text: #30251d;
  --muted: #8d7967;
  --accent: #b8844e;
  --accent-soft: color-mix(in srgb, #b8844e 60%, #f5efe6);
  --rose: #b8844e;
  --rose-soft: color-mix(in srgb, #b8844e 30%, #f5efe6);
  --mustard: #8d7967;
  --mustard-soft: color-mix(in srgb, #8d7967 40%, #f5efe6);
  --gold: #b8844e;
  --gold-glow: color-mix(in srgb, #b8844e 15%, transparent);
  --line: color-mix(in srgb, #30251d 10%, transparent);
  --radius: 0.5rem;
  --max-w: 72rem;
  --content-w: 42rem;
}
/* TOKENS-END */

/* === 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-sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 180ms ease;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* === Skip Link === */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 1rem;
}

/* === Typography === */

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

h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-bottom: 0.5rem;
}

p {
  margin-top: 0.75rem;
  max-width: 65ch;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
}

/* === Layout === */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: clamp(1.5rem, 5vw, 3rem);
  padding-right: clamp(1.5rem, 5vw, 3rem);
  padding-left: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-right));
}

.content-narrow {
  max-width: var(--content-w);
}

.section {
  padding: clamp(3.5rem, 10vh, 7rem) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

/* === Header === */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem clamp(1.5rem, 5vw, 3rem);
  padding-left: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.5rem, 5vw, 3rem), env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--accent);
}

/* === Navigation === */

.main-nav ul {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--rose-soft);
}

/* Sub-navigation */
.has-sub {
  position: relative;
}

.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0;
  min-width: 10rem;
  z-index: 60;
}

.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav {
  display: block;
}

.sub-nav a {
  padding: 0.35rem 1rem;
  border-radius: 0;
  white-space: nowrap;
}

/* Burger Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 250ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* === Header Banner === */

.header-banner {
  width: 100%;
  max-height: 45vh;
  overflow: hidden;
  line-height: 0;
}

.header-banner img {
  width: 100%;
  height: 45vh;
  object-fit: cover;
  object-position: center 30%;
}

@media (max-width: 768px) {
  .header-banner {
    max-height: 30vh;
  }

  .header-banner img {
    height: 30vh;
  }
}

/* === Hero === */

.hero {
  padding: clamp(5rem, 18vh, 12rem) 0 clamp(4rem, 12vh, 8rem);
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: 1.25rem;
}

.hero p {
  max-width: 48ch;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.hero .btn {
  margin-top: 2rem;
}

/* === Buttons === */

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  min-height: 2.75rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: 0 2px 10px var(--gold-glow);
}

.btn--primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* === Cards === */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--gold-glow);
  transition: border-color 200ms ease, box-shadow 250ms ease, transform 250ms ease;
}

.card:hover {
  border-left-color: var(--rose);
  box-shadow: 0 4px 20px var(--gold-glow);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* === Product Cards === */

.product-card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rose);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--gold-glow);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.product-card:hover {
  box-shadow: 0 4px 20px var(--gold-glow);
  transform: translateY(-2px);
}

.product-card .eyebrow {
  margin-bottom: 0.5rem;
  color: var(--rose);
}

.product-card .btn {
  margin-top: 1.25rem;
}

/* === CTA Banner === */

.cta-banner {
  padding: clamp(3rem, 8vh, 5rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  background: linear-gradient(135deg, var(--rose-soft) 0%, var(--mustard-soft) 100%);
  border-radius: var(--radius);
  max-width: var(--max-w);
  margin: 2rem auto;
}

.cta-banner p {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.8rem);
  max-width: 36ch;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
  color: var(--text);
}

/* === Statement Block === */

.statement {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  line-height: 1.5;
  max-width: 30ch;
  color: var(--text);
}

.statement em {
  font-style: italic;
  color: var(--gold);
}

/* === Editorial List === */

.editorial-list article {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.editorial-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.editorial-list .meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* === Page Content === */

.page-header {
  padding: clamp(4rem, 14vh, 9rem) 0 clamp(2rem, 6vh, 4rem);
}

.page-header p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 55ch;
}

.page-content h2 {
  margin-top: 2.5rem;
}

.page-content ul {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.page-content ul li {
  margin-top: 0.35rem;
  color: var(--muted);
}

.page-content ul li::marker {
  color: var(--gold);
}

/* === Forms === */

form {
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
  margin-top: 1.5rem;
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease;
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.form-check input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  accent-color: var(--gold);
}

.form-check label {
  font-size: 0.85rem;
  line-height: 1.5;
}

.form-success {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.form-error {
  color: #8b3a3a;
  font-size: 0.85rem;
  font-weight: 400;
}

/* === Bridge Section === */

.bridge {
  padding: clamp(2rem, 6vh, 4rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.bridge a {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

/* === Footer === */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(2.5rem, 6vh, 4rem) clamp(1.5rem, 5vw, 3rem);
  padding-bottom: max(clamp(2.5rem, 6vh, 4rem), env(safe-area-inset-bottom));
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
}

.footer-tagline {
  margin-top: 0.25rem;
  font-style: italic;
}

.footer-nav ul {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-bridge {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.footer-bridge a {
  font-family: var(--font-serif);
  color: var(--gold);
}

.footer-copy {
  font-size: 0.8rem;
  color: color-mix(in oklab, var(--muted) 60%, transparent);
}

/* === Scroll Reveal === */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* === Responsive: Mobile (iPhone) === */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg);
    background-image:
      none;
    z-index: 55;
    padding: 5rem 1.5rem 2rem;
    padding-top: calc(5rem + env(safe-area-inset-top));
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    font-size: 1.15rem;
    padding: 0.85rem 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }

  .sub-nav {
    position: static;
    display: block;
    background: none;
    border: none;
    padding: 0 0 0 1.25rem;
  }

  .sub-nav a {
    font-size: 1rem;
    padding: 0.6rem 0;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }

  h3 {
    font-size: 1.15rem;
  }

  .hero {
    padding: clamp(3rem, 12vh, 5rem) 0 clamp(2.5rem, 8vh, 4rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .page-header {
    padding: clamp(2.5rem, 10vh, 4rem) 0 clamp(1.5rem, 4vh, 2rem);
  }

  .statement {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .section {
    padding: clamp(2.5rem, 8vh, 4rem) 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .product-card {
    padding: 1.5rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }

  form {
    max-width: 100%;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* === Responsive: Tablet (iPad) === */

@media (min-width: 769px) and (max-width: 1199px) {
  h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
  }

  .hero {
    padding: clamp(4rem, 14vh, 7rem) 0 clamp(3rem, 10vh, 5rem);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: clamp(3rem, 10vh, 5rem) 0;
  }
}

/* === Reduced Motion === */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* === Print === */

@media print {
  .site-header,
  .nav-toggle,
  .skip-link,
  .cta-banner,
  .bridge,
  form {
    display: none;
  }

  body {
    background: #fff;
    background-image: none;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
  }

  .section {
    padding: 1.5rem 0;
    page-break-inside: avoid;
  }
}
