/* ── Timon Franzen — personal site ─────────────────────────────
   Dark, warm-accent, type-led. Bricolage Grotesque display,
   Geist body, Geist Mono labels. No frameworks. */

:root {
  --bg: #0a0a0c;
  --surface: #121215;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f0ec;
  --muted: rgba(242, 240, 236, 0.55);
  --faint: rgba(242, 240, 236, 0.32);
  --accent: #ff9a3c;
  --accent-2: #ff5b5b;
  --grad: linear-gradient(100deg, var(--accent), var(--accent-2));
  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #17100a; }
.mono { font-family: var(--mono); }

/* ── atmosphere ── */
.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(600px circle at var(--mx, 70%) var(--my, 20%),
              rgba(255, 154, 60, 0.07), transparent 70%);
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 1; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -4%); }
  60% { transform: translate(-3%, -2%); }
  80% { transform: translate(2%, 4%); }
}

main, header, footer { position: relative; z-index: 2; }

/* ── nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  font-family: var(--disp); font-weight: 800; font-size: 22px;
  color: var(--text); text-decoration: none; letter-spacing: 1px;
  display: inline-flex; align-items: center; gap: 10px;
}
.nav-mark { display: block; }
.nav-brand .tick { color: var(--accent); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14.5px;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.lang-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 12px; letter-spacing: 1.5px;
  padding: 7px 13px; cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.lang-btn:hover { color: var(--text); border-color: rgba(255, 154, 60, 0.4); }
.nav-cta {
  color: #17100a !important; background: var(--grad);
  padding: 9px 18px; border-radius: 999px; font-weight: 500;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease) !important;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255, 130, 70, 0.35); }

/* ── hero ── */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px;
  padding: 120px clamp(20px, 6vw, 72px) 60px;
  position: relative; overflow: hidden;
}
.hero > *:not(.hero-canvas) { position: relative; z-index: 1; }
.hero-rail {
  display: flex; flex-direction: column; gap: 18px;
  border-left: 1px solid var(--line); padding-left: 26px; align-self: center;
}
.rail-row { display: flex; flex-direction: column; gap: 4px; }
.rail-k { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); }
.rail-v { font-size: 13px; color: var(--muted); }
.rail-live { color: #7fe0a0; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-rail { display: none; } }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
/* keep the display text readable over the animation */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 30% 55%, rgba(10,10,12,0.55), rgba(10,10,12,0.1) 60%, transparent);
}
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 26px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 12px #4ade80aa;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }
.hero-title {
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(58px, 13.5vw, 168px);
  line-height: 0.96; letter-spacing: -0.02em;
  text-transform: uppercase; margin-bottom: 34px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: riseUp 0.9s var(--ease) forwards;
}
.hero-title .line:nth-child(2) .word { animation-delay: 0.12s; }
.hero-title .accent {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@keyframes riseUp { to { transform: translateY(0); } }
.hero-sub {
  max-width: 560px; font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted); margin-bottom: 30px;
}
.hero-sub em { font-style: normal; color: var(--text); }
.hero-meta { display: flex; gap: 12px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.hero-scroll {
  margin-top: clamp(40px, 8vh, 90px);
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--faint); text-decoration: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 2.5px;
  text-transform: uppercase; width: fit-content;
  transition: color 0.3s var(--ease);
}
.hero-scroll:hover { color: var(--accent); }
.scroll-line {
  width: 44px; height: 1px; background: currentColor;
  display: inline-block; position: relative; overflow: visible;
}
.scroll-line::after {
  content: ""; position: absolute; right: -1px; top: -2.5px;
  border: solid currentColor; border-width: 1px 1px 0 0;
  width: 5px; height: 5px; transform: rotate(45deg);
}

/* ── marquee ── */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0; background: rgba(255, 255, 255, 0.015);
}
.marquee-track {
  display: flex; align-items: center; gap: 38px; width: max-content;
  animation: marquee 26s linear infinite;
  font-family: var(--disp); font-weight: 600; font-size: 15px;
  letter-spacing: 3px; text-transform: uppercase; color: var(--faint);
}
.marquee-track i { color: var(--accent); font-style: normal; font-size: 11px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── sections ── */
.section { padding: clamp(80px, 12vw, 150px) clamp(20px, 6vw, 72px); }
.section-head {
  display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(36px, 6vw, 64px);
}
.section-head .index { color: var(--accent); font-size: 14px; }
.section-head h2 {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(32px, 5.5vw, 56px); letter-spacing: -0.01em;
}

/* ── work — visual case studies ── */
.studies { display: flex; flex-direction: column; gap: clamp(28px, 5vw, 56px); }
.study {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 52px);
  align-items: center;
}
.study--rev .study-shot { order: 2; }
.study-shot {
  display: block; position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #0c0c0f;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.study-shot:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 154, 60, 0.4);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 154, 60, 0.15);
}
.frame-bar {
  display: flex; gap: 7px; align-items: center;
  padding: 11px 14px; background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--line);
}
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.frame-bar i:first-child { background: #ff5f57; }
.frame-bar i:nth-child(2) { background: #febc2e; }
.frame-bar i:nth-child(3) { background: #28c840; }
.study-shot img { display: block; width: 100%; height: auto; }
.study-text { display: flex; flex-direction: column; gap: 14px; }
.study-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  font-size: 11.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint);
}
.study-tag { color: var(--accent); }
.study-text h3 { font-family: var(--disp); font-weight: 700; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.01em; }
.study-text p { color: var(--muted); font-size: 16px; }
.study--wide { grid-template-columns: 200px 1fr; }
.study-glyph {
  display: flex; gap: 10px; align-items: flex-end; justify-content: center;
  height: 140px; border: 1px solid var(--line); border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 154, 60, 0.06), transparent 60%), var(--surface);
}
.study-glyph span { width: 12px; border-radius: 6px; background: var(--grad); opacity: 0.8; }
.study-glyph span:nth-child(1) { height: 46%; }
.study-glyph span:nth-child(2) { height: 78%; }
.study-glyph span:nth-child(3) { height: 60%; }
.card-note {
  font-size: 12.5px !important; color: var(--faint) !important; margin-top: 2px;
}
.card-note .lock { font-size: 11px; margin-right: 4px; }
.card-stack { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 4px; }
.card-stack li {
  font-size: 11px; letter-spacing: 1px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px;
}

/* ── about ── */
.about-grid { display: grid; gap: clamp(28px, 5vw, 56px); }
.about-lede {
  font-family: var(--disp); font-weight: 500; max-width: 15ch;
  font-size: clamp(30px, 5.2vw, 62px); line-height: 1.12; letter-spacing: -0.015em;
}
.about-lower { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 820px) { .about-lower { grid-template-columns: 1fr; } }
.about-lede strong {
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.about-body { max-width: 620px; display: grid; gap: 18px; color: var(--muted); font-size: 16.5px; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px; border-top: 1px solid var(--line); padding-top: 34px;
}
.stat { display: grid; gap: 6px; }
.stat-num {
  font-family: var(--disp); font-weight: 800; font-size: clamp(40px, 6vw, 62px);
  line-height: 1; color: var(--text);
}
.stat-label { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }

/* ── services ── */
.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 60px 1fr; gap: 8px 26px;
  padding: 34px 6px; border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease), padding-left 0.35s var(--ease);
}
.service:hover { background: rgba(255, 255, 255, 0.02); padding-left: 18px; }
.service-num { color: var(--accent); font-size: 14px; padding-top: 8px; }
.service h3 { font-family: var(--disp); font-weight: 700; font-size: clamp(22px, 3vw, 30px); grid-column: 2; }
.service p { grid-column: 2; color: var(--muted); max-width: 560px; font-size: 15.5px; }

/* ── newsletter ── */
.nl-box {
  max-width: 720px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(32px, 6vw, 56px);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 154, 60, 0.06), transparent 60%),
    var(--surface);
}
.nl-copy h2 { font-family: var(--disp); font-weight: 700; font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px; }
.nl-copy p { color: var(--muted); max-width: 460px; margin: 0 auto 26px; font-size: 15.5px; }
.nl-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto 14px; }
.nl-form input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-family: var(--body); font-size: 15px;
  padding: 13px 16px; outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nl-form input:focus { border-color: rgba(255, 154, 60, 0.5); box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.08); }
.nl-btn {
  background: var(--grad); color: #17100a; border: none; border-radius: 12px;
  font-family: var(--body); font-weight: 500; font-size: 15px;
  padding: 13px 22px; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.nl-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255, 130, 70, 0.3); }
.nl-note { font-size: 11.5px; letter-spacing: 1px; color: var(--faint); }
@media (max-width: 480px) { .nl-form { flex-direction: column; } }

/* ── contact ── */
.contact {
  padding: clamp(100px, 16vw, 190px) clamp(20px, 6vw, 72px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.contact .kicker { justify-content: center; margin-bottom: 0; }
.contact-mail {
  text-decoration: none; color: var(--text);
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(46px, 11vw, 130px); letter-spacing: -0.02em; line-height: 1.05;
  display: inline-flex; align-items: center; gap: clamp(12px, 3vw, 30px);
  transition: color 0.3s var(--ease);
}
.contact-mail:hover .contact-word {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact-arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease);
  color: var(--accent);
}
.contact-mail:hover .contact-arrow { transform: translateX(14px) rotate(-45deg); }
.contact-sub { color: var(--faint); font-size: 13.5px; letter-spacing: 1.5px; }

/* ── footer ── */
.footer {
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 26px clamp(20px, 5vw, 56px);
  font-size: 13px; color: var(--faint);
}
.footer a { color: var(--faint); text-decoration: none; transition: color 0.25s; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 22px; align-items: center; }

/* ── legal page ── */
.legal {
  max-width: 760px; margin: 0 auto;
  padding: clamp(110px, 14vw, 160px) clamp(20px, 6vw, 40px) 80px;
}
.legal-back {
  display: inline-block; color: var(--muted); text-decoration: none;
  font-size: 12.5px; letter-spacing: 1px; margin-bottom: 40px;
  transition: color 0.25s var(--ease);
}
.legal-back:hover { color: var(--accent); }
.legal h1 {
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(34px, 6vw, 52px); letter-spacing: -0.01em; margin-bottom: 8px;
}
.legal-h1b {
  font-family: var(--disp) !important; font-weight: 700 !important;
  font-size: clamp(28px, 5vw, 42px) !important; letter-spacing: -0.01em;
  margin: 64px 0 8px !important; color: var(--text) !important;
}
.legal-block { margin-top: 32px; }
.legal-block h2 {
  font-family: var(--disp); font-weight: 600; font-size: 19px;
  color: var(--accent); margin-bottom: 10px;
}
.legal-block p { color: var(--muted); font-size: 15.5px; line-height: 1.7; margin-bottom: 10px; }
.legal-block a { color: var(--text); }
.legal-fill { color: var(--accent); }
.legal-note { font-size: 13px !important; color: var(--faint) !important; }
.legal-updated { margin-top: 48px; color: var(--faint); font-size: 12px; letter-spacing: 1px; }

/* ── reveal on scroll ── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ── small screens ── */
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .service { grid-template-columns: 1fr; }
  .service-num { padding-top: 0; }
  .service h3, .service p { grid-column: 1; }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-title .word { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
