/* ==========================================================
   sonder atelier – Styles
   Farben, Schriften und Abstände zentral in :root anpassen.
   ========================================================== */

/* ---------- Schriften (lokal gehostet, DSGVO-freundlich) ---------- */
@font-face { font-family: "Inter Tight"; font-weight: 200; font-style: normal; font-display: swap; src: url("../fonts/inter-tight-latin-200-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/inter-tight-latin-800-normal.woff2") format("woff2"); }

/* ---------- Design-Tokens ---------- */
:root {
  --bg: #0E0E0E;
  --surface: #141414;
  --surface-2: #191919;
  --border: #242424;
  --border-soft: #1C1C1C;
  --text: #EDEAE4;
  --text-2: #B8B4AE;
  --muted: #8F8B85;
  --dim: #3A3835;
  --accent: #C08552;
  --accent-rgb: 192, 133, 82;

  --font: "Inter Tight", system-ui, -apple-system, sans-serif;
  --max: 1200px;
  --pad: 32px;
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }
a { color: var(--text); transition: color .3s ease; }
a:hover { color: var(--accent); }
h1, h2, h3, p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.accent { color: var(--accent); }
.thin { font-weight: 200; }
.bold { font-weight: 800; }
.muted { color: var(--muted); }
.text { font-size: 17px; line-height: 1.5; color: var(--text-2); }

