/* thedigitalwriter.de — globales Stylesheet
   Design-System: siehe design.md (Cream/Anthrazit/Gold, Space Grotesk)
   Breakpoint für Header/Footer-Umbruch: 880px (siehe technische-architektur.md,
   "Responsive Verhalten des Headers" - Pixelwert war offen, hier festgelegt) */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #FAF8F4;
  --cream-border: #EAE4D9;
  --anthracite: #2A2724;
  --anthracite-elevated: #3A342E;
  --text-secondary: #4A443C;
  --text-tertiary: #6B6459;
  --text-muted: #8A8378;
  --gold: #A8823A;
  --gold-light: #C2AA7E;
  --gold-logo-only: #C79A3B;
  --border-dark: #4A443C;
  --breakpoint: 880px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--anthracite);
  font-family: "Space Grotesk", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 44px; line-height: 1.1; }
h2 { font-size: 30px; line-height: 1.2; margin-top: 1.6em; }
h3 { font-size: 21px; line-height: 1.3; margin-top: 1.3em; }
p { margin: 0 0 1.1em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

@media (min-width: 720px) {
  h1 { font-size: 52px; }
  h2 { font-size: 34px; }
  h3 { font-size: 22px; }
}

/* ============ HEADER ============ */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--cream-border);
  padding: 20px 24px;
}
.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.brand-block { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.brand-row { display: flex; align-items: center; gap: 11px; }
.brand-logo { flex: none; }
.brand-name { font-size: 16.5px; font-weight: 500; letter-spacing: -0.025em; color: var(--anthracite); line-height: 1; }
.claim { display: flex; flex-direction: column; gap: 4px; }
.claim-line {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.claim-line.one { color: var(--anthracite); }
.claim-line.two { color: var(--gold); font-weight: 400; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--cream-border);
  border-radius: 4px;
  width: 44px; height: 40px;
  cursor: pointer;
  flex: none;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { display: none; }
.nav-toggle-icon { width: 20px; height: 2px; background: var(--anthracite); display: block; margin: 4px auto; position: relative; }
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--anthracite); }
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.main-nav a { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.main-nav a:hover { color: var(--gold); text-decoration: none; }
.nav-item { position: relative; }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--cream);
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  padding: 8px;
  min-width: 240px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(42,39,36,0.08);
  z-index: 20;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: flex; }
.nav-dropdown a { padding: 8px 10px; border-radius: 6px; white-space: normal; }
.nav-dropdown a:hover { background: var(--cream-border); text-decoration: none; }
.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--cream) !important;
  background: var(--anthracite);
  padding: 11px 20px;
  border-radius: 4px;
  white-space: nowrap;
}
.nav-cta:hover { text-decoration: none; opacity: 0.9; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--cream-border);
    margin-top: 16px;
  }
  .main-nav.open { display: flex; }
  .site-header-inner { position: relative; }
  .nav-item { width: 100%; }
  .nav-dropdown { position: static; display: flex; box-shadow: none; border: none; padding: 0 0 0 12px; min-width: 0; }
  .main-nav a { padding: 8px 0; display: block; }
  .claim-line { white-space: normal; }
  .nav-cta { margin-top: 8px; }
}

/* ============ FOOTER ============ */
.site-footer { background: var(--cream); border-top: 1px solid var(--cream-border); padding: 52px 24px 28px; }
.footer-cols { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 15px; flex: none; max-width: 260px; }
.footer-tagline { font-size: 13px; line-height: 1.7; color: var(--text-tertiary); }
.footer-col { display: flex; flex-direction: column; gap: 10px; flex: none; }
.footer-col-title { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--anthracite); margin-bottom: 4px; }
.footer-col a { font-size: 13.5px; color: var(--text-secondary); }
.footer-contact { font-size: 13.5px; line-height: 1.7; color: var(--text-secondary); }
.footer-bottom { max-width: var(--max-width); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--cream-border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-copyright { font-size: 12.5px; color: var(--text-muted); }
.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal a { font-size: 12.5px; color: var(--text-muted); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--anthracite); color: var(--cream); }
.btn-primary:hover { background: #211f1c; }
.btn-secondary { background: transparent; color: var(--anthracite); border-color: var(--anthracite); }
.btn-secondary:hover { background: var(--anthracite); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--cream); }
.btn-gold:hover { background: #94722f; }
.btn-center-wrap { text-align: center; margin: 40px 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.link-arrow { display: inline-block; color: var(--gold); text-decoration: underline; }
.link-arrow:hover { color: var(--anthracite); }

/* ============ SECTIONS / CARDS ============ */
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.hero { padding: 64px 0 40px; background-image: radial-gradient(var(--cream-border) 1px, transparent 1px); background-size: 18px 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--gold); display: inline-block; }

.card { border: 1px solid var(--cream-border); border-radius: 16px; padding: 28px; background: var(--cream); }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .card-grid.cols-2 { grid-template-columns: 1fr 1fr; } .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--cream-border); color: var(--text-secondary); }
.badge-gold { border-color: var(--gold); color: var(--gold); }

table.price-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
table.price-table th, table.price-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--cream-border); vertical-align: top; }
table.price-table th { font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12.5px; color: var(--text-secondary); }
.table-scroll { overflow-x: auto; }

/* ============ FORMS ============ */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 15px; }
.form-hint { font-size: 13px; color: var(--text-tertiary); margin: 4px 0 8px; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cream-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--anthracite);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; font-size: 14.5px; }
.checkbox-field input { margin-top: 4px; }
.checkbox-field .pdf-link { display: block; font-size: 13px; margin-top: 2px; }
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.char-counter { font-size: 12.5px; color: var(--text-muted); text-align: right; }
.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fbeaea; border: 1px solid #d98c8c; color: #7a2020; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; font-size: 14.5px; }
.form-success { background: #eef4ea; border: 1px solid #a9c99a; color: #33511f; border-radius: 8px; padding: 14px 16px; margin-bottom: 20px; font-size: 14.5px; }
fieldset { border: none; padding: 0; margin: 0 0 20px; }
legend { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 10px; padding: 0; }

/* ============ FAQ ============ */
.faq-item { border-bottom: 1px solid var(--cream-border); padding: 18px 0; }
.faq-item h3 { margin-top: 0; }

/* ============ WIDGET (ChatGPT-Test) ============ */
.widget { background: #fff; border: 1px solid var(--cream-border); border-radius: 16px; padding: 24px; margin: 28px 0; }
.widget-prompt { font-size: 18px; font-weight: 500; line-height: 1.6; }
.widget-prompt input {
  border: none;
  border-bottom: 2px solid var(--gold);
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: var(--anthracite);
  padding: 2px 4px;
  min-width: 140px;
}
.widget-answer { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--cream-border); font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; }
.widget-privacy { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }
.widget-status { font-size: 14px; color: var(--text-tertiary); margin-top: 10px; }

/* ============ MISC ============ */
.legal-content h2 { font-size: 22px; margin-top: 1.8em; }
.legal-content h3 { font-size: 17px; }
.section-jump { display: flex; gap: 16px; margin-bottom: 24px; font-weight: 500; }
.thanks-page { text-align: center; padding: 80px 0; }
.thanks-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }
