/* ============================================================
   FyrTec — styles.css
   Dark, edel, minimalistisch. Ember-Akzent. Self-hosted Geist.
   ============================================================ */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0a0b;
  --bg-2: #0d0d0f;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f4f3f1;
  --text-soft: #c7c6c4;
  --text-muted: #8a8a90;
  --text-faint: #62626a;

  --ember-1: #ffd27a;
  --ember-2: #ff8a3d;
  --ember-3: #ff5a2c;
  --ember-glow: rgba(255, 122, 60, 0.35);

  --grad-ember: linear-gradient(120deg, #ffd27a 0%, #ff8a3d 45%, #ff5a2c 100%);

  --maxw: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 12px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01" 1, "cv01" 1;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Ambient background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(255, 138, 61, 0.08), transparent 60%),
    var(--bg);
}
.bg__aurora {
  position: absolute;
  top: -25vh;
  left: 50%;
  width: min(1100px, 120vw);
  height: 80vh;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(255, 122, 60, 0.22), transparent 70%),
    radial-gradient(closest-side, rgba(255, 90, 44, 0.16), transparent 70%);
  background-size: 70% 70%, 55% 55%;
  background-position: 30% 20%, 75% 60%;
  background-repeat: no-repeat;
  filter: blur(40px);
  opacity: 0.9;
  animation: drift 24s var(--ease) infinite alternate;
}
@keyframes drift {
  0%   { transform: translateX(-52%) translateY(0) scale(1); }
  100% { transform: translateX(-48%) translateY(4%) scale(1.12); }
}
.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 75%);
}
.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--pad-y) 1.4rem;
  border-radius: 999px;
  font-weight: 540;
  font-size: 0.97rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  position: relative;
  background: var(--grad-ember);
  color: #1a0b03;
  box-shadow: 0 6px 24px -8px var(--ember-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px -10px var(--ember-glow), 0 0 0 1px rgba(255, 138, 61, 0.4);
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text-soft);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.18rem;
}
.brand__mark {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 10px rgba(255, 122, 60, 0.45));
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); }
.brand__name-accent {
  background: var(--grad-ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 0.4rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav a {
  position: relative;
  padding: 0.5rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface); }

.nav__cta { display: inline-flex; }

/* mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nav-toggle span {
  width: 18px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.3px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem var(--gutter) 1.4rem;
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; animation: slideDown 0.4s var(--ease); }
.mobile-nav a {
  padding: 0.85rem 0.5rem;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.mobile-nav a:last-child { border: none; margin-top: 0.6rem; }
.mobile-nav .btn { justify-content: center; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 72px;
}
.hero__inner { padding-block: clamp(3rem, 10vh, 7rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember-2);
  box-shadow: 0 0 0 0 var(--ember-glow);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(255, 138, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
}

.hero__title {
  margin-top: 1.4rem;
  font-size: clamp(2.7rem, 8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.grad-text {
  background: var(--grad-ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  margin-top: 1.6rem;
  max-width: 38ch;
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--text-soft);
  line-height: 1.55;
}
.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
/* ---------- Sections ---------- */
.section, #top { scroll-margin-top: 90px; }
.section { padding-block: clamp(5rem, 12vh, 9rem); position: relative; }
.section__head { max-width: 640px; margin-bottom: 3.5rem; }
.section__label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ember-2);
  margin-bottom: 1rem;
}
.section__title {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.section__intro {
  margin-top: 1.2rem;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  max-width: 52ch;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.card {
  position: relative;
  padding: 2rem 1.9rem 2.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.card::before {
  /* cursor-follow ember glow */
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: var(--my, 50%);
  left: var(--mx, 50%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 138, 61, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: -1;
  pointer-events: none;
}
.card::after {
  /* top accent line */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember-2), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 0.8; }
.card--wide { grid-column: 1 / -1; }
.card__num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ember-2);
  letter-spacing: 0.08em;
  margin-bottom: 1.4rem;
  opacity: 0.85;
}
.card__title {
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  font-weight: 580;
  margin-bottom: 0.6rem;
}
.card__text { color: var(--text-muted); font-size: 1rem; max-width: 46ch; }

/* ---------- Ansatz ---------- */
.section--ansatz {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(255, 138, 61, 0.05), transparent 60%);
}
.ansatz {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.principles { display: grid; gap: 0.6rem; }
.principle {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 0.25rem;
  border-bottom: 1px solid var(--line);
}
.principle:first-child { border-top: 1px solid var(--line); }
.principle__k {
  font-weight: 560;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 1.1rem;
}
.principle__k::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-ember);
  box-shadow: 0 0 8px var(--ember-glow);
}
.principle__v { color: var(--text-muted); font-size: 0.98rem; }

/* ---------- Kontakt ---------- */
.section--contact { text-align: center; padding-block: clamp(6rem, 16vh, 11rem); }
.contact { position: relative; }
.contact__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(255, 122, 60, 0.16), transparent 60%);
  filter: blur(30px);
  z-index: -1;
  pointer-events: none;
}
.contact__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-top: 0.8rem;
}
.contact__intro {
  margin: 1.3rem auto 0;
  max-width: 44ch;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}
.contact__mail {
  display: inline-block;
  margin-top: 2.6rem;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  padding-bottom: 0.3rem;
  background-image: var(--grad-ember);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.5s var(--ease), color 0.4s var(--ease);
}
.contact__mail:hover {
  background-size: 100% 2px;
  color: var(--ember-1);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2rem;
  background: var(--bg-2);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.brand--footer { font-size: 1.05rem; }
.site-footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer__links a { color: var(--text-muted); font-size: 0.92rem; transition: color 0.3s var(--ease); }
.site-footer__links a:hover { color: var(--ember-2); }
.site-footer__base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
  color: var(--text-faint);
  font-size: 0.84rem;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bg__aurora, .eyebrow__dot { animation: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav, .nav__cta { display: none; }
  .nav-toggle { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .ansatz { grid-template-columns: 1fr; }
  .principle { grid-template-columns: 1fr; gap: 0.3rem; }
  .principle__k { padding-left: 1.1rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