/* Filmkorn über der ganzen Seite – gibt Tiefe statt flachem Schwarz */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease;
}
.nav.is-scrolled {
  background: rgba(14, 14, 14, .72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--border-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.logo { display: flex; align-items: baseline; text-decoration: none; line-height: 1; letter-spacing: -.05em; font-size: 30px; }
.logo__s { font-weight: 800; color: var(--text); }
.logo__a { font-weight: 200; color: var(--accent); margin-left: -1px; transition: transform .5s var(--ease-out); display: inline-block; }
.logo:hover .logo__a { transform: translateX(3px); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__link { position: relative; text-decoration: none; color: var(--text-2); }
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 999px;
  padding: 16px 28px; font-size: 16px; font-weight: 600; line-height: 1;
  transition: transform .4s var(--ease-out), background .3s ease, color .3s ease, border-color .3s ease, box-shadow .4s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { display: inline-block; transition: transform .4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light:hover { background: #fff; color: var(--bg); box-shadow: 0 10px 40px -10px rgba(var(--accent-rgb), .55); }
.btn--outline { border: 1px solid #3A3A3A; color: var(--text); padding: 15px 27px; }
.btn--outline:hover { border-color: var(--text); color: var(--text); }
.btn--small { padding: 11px 18px; font-size: 15px; }
.btn--large { padding: 20px 32px; font-size: 18px; }
.btn--outline.btn--large { padding: 19px 31px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px; padding-bottom: 40px; overflow: hidden; isolation: isolate;
}
/* warmes Licht wie eine Schreibtischlampe – folgt leicht der Maus */
.hero__glow {
  position: absolute; z-index: -1; width: 900px; height: 900px; border-radius: 50%;
  left: var(--gx, 70%); top: var(--gy, 30%); transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(var(--accent-rgb), .22) 0%, rgba(var(--accent-rgb), .06) 35%, transparent 65%);
  filter: blur(20px); opacity: 0; animation: fade-in 2s .4s ease forwards;
}
.hero__inner { display: flex; flex-direction: column; gap: 32px; width: 100%; margin-top: auto; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--muted); }
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .8); animation: pulse 2.4s ease-in-out infinite; }
.hero__title {
  display: flex; align-items: baseline;
  font-size: clamp(34px, 9.4vw, 138px); line-height: .92; letter-spacing: -.055em; font-weight: 800;
}
.mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.mask__inner { display: block; transform: translateY(105%); animation: slide-up 1.3s .15s var(--ease-out) forwards; }
.hero__dot { color: var(--accent); display: inline-block; transform: scale(0); animation: pop 0.7s 1.1s var(--ease-out) forwards; }
.hero__lead { max-width: 560px; font-size: 22px; line-height: 1.45; color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero__meta {
  width: 100%; margin-top: auto; padding-top: 72px;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted);
}
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scroll-hint__line { position: relative; width: 48px; height: 1px; background: var(--dim); overflow: hidden; }
.scroll-hint__line::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: scan 2.2s ease-in-out infinite; }

/* ---------- Laufband ---------- */
.marquee {
  border-block: 1px solid var(--border-soft); padding-block: 28px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; align-items: center; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { font-size: clamp(36px, 5vw, 64px); font-weight: 200; letter-spacing: -.04em; color: var(--muted); white-space: nowrap; }
.marquee__track i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Statement (Wörter leuchten beim Scrollen auf) ---------- */
.statement-wrap { padding-block: 160px 80px; }
.statement { max-width: 1050px; font-size: clamp(30px, 4.6vw, 60px); line-height: 1.12; letter-spacing: -.035em; font-weight: 600; }
.statement .w { color: var(--dim); transition: color .35s ease; }
.statement .w.is-lit { color: var(--text); }
.no-js .statement { color: var(--text); }

/* ---------- Abschnitte ---------- */
.section { padding-block: 120px; display: flex; flex-direction: column; gap: 56px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section__title { font-size: clamp(40px, 6vw, 72px); line-height: 1; letter-spacing: -.045em; font-weight: 800; }
.section__lead { max-width: 340px; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.tile {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column;
  transition: border-color .5s ease, transform .6s var(--ease-out), opacity .9s var(--ease);
}
/* Lichtkegel folgt der Maus auf jeder Kachel */
.tile::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), .10), transparent 60%);
}
.tile:hover { border-color: #34302C; transform: translateY(-4px); }
.tile:hover::before { opacity: 1; }
.tile__body { padding: 36px 40px 40px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.tile__num { font-size: 14px; color: var(--accent); font-weight: 600; }
.tile__title { font-size: 32px; letter-spacing: -.03em; font-weight: 600; }
.tile__visual { position: relative; }

.tile--logo   { grid-column: span 3; }
.tile--colors { grid-column: span 3; }
.tile--type   { grid-column: span 2; }
.tile--web    { grid-column: span 4; flex-direction: row; align-items: stretch; }
.tile--web .tile__body { flex: 1 1 40%; justify-content: flex-end; }

/* Logo-Kachel */
.tile__visual--logo { height: 260px; display: grid; place-items: center; background: radial-gradient(circle at 50% 60%, #1D1A17, transparent 70%); }
.mono { font-size: 150px; line-height: 1; letter-spacing: -.06em; display: flex; align-items: baseline; }
.mono__s { font-weight: 800; color: var(--text); }
.mono__a { font-weight: 200; color: var(--accent); margin-left: -4px; display: inline-block; transition: transform .8s var(--ease-out); }
.tile--logo:hover .mono__a { transform: translateX(10px) rotate(-6deg); }

/* Farb-Kachel */
.swatches { height: 260px; display: flex; gap: 10px; padding: 32px 32px 0; }
.swatch {
  flex: 1; border-radius: 18px 18px 0 0; background: var(--c); border: 1px solid #2A2A2A; border-bottom: 0;
  display: flex; align-items: flex-end; padding: 14px; transition: flex .7s var(--ease-out);
}
.swatch span { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--c); filter: invert(1) grayscale(1) contrast(9); opacity: .85; }
.swatches:hover .swatch { flex: .7; }
.swatches .swatch:hover { flex: 2; }

/* Schrift-Kachel */
.type-specimen { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 40px 40px; min-height: 360px; }
.type-specimen__aa { font-size: 180px; line-height: .8; letter-spacing: -.06em; font-weight: 800; transition: font-weight .8s var(--ease-out); font-variation-settings: normal; }
.tile--type:hover .type-specimen__aa { font-weight: 200; }
.type-specimen__meta { font-size: 17px; line-height: 1.4; }

/* Web-Kachel: Mini-Browser */
.browser {
  flex: 1 1 60%; margin: 32px 0 0 0; border: 1px solid #2C2C2C; border-right: 0; border-bottom: 0;
  border-radius: 16px 0 0 0; background: #101010; overflow: hidden; min-height: 320px;
}
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #222; }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2E2E2E; }
.browser__url { margin-left: 14px; font-size: 12px; color: var(--muted); background: #191919; padding: 5px 12px; border-radius: 999px; }
.browser__page { padding: 22px 26px; display: flex; flex-direction: column; gap: 12px; transition: transform 1.2s var(--ease-out); }
.tile--web:hover .browser__page { transform: translateY(-40px); }
.sk { background: #222; border-radius: 6px; }
.sk--nav { display: flex; justify-content: space-between; background: none; margin-bottom: 18px; }
.sk--nav span { width: 34px; height: 10px; background: #2A2A2A; border-radius: 4px; }
.sk--nav span:last-child { width: 70px; background: var(--accent); opacity: .8; }
.sk--title { height: 26px; width: 78%; background: #2C2C2C; }
.sk--short { width: 52%; }
.sk--line { height: 10px; width: 64%; margin-top: 6px; }
.sk--mid { width: 46%; margin-top: 0; }
.sk--btn { height: 28px; width: 110px; border-radius: 999px; background: var(--text); opacity: .85; margin-top: 8px; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.sk-grid span { height: 90px; border-radius: 10px; background: #1B1B1B; border: 1px solid #262626; }

/* ---------- Ablauf ---------- */
.steps { position: relative; display: flex; flex-wrap: wrap; gap: 48px; padding-top: 48px; }
.steps__line { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--border); }
.steps__line::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.6s .2s var(--ease-out);
}
.steps.is-visible .steps__line::after { transform: scaleX(1); }
.step { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.step__num { font-size: 64px; font-weight: 200; letter-spacing: -.04em; color: var(--muted); transition: color .4s ease; }
.step:hover .step__num { color: var(--accent); }
.step__title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- Kontakt ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; padding-block: 180px 200px; }
.contact__glow {
  position: absolute; z-index: -1; width: 1100px; height: 700px; left: 50%; bottom: -380px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), .20), transparent 65%); filter: blur(30px);
}
.contact__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.contact__title { font-size: clamp(56px, 11vw, 160px); line-height: .92; letter-spacing: -.055em; font-weight: 800; }
.contact__lead { max-width: 480px; font-size: 20px; line-height: 1.5; color: var(--text-2); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-soft); overflow: hidden; }
.footer__inner { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__links a { text-decoration: none; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__mark {
  font-size: 15.5vw; line-height: .78; letter-spacing: -.065em; font-weight: 800; text-align: center;
  white-space: nowrap; color: #1A1918; margin-bottom: -2.2vw; user-select: none;
  transition: color 1s ease;
}
.footer:hover .footer__mark { color: #1E1C1A; }

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */
.legal { padding-top: 160px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -.045em; font-weight: 800; line-height: 1; }
.legal h2 { font-size: 22px; font-weight: 600; margin-top: 16px; }
.legal p { font-size: 17px; line-height: 1.6; color: var(--text-2); }

.legal h3 { font-size: 19px; font-weight: 600; margin-top: 8px; color: var(--text); }
.legal h4 { font-size: 17px; font-weight: 600; margin-top: 4px; color: var(--text); }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.legal li { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.legal a { color: var(--accent); }
.legal p, .legal li { overflow-wrap: anywhere; }

/* ---------- Animationen ---------- */
@keyframes rise     { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slide-up { to { transform: translateY(0); } }
@keyframes pop      { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes fade-in  { to { opacity: 1; } }
@keyframes pulse    { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes scan     { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes marquee  { to { transform: translateX(-50%); } }

.rise { animation: rise 1s var(--ease) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .5s; } .d3 { animation-delay: .65s; } .d4 { animation-delay: 1s; }

/* Abschnitte beim Scrollen einblenden (JS setzt .is-visible) */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .9s var(--ease), transform 1s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.is-visible.tile:hover { transform: translateY(-4px); }
.no-js .reveal { opacity: 1; transform: none; }

/* Bewegung reduzieren, wenn im System eingestellt */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mask__inner { transform: none; }
  .hero__dot { transform: none; }
  .hero__glow { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
  .statement .w { color: var(--text); }
  .steps__line::after { transform: scaleX(1); }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .tile--logo, .tile--colors, .tile--type, .tile--web { grid-column: span 6; }
  .tile--web { flex-direction: column; }
  .browser { margin: 0 0 0 32px; min-height: 260px; }
  .type-specimen { min-height: 260px; }
}

/* ---------- Mobil ---------- */
@media (max-width: 600px) {
  :root { --pad: 20px; --radius: 22px; }
  .nav__links { gap: 18px; }
  .nav__link { display: none; }
  .hero { padding-top: 110px; }
  .eyebrow { font-size: 14px; }
  .hero__lead { font-size: 19px; }
  .hero__meta { padding-top: 48px; font-size: 13px; }
  .statement-wrap { padding-block: 110px 40px; }
  .section { padding-block: 88px; gap: 40px; }
  .tile__body, .type-specimen { padding: 28px; }
  .tile__visual--logo, .swatches { height: 200px; }
  .mono { font-size: 110px; }
  .type-specimen__aa { font-size: 130px; }
  .swatches { padding: 24px 24px 0; gap: 6px; }
  .swatch span { display: none; }
  .contact { padding-block: 120px 140px; }
  .btn--large { font-size: 16px; padding: 17px 24px; }
  .btn--outline.btn--large { padding: 16px 23px; }
}
