/* ---- Tokens ---- */
:root {
  --bg: #ece7d8;
  --ink: #6c1f35;
  --ink-soft: #6c1f35cc;
  --accent: #29bdb8;
  --accent-ink: #f6f2e4;
  --btn-bg: #6c1f35;
  --btn-ink: #f6f2e4;
  --rule: #6c1f3555;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --pad-x: clamp(20px, 4vw, 56px);
  --corner-size: clamp(45px, 6vw, 110px);
  --glass-bg: rgba(236, 231, 216, 0.08);
  --glass-border: rgba(255, 255, 255, 0.4);
  --modal-glass-bg: rgba(236, 231, 216, 0.85);
}

[data-theme="dark"] {
  --bg: #6c1f35;
  --ink: #e6eed6;
  --ink-soft: #e6eed6cc;
  --accent: #29bdb8;
  --accent-ink: #6c1f35;
  --btn-bg: #e6eed6;
  --btn-ink: #6c1f35;
  --rule: #e6eed655;
  --glass-bg: rgba(108, 31, 53, 0.18);
  --glass-border: rgba(255, 255, 255, 0.14);
  --modal-glass-bg: rgba(108, 31, 53, 0.85);
}

/* ---- Reset ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

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

/* Shared fill for all illustrator-exported line art (logo, doodles, corners) */
.cls-1 { fill: currentColor; }

.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 var(--pad-x);
}

/* ---- Frame ---- */
.frame {
  position: relative;
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.frame > main { flex: 1 0 auto; }
.frame > .footer { flex: 0 0 auto; margin-top: auto; }

/* ---- Corner accents ---- */
.corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  color: var(--accent);
  pointer-events: none;
  z-index: 0;
}

.corner svg { width: 100%; height: 100%; display: block; }

.corner--tl { top: 0; left: 0; }
.corner--tr { top: 0; right: 0; transform: scaleX(-1); }
.corner--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.corner--br { bottom: 0; right: 0; transform: scale(-1, -1); }

.nav, main, .footer { position: relative; z-index: 1; }

/* ---- Nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--pad-x);
  flex-wrap: wrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  font-size: 0.95rem;
  font-weight: 300;
}

.nav__links a:not(.btn) {
  position: relative;
  padding-bottom: 2px;
}

.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transition: right 0.25s ease;
}

.nav__links a:not(.btn):hover::after { right: 0; }

/* ---- Mobile menu toggle ---- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle__icon { width: 30px; height: auto; display: block; }

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: fixed;
  top: 78px;
  left: var(--pad-x);
  right: var(--pad-x);
  z-index: 40;
  padding: 8px 20px 20px;
  font-size: 1rem;
  font-weight: 300;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;

  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.35);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu a:not(.btn) {
  width: 100%;
  padding: 12px 0;
}

.mobile-menu a:not(.btn) + a:not(.btn) {
  border-top: 1px solid var(--rule);
}

@media (max-width: 680px) {
  .nav__links { display: none; }
  .menu-toggle { display: block; }
}

@media (min-width: 681px) {
  .mobile-menu { display: none; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 0.8rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.btn--pill {
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-radius: 999px;
  padding: 5px 12px;
}

.btn--cta {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 23px;
  padding: 10px 28.75px;
  font-size: 1.05rem;
  line-height: 1.1;
  text-align: center;
  font-weight: 300;
  box-shadow: 0 12px 30px -14px rgba(0,0,0,0.35);
}

.btn--cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 20px 40px -14px rgba(0,0,0,0.45);
  opacity: 1;
}

.btn--cta:active {
  transform: translateY(-1px) scale(1.01);
}

/* ---- Hero / Wordmark ---- */
.hero {
  display: flex;
  justify-content: center;
  padding: clamp(28px, 6vw, 60px) var(--pad-x);
}

.wordmark { margin: 0; width: 100%; max-width: 1160px; }
.wordmark__svg { width: 100%; height: auto; color: var(--ink); display: block; }

/* ---- CTA ---- */
.cta {
  display: flex;
  justify-content: center;
  padding: clamp(75px, 11vw, 135px) var(--pad-x) clamp(30px, 5vw, 60px);
}

