/* ===== FONTS (selbst gehostet, SIL OFL) ===== */
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== VARIABLES ===== */
:root {
  /* Marke */
  --green-900: #3f6d20;
  --green-700: #5d9a32;
  --green-500: #7db94b;
  --green-400: #9bc873;
  --green-300: #c6dca9;
  --green-100: #d6e4c4;
  --green-50: #eef3e3;
  --gray-900: #1d1d1b;
  --gray-800: #2a2a27;
  --gray-700: #3a3a37;
  --gray-500: #6b6b66;
  --gray-300: #e4e4e0;
  --gray-100: #f5f7ee;
  --white: #ffffff;

  /* Apple-Systemfarben (Light) — semantische Zustände */
  --sys-blue: #007AFF;
  --sys-red: #FF3B30;
  --sys-orange: #FF9500;
  --sys-green: #34C759;

  --bg: var(--white);
  --bg-alt: var(--green-50);
  --text: var(--gray-900);
  --text-muted: var(--gray-500);
  --card-bg: var(--white);
  --card-border: var(--gray-300);

  /* Liquid Glass */
  --glass-bg: rgba(255,255,255,.95);
  --glass-blur: blur(30px) saturate(1.8);
  --nav-bg: var(--glass-bg);

  --shadow: 0 2px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  /* Apple HIG: Spring-Curve für Übergänge */
  --spring: cubic-bezier(.34,1.56,.64,1);
  --transition: .3s var(--spring);
  --transition-fast: .2s var(--spring);

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

  /* Typo-Skala (Apple HIG) — nichts unter 11px */
  --fs-caption2: 11px;
  --fs-caption: 12px;
  --fs-footnote: 13px;
  --fs-subhead: 14px;
  --fs-body: 15px;
  --fs-callout: 16px;
  --fs-headline: 17px;
  --fs-title3: 20px;
  --fs-title2: 22px;
  --fs-title1: 28px;
  --fs-largetitle: 34px;
}

[data-theme="dark"] {
  --sys-blue: #0A84FF;
  --sys-red: #FF453A;
  --sys-orange: #FF9F0A;
  --sys-green: #30D158;

  --bg: #141a0f;
  --bg-alt: #1c2415;
  --text: #eef4de;
  --text-muted: #9ca3af;
  --card-bg: #202a17;
  --card-border: #3a4a25;

  --glass-bg: rgba(30,30,30,.85);
  --nav-bg: var(--glass-bg);

  --shadow: 0 2px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.4);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 200;
  background: var(--green-500); color: #fff; padding: .75rem 1.5rem;
  border-radius: var(--radius-sm); font-weight: 600; font-size: var(--fs-subhead);
}
.skip-link:focus { top: 1rem; }
*:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ===== UTILITIES ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-gradient { color: var(--green-700); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-title1), 4vw, var(--fs-largetitle));
  font-weight: 700; line-height: 1.15; letter-spacing: -.4px;
  text-align: center; margin-bottom: .5rem;
}
.section-sub { text-align: center; color: var(--text-muted); font-size: var(--fs-headline); margin-bottom: 3rem; max-width: 680px; margin-left: auto; margin-right: auto; }
.section-title--left, .section-sub--left { text-align: left; margin-left: 0; margin-right: 0; }
/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.5rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: var(--fs-body); border: 2px solid transparent;
  cursor: pointer; transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  font-family: var(--font); background: none; color: var(--text);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.btn--primary:hover { background: var(--green-700); border-color: var(--green-700); transform: translateY(-1px); }
