/* Maserai – statische Website
   Farben: Papier (= Fotohintergrund), Kiefer (Markengrün), Eiche, Brand (Gravur) */

@font-face {
  font-family: "Platypi";
  src: url("../fonts/platypi.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Platypi";
  src: url("../fonts/platypi-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ede8e1;
  --paper-deep: #e2dbd0;
  --ink: #1f1a16;
  --ink-soft: #5b5148;
  --pine: #1e4c45;
  --pine-deep: #12302a;
  --pine-line: rgba(237, 232, 225, .14);
  --oak: #c48e57;
  --oak-light: #dcae7b;
  --burn: #4a2a17;

  --font-display: "Platypi", "Rockwell", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.25rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 3rem;
  padding: .75rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-oak { background: var(--oak); color: var(--pine-deep); }
.btn-oak:hover { background: var(--oak-light); }
.btn-pine { background: var(--pine); color: var(--paper); }
.btn-pine:hover { background: var(--pine-deep); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(237, 232, 225, .08); }
.btn .arrow { font-family: var(--font-mono); font-weight: 400; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 48, 42, .92);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
  color: var(--paper);
  border-bottom: 1px solid var(--pine-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-stretch: 85%;
  font-size: 1.05rem;
  letter-spacing: .22em;
}
.brand img { width: 34px; height: 34px; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  padding: .5rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .975rem;
  color: rgba(237, 232, 225, .78);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--paper); background: rgba(237, 232, 225, .07); }
.nav a[aria-current] { color: var(--paper); background: rgba(237, 232, 225, .1); }
.nav .nav-cta {
  margin-left: .75rem;
  color: var(--pine-deep);
  background: var(--oak);
  font-weight: 600;
}
.nav .nav-cta:hover { color: var(--pine-deep); background: var(--oak-light); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border: 1px solid var(--pine-line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: 500 .95rem var(--font-body);
  cursor: pointer;
}
.menu-toggle .bars { position: relative; width: 16px; height: 10px; }
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s ease, top .25s ease;
}
.menu-toggle .bars::before { top: 1px; }
.menu-toggle .bars::after { top: 7.5px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .75rem var(--gutter) 1.25rem;
    background: var(--pine-deep);
    border-bottom: 1px solid var(--pine-line);
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: .9rem 0; border-radius: 0; border-bottom: 1px solid var(--pine-line); font-size: 1.1rem; }
  .js .nav a[aria-current] { background: none; }
  .js .nav .nav-cta { margin: 1rem 0 0; padding: .9rem 1.25rem; border: 0; border-radius: 999px; text-align: center; }
  .no-js .site-header .wrap { height: auto; flex-wrap: wrap; padding-block: .75rem; }
  .no-js .nav { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--pine-deep);
  color: var(--paper);
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 7vw, 6rem);
}
.hero::before {
  /* Werkstattlicht hinter dem Brett */
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 70%;
  height: 140%;
  background: radial-gradient(closest-side, rgba(196, 142, 87, .2), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.hero-eyebrow { color: var(--oak-light); margin-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(3.1rem, 7.4vw, 6.4rem);
  font-weight: 450;
  line-height: .95;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 350;
  color: var(--oak-light);
}
.hero-lead {
  max-width: 34rem;
  margin-top: 1.75rem;
  font-size: clamp(1.075rem, 1.4vw, 1.2rem);
  color: rgba(237, 232, 225, .82);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.engraver { margin: 0; justify-self: center; width: min(100%, 25rem); }
.board {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  transform: rotate(2.5deg);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)) drop-shadow(0 6px 10px rgba(0, 0, 0, .3));
}
.engraver figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pine-line);
  color: rgba(237, 232, 225, .7);
}
.engraver figcaption p { max-width: 17rem; font-size: .875rem; line-height: 1.45; }
.engraver .pattern-no { display: block; color: var(--paper); margin-bottom: .2rem; }
.regen {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .95rem;
  border: 1px solid rgba(237, 232, 225, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: 500 .875rem var(--font-body);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.regen:hover { border-color: var(--oak-light); background: rgba(196, 142, 87, .12); }
.regen svg { width: 15px; height: 15px; transition: transform .5s ease; }
.regen:hover svg { transform: rotate(180deg); }

/* Gravur-Animation: Linien werden "eingebrannt" und kühlen ab */
.cut {
  fill: none;
  stroke: var(--burn);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.is-engraving .cut {
  stroke: #ffd59a;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    engrave var(--dur, .9s) cubic-bezier(.55, .1, .45, .9) var(--delay, 0s) forwards,
    cool .9s ease calc(var(--delay, 0s) + var(--dur, .9s) * .7) forwards;
}
@keyframes engrave { to { stroke-dashoffset: 0; } }
@keyframes cool {
  from { stroke: #ffd59a; }
  to { stroke: var(--burn); }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .engraver { width: min(100%, 22rem); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head .label { display: block; color: var(--pine); margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(2.25rem, 4.6vw, 3.6rem); }
.section-head p { margin-top: 1.25rem; font-size: 1.125rem; color: var(--ink-soft); }

/* ---------- Produkte ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
}
.product + .product {
  margin-top: clamp(4rem, 8vw, 6.5rem);
  padding-top: clamp(4rem, 8vw, 6.5rem);
  border-top: 1px solid rgba(31, 26, 22, .12);
}
.product-media { margin: 0; position: relative; }
.product-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.product--flip .product-media { order: 2; }
.product h3 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.product-body > p { margin-top: 1.1rem; max-width: 30rem; color: var(--ink-soft); font-size: 1.125rem; }

.specs {
  margin: 2rem 0 2.25rem;
  max-width: 30rem;
  border-top: 1px solid rgba(31, 26, 22, .16);
}
.specs > div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(31, 26, 22, .16);
}
.specs dt { color: var(--ink-soft); padding-top: .2rem; }
.specs dd { margin: 0; }

.wood-switch {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  padding: .25rem;
  border-radius: 999px;
  background: rgba(237, 232, 225, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(31, 26, 22, .12);
}
.wood-switch button {
  padding: .45rem .9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.wood-switch button[aria-pressed="true"] { background: var(--pine); color: var(--paper); }
.no-js .wood-switch { display: none; }

.custom-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: clamp(4rem, 8vw, 6rem);
  padding: 1.75rem 2rem;
  border: 1.5px dashed rgba(30, 76, 69, .45);
  border-radius: var(--radius);
}
.custom-note p { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; max-width: 36rem; }

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; }
  .product--flip .product-media { order: 0; }
}

/* ---------- Werkstatt ---------- */
.workshop { background: var(--paper-deep); }
.workshop .wrap {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.workshop-aside { position: sticky; top: calc(var(--header-h) + 2rem); }
.workshop-aside .section-head { margin-bottom: 2.5rem; }
.workshop-aside figure { margin: 0; }
.workshop-aside img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); }
.workshop-aside figcaption { margin-top: .75rem; color: var(--ink-soft); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 2.25rem 0;
  border-top: 1px solid rgba(31, 26, 22, .16);
}
.steps li:last-child { border-bottom: 1px solid rgba(31, 26, 22, .16); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--pine);
  padding-top: .55rem;
}
.steps h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.steps p { margin-top: .6rem; color: var(--ink-soft); max-width: 32rem; }

@media (max-width: 900px) {
  .workshop .wrap { grid-template-columns: 1fr; }
  .workshop-aside { position: static; }
}
@media (max-width: 520px) {
  .steps li { grid-template-columns: 1fr; gap: .25rem; }
  .steps li::before { padding-top: 0; }
}

/* ---------- Kontakt ---------- */
.contact { background: var(--pine-deep); color: var(--paper); }
.contact .section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.contact .section-head .label { color: var(--oak-light); }
.contact .section-head p { color: rgba(237, 232, 225, .78); }
.contact-mail {
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  max-width: 100%;
  padding-bottom: .15em;
  border-bottom: 2px solid var(--oak);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6.2vw, 4.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s ease, border-color .2s ease;
}
.contact-mail .arrow { font-family: var(--font-mono); font-size: .45em; color: var(--oak-light); transition: transform .2s ease; }
.contact-mail:hover { color: var(--oak-light); border-color: var(--oak-light); }
.contact-mail:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine-deep);
  color: rgba(237, 232, 225, .7);
  border-top: 1px solid var(--pine-line);
  padding-block: 3.5rem 2.5rem;
  font-size: .95rem;
}
.site-footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.site-footer .brand { color: var(--paper); }
.site-footer .tagline { margin-top: 1rem; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--paper); }
.site-footer h2 { font: 400 .75rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(237, 232, 225, .5); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.site-footer address { font-style: normal; }
.site-footer .copy { grid-column: 1 / -1; padding-top: 2rem; border-top: 1px solid var(--pine-line); font-size: .85rem; color: rgba(237, 232, 225, .5); }

@media (max-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Rechtstexte & 404 ---------- */
.legal { padding-block: clamp(3.5rem, 8vw, 6rem); }
.legal .wrap { max-width: 50rem; }
.legal .label { display: block; color: var(--pine); margin-bottom: 1rem; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 2.5rem; }
.legal h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 2.75rem 0 .85rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 26, 22, .14);
}
.legal p, .legal ul { color: #3a332d; max-width: 65ch; }
.legal p + p { margin-top: 1rem; }
.legal ul { padding-left: 1.2rem; margin: .75rem 0 0; }
.legal li + li { margin-top: .35rem; }
.legal a { color: var(--pine); text-underline-offset: 3px; }
.legal .meta { margin-top: 3rem; font-size: .9rem; color: var(--ink-soft); }

.not-found { min-height: 60vh; display: grid; align-items: center; }
.not-found p { margin-top: 1.25rem; font-size: 1.15rem; color: var(--ink-soft); }
.not-found .btn { margin-top: 2rem; }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
  .is-engraving .cut { stroke: var(--burn); stroke-dashoffset: 0; animation: none; }
}

/* Ghost-Button auf hellem Grund */
.custom-note .btn-ghost { color: var(--pine); }
.custom-note .btn-ghost:hover { background: rgba(30, 76, 69, .08); }
.no-js .regen { display: none; }