.cta__wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deco--bird { height: 78px; width: auto; color: var(--ink); flex: none; }

.deco--bird-left {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-right: 16px;
  height: 192px;
}

.deco--bird-right {
  position: absolute;
  right: -96px;
  bottom: 100%;
  margin-bottom: -9px;
}


/* ---- Doodles ---- */
.doodles {
  position: relative;
  height: clamp(220px, 30vw, 380px);
  color: var(--ink);
}

.deco { overflow: visible; }

/* visuals1 – rechts, mittig am Rand */
.deco--hatch {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(440px, 20vw, 280px);
  height: auto;
}

/* visuals5 – center bottom */
.deco--swash-1 {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  width: clamp(660px, 22vw, 320px);
  height: auto;
}

/* visuals4 – Platz von visuals1 (links oben) */
.deco--swash-2 {
  position: absolute;
  left: var(--pad-x);
  top: 20%;
  width: clamp(220px, 16vw, 220px);
  height: auto;
}

/* Mobile */
@media (max-width: 640px) {
  .cta {
    padding-top: clamp(90px, 26vw, 150px);
  }

  /* visuals3 – links neben/leicht überlappend mit dem Button */
  .deco--bird-left {
    right: auto;
    left: -28px;
    top: -48px;
    transform: none;
    margin-right: 0;
    width: 74px;
    height: auto;
  }

  /* visuals2 – rechts, überlappt den Button oben */
  .deco--bird-right {
    right: auto;
    bottom: auto;
    left: 131px;
    top: -55px;
    margin-bottom: 0;
    width: 124px;
    height: auto;
  }

  .doodles {
    position: relative;
    height: clamp(300px, 85vw, 360px);
    padding: 0;
    margin-bottom: 7px;
  }

  /* visuals4 */
  .deco--swash-2 {
    position: absolute;
    left: 6%;
    top: 50px;
    width: 44%;
    max-width: 200px;
    transform: none;
  }

  /* visuals1 (Hatch) – läuft bewusst über den rechten Rand hinaus */
  .deco--hatch {
    position: absolute;
    left: 52%;
    right: auto;
    top: 160px;
    width: 86%;
    max-width: 360px;
    transform: none;
  }

  /* visuals5 – läuft bewusst über den linken Rand hinaus */
  .deco--swash-1 {
    position: absolute;
    left: -16%;
    bottom: auto;
    top: 270px;
    width: 92%;
    max-width: 680px;
    transform: none;
  }
}

/* ---- Footer ---- */
.footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--pad-x) 23px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.footer__copy { margin: 0; color: var(--ink); font-weight: 300; }

.footer__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}

.footer__links a:not(.btn) { font-weight: 300; }

@media (max-width: 640px) {
  .footer__row {
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
  }
}

/* ---- Contact Overlay ---- */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pad-x);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-overlay.is-open { opacity: 1; visibility: visible; }

.contact-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 13, 0.15);
}

.contact-modal {
  position: relative;
  width: min(552px, 100%);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding: clamp(28px, 5vw, 44px);

  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);

  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s ease;
}

.contact-overlay.is-open .contact-modal {
  transform: translateY(0) scale(1);
}

.contact-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 6px;
  line-height: 0;
}

.contact-modal__title {
  margin: 0 0 24px;
  padding-right: 30px;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--ink);
}

.contact-modal--thanks {
  width: min(420px, 100%);
  text-align: center;
}

.contact-modal__thanks-text {
  margin: 10px 0 28px;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink);
}

.contact-modal--thanks .contact-form__submit {
  display: inline-flex;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.contact-form__field input,
.contact-form__field textarea {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 6px 2px;
  resize: none;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

@media (min-width: 681px) {
  .contact-form__field textarea {
    min-height: 120px;
  }
}

.contact-form__submit {
  align-self: center;
  margin-top: 16px;
  padding: 5px 12px;
  font-weight: 300;
  border-radius: 999px;
  font-size: 0.8rem;
}

.contact-form__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  align-self: center;
  text-align: center;
}

/* ---- Motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
