/* ==========================================================
   simon-witschi.ch – Design-Tokens & Layout
   ========================================================== */

:root {
  --c-text: #1e1e1c;
  --c-text-soft: #3d3b37;
  --c-muted: #6f6b64;
  --c-accent: #9a4a12;
  --c-accent-dark: #7b3a0c;
  --c-bg: #ffffff;
  --c-sand: #ead9c0;
  --c-placeholder: #ede6dc;
  --c-placeholder-line: #d9cdbb;
  --c-green: #eff7e1;
  --c-green-line: #d5e6bd;
  --c-green-badge: #cfe0b8;
  --c-peach: #fff1ea;
  --c-peach-line: #f6c7a8;
  --c-dot-1: #fddccb;
  --c-dot-2: #c8ddb0;
  --c-dot-3: #fdc3a0;
  --c-border: #dcd8d2;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --w-text: 760px;
  --w-wide: 1000px;
  --gutter: 24px;
  --section-gap: clamp(64px, 9vw, 112px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text-soft);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-accent); text-underline-offset: 3px; }
a:hover { color: var(--c-accent-dark); }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  color: var(--c-text);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--c-text); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

.container {
  width: 100%;
  max-width: calc(var(--w-wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 1rem;
}

.section { padding-top: var(--section-gap); }
section[id] { scroll-margin-top: calc(72px - var(--section-gap) + 24px); }
.section:last-of-type { padding-bottom: var(--section-gap); }

.lead { font-size: clamp(1.125rem, 2vw, 1.3rem); max-width: var(--w-text); color: var(--c-text-soft); }
.note { color: var(--c-muted); font-size: 0.975rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font: 600 1rem/1 var(--f-body);
  padding: 0.95em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn-primary { background: var(--c-text); color: #fff; }
.btn-primary:hover { background: var(--c-accent); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--c-text); color: var(--c-text); background: transparent; }
.btn-ghost:hover { background: var(--c-text); color: #fff; }
.btn-sm { padding: 0.7em 1.15em; font-size: 0.925rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--c-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand {
  font-family: var(--f-display); font-weight: 800; font-size: 1.3rem;
  color: var(--c-text); text-decoration: none;
}
.brand:hover { color: var(--c-accent); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--c-text); text-decoration: none; font-weight: 500; font-size: 0.975rem; }
.nav a:not(.btn):hover { color: var(--c-accent); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--c-text);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .25s, background-color .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 13ch; margin-bottom: 0.45em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 1.75rem; }
.hero-actions .note { margin: 0; }

/* ---------- Über mich ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-placeholder);
  border: 1px dashed var(--c-placeholder-line);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.portrait img[hidden] { display: none; }
.portrait-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center; padding: 16px;
  color: var(--c-muted); font-size: 0.95rem;
}
.meta { color: var(--c-muted); font-size: 0.95rem; }

.timeline {
  margin-top: 1.5rem;
  padding: 22px 24px;
  background: var(--c-green);
  border: 1px solid var(--c-green-line);
  border-radius: var(--radius-sm);
}
.timeline h3 { font-size: 1.1rem; margin-bottom: 0.9rem; }
.timeline ol { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--c-green-line);
  font-size: 0.975rem; line-height: 1.5;
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline time, .timeline .year { font-weight: 700; color: var(--c-text); font-variant-numeric: tabular-nums; }
.timeline .todo { color: var(--c-muted); font-style: italic; }

/* ---------- Karten ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.card { border-radius: var(--radius); padding: 28px 24px; }
.card p:last-child { margin-bottom: 0; }
.card-sand { background: var(--c-sand); }
.card-sand p { color: #4a443c; font-size: 1rem; }
.card-outline { border: 1px solid var(--c-border); background: #fff; }
.card-green { background: var(--c-green); border: 1px solid var(--c-green-line); }

.dot { width: 38px; height: 38px; border-radius: 50%; margin-bottom: 26px; }
.dot-1 { background: var(--c-dot-1); }
.dot-2 { background: var(--c-dot-2); }
.dot-3 { background: var(--c-dot-3); }

.badge {
  display: inline-block; font-size: 0.8125rem; font-weight: 500;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.badge-peach { background: var(--c-peach); color: #6a3a1c; }
.badge-green { background: var(--c-green-badge); color: #34471f; }

.conditions {
  margin-top: 18px; padding: 18px 20px;
  background: var(--c-peach);
  border: 1px dashed var(--c-peach-line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}
.conditions p:last-child { margin: 0; }

.offer-cta { margin-top: 1.25rem; }

/* ---------- Instagram ---------- */
.insta-grid a {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--c-placeholder);
  border: 1px dashed var(--c-placeholder-line);
  color: var(--c-muted); text-decoration: none; overflow: hidden;
  transition: transform .25s;
}
.insta-grid a:hover { transform: translateY(-3px); }
.insta-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.insta-grid img[hidden] { display: none; }

/* ---------- Kontakt ---------- */
.contact {
  background: var(--c-green);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(28px, 5vw, 48px);
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.contact h2 { max-width: 16ch; }
.contact-direct { margin-top: 1.25rem; font-size: 0.975rem; color: var(--c-text-soft); }
.contact-direct a { color: var(--c-text); font-weight: 600; }

.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.925rem; color: var(--c-text); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--c-text);
  background: #fff; border: 1px solid var(--c-green-line); border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(154, 74, 18, 0.18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.925rem; line-height: 1.5; }
.check input { margin-top: 4px; accent-color: var(--c-accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 500; font-size: 0.95rem; }
.form-status.is-ok { color: #3b5e1c; }
.form-status.is-error { color: #a1260f; }
.form .btn { justify-self: start; }
.form .btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 40px; color: var(--c-muted); font-size: 0.925rem; }
.site-footer a { color: var(--c-muted); }
.site-footer a:hover { color: var(--c-accent); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* ---------- Rechtstexte ---------- */
.legal { max-width: var(--w-text); padding-top: 56px; padding-bottom: 80px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.legal h2 { font-size: 1.375rem; margin-top: 2em; }
.todo-box { background: var(--c-peach); border: 1px dashed var(--c-peach-line); border-radius: var(--radius-sm); padding: 14px 18px; }

/* ---------- Scroll-Einblendung ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .insta-grid a { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .insta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .insta-grid a { border-radius: var(--radius-sm); font-size: 0.85rem; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--c-border);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid #f0ece6; }
  .nav .btn { margin-top: 16px; justify-content: center; }

  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 480px) {
  .insta-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