.btn--outline { border-color: var(--green-500); color: var(--green-500); }
.btn--outline:hover { background: var(--green-500); color: #fff; transform: translateY(-1px); }
.btn--ghost { border: none; padding: .5rem; min-width: 44px; }
.btn--sm { padding: .45rem 1rem; font-size: var(--fs-subhead); }
.btn--lg { padding: .8rem 2rem; font-size: var(--fs-headline); min-height: 50px; }
.btn--block { width: 100%; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  transition: box-shadow var(--transition);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo { font-size: var(--fs-title3); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; }
.logo-icon { color: var(--green-500); }
.theme-icon { display: block; }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

/* ===== HERO ===== */
.hero { padding: 7.5rem 0 4.5rem; background: var(--bg); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 6fr 5fr; gap: 4rem; align-items: center; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(var(--fs-largetitle), 5.5vw, 62px);
  font-weight: 700; line-height: 1.06; letter-spacing: -1.2px; margin-bottom: 1.25rem;
}
.hero__sub { font-size: var(--fs-headline); color: var(--text-muted); margin-bottom: 2rem; max-width: 520px; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero-Entrance (läuft nur bei prefers-reduced-motion: no-preference, s. unten) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .hero__title, .hero__sub, .hero__cta, .hero__visual { animation: rise .7s var(--spring) both; }
  .hero__sub { animation-delay: .1s; }
  .hero__cta { animation-delay: .18s; }
  .hero__visual { animation-delay: .12s; }
}

/* Hero-Visual: iPad + iPhone */
.hero__visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: 100%;
  border-radius: 38px; overflow: hidden;
  background: #10130c;
  border: 6px solid #10130c;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.08);
}
[data-theme="dark"] .phone { border-color: #000; background: #000; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.1); }
.phone img, .phone video {
  display: block; width: 100%; height: auto;
  border-radius: 32px;
}

.hero__devices { position: relative; width: 100%; max-width: 640px; padding: 0 0 2.5rem 2.75rem; }
.tablet {
  border-radius: 32px; overflow: hidden;
  background: #10130c; border: 16px solid #10130c;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.08);
}
[data-theme="dark"] .tablet { border-color: #000; background: #000; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.1); }
.tablet img { display: block; width: 100%; height: auto; border-radius: 16px; }
.phone--overlay {
  position: absolute; left: 0; bottom: 0; width: 27%;
  border-radius: 24px; border-width: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.phone--overlay img { border-radius: 20px; }

/* ===== NUTZEN ===== */
.benefits { padding: 5rem 0; background: var(--bg-alt); }
.benefits .section-title { margin-bottom: 2.5rem; }
.benefits__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.benefit {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
}
.benefit h3 { font-family: var(--font-display); font-size: var(--fs-headline); font-weight: 700; margin: 1rem 0 .35rem; }
.benefit p { color: var(--text-muted); font-size: var(--fs-subhead); line-height: 1.55; }
.benefit__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-50); color: var(--green-700);
}
[data-theme="dark"] .benefit__icon { background: rgba(150,194,111,.14); color: var(--green-400); }

/* ===== KONTAKT ===== */
.contact { padding: 5rem 0 6rem; background: var(--bg); }
.contact__inner { display: grid; grid-template-columns: 5fr 7fr; gap: 3.5rem; align-items: start; }
.contact__lead { color: var(--text-muted); font-size: var(--fs-headline); margin: .75rem 0 1.75rem; }
.contact__direct { display: grid; gap: .6rem; font-size: var(--fs-callout); }
.contact__direct a { color: var(--green-700); font-weight: 600; }
.contact__direct a:hover { text-decoration: underline; }
[data-theme="dark"] .contact__direct a { color: var(--green-400); }
.contact__card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-lg);
}
.contact__card .contact-form { margin: 0; }
.form-optional { font-weight: 400; color: var(--text-muted); }
.form-note { margin-top: .9rem; font-size: var(--fs-caption); color: var(--text-muted); line-height: 1.5; }
.form-note a, .contact__card noscript a { color: var(--green-700); text-decoration: underline; }
[data-theme="dark"] .form-note a { color: var(--green-400); }

/* ===== FOOTER ===== */
.footer { padding: 2rem 0; background: var(--green-900); color: #cde8d5; font-size: var(--fs-subhead); }
.footer__simple { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.footer__legal a { display: inline-flex; align-items: center; min-height: 44px; opacity: .8; }
.footer__legal a:hover { opacity: 1; color: var(--green-300); }
.footer__bottom { text-align: center; font-size: var(--fs-footnote); opacity: .6; }

/* ===== LEGAL PAGES ===== */
.legal { padding: 7rem 0 4rem; background: var(--bg); }
.legal__back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 1.5rem; color: var(--green-500); font-weight: 500; font-size: var(--fs-subhead); }
.legal__back:hover { text-decoration: underline; }
.legal h1 { font-size: clamp(var(--fs-title1), 4vw, var(--fs-largetitle)); font-weight: 700; letter-spacing: -.4px; margin-bottom: 2rem; }
.legal h2 { font-size: var(--fs-title3); font-weight: 700; margin-top: 2rem; margin-bottom: .75rem; color: var(--green-700); }
[data-theme="dark"] .legal h2 { color: var(--green-400); }
.legal h3 { font-size: var(--fs-callout); font-weight: 600; margin-top: 1.25rem; margin-bottom: .5rem; }
.legal p { margin-bottom: .75rem; color: var(--text-muted); line-height: 1.7; }
.legal a { color: var(--green-500); text-decoration: underline; }
.legal ul { margin: .75rem 0 1rem 1.5rem; list-style: disc; }
.legal li { color: var(--text-muted); line-height: 1.7; margin-bottom: .25rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: var(--fs-subhead); }
.legal th, .legal td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--card-border); vertical-align: top; }
.legal th { font-weight: 600; color: var(--text); }
.legal td { color: var(--text-muted); }
.legal__scroll { overflow-x: auto; }

/* ===== CONTACT FORM ===== */
.contact-form { margin: 2rem 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; font-size: var(--fs-subhead); margin-bottom: .4rem; }
.form-group input,
.form-group textarea {
  width: 100%; min-height: 44px; padding: .75rem 1rem; border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: var(--fs-callout);
  background: var(--bg); color: var(--text); transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green-500); outline: none; box-shadow: 0 0 0 3px rgba(122,173,76,.15); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group--honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-top: 1rem; font-size: var(--fs-subhead); display: none; }
.form-status:not(:empty) { display: block; }
.form-status--success { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-300); }
.form-status--error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
[data-theme="dark"] .form-status--success { background: rgba(150,194,111,.15); color: var(--green-300); }
[data-theme="dark"] .form-status--error { background: rgba(220,38,38,.15); color: #fca5a5; border-color: rgba(220,38,38,.3); }

/* ===== LEGAL DISCLAIMER ===== */
.legal__disclaimer {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: var(--fs-footnote);
  margin-bottom: 2rem;
}
[data-theme="dark"] .legal__disclaimer { background: rgba(251,146,60,.1); border-color: rgba(251,146,60,.3); color: #fed7aa; }
.widerruf-form {
  background: var(--bg-alt); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); padding: 1.5rem; margin: 1rem 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: var(--fs-footnote);
}
.widerruf-form p { margin-bottom: .5rem; color: var(--text); }

/* ===== 404 ERROR PAGE ===== */
.error-page { padding: 8rem 0 6rem; text-align: center; background: var(--bg); min-height: 70vh; display: flex; align-items: center; }
.error-page__code { font-size: clamp(6rem, 20vw, 12rem); font-weight: 700; letter-spacing: -4px; line-height: 1; margin-bottom: 1rem; }
.error-page h1 { font-size: clamp(var(--fs-title1), 4vw, var(--fs-largetitle)); font-weight: 700; margin-bottom: 1rem; }
.error-page p { font-size: var(--fs-headline); color: var(--text-muted); max-width: 500px; margin: 0 auto 2rem; }
.error-page__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .benefits__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .hero { padding: 6.5rem 0 3.5rem; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .hero__sub { margin: 0 auto 2rem; }
  .hero__cta { justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .contact__card { padding: 1.5rem; }
  .footer__simple { flex-direction: column; text-align: center; }
  .footer__legal { justify-content: center; }
}

@media (max-width: 520px) {
  .benefits__grid { grid-template-columns: 1fr; }
}

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

/* ===== FARMLIFE WORDMARK ===== */
.wm { display: inline-flex; align-items: baseline; letter-spacing: -0.02em; font-size: 1.45rem; line-height: 1; font-family: var(--font-display); }
.wm-farm { font-weight: 400; color: var(--green-500); }
.wm-life { font-weight: 700; color: var(--text); }
