/* Fortunella — Design Tokens & Base */

/* Self-hosted Roboto (Variable, DSGVO: kein Request an fonts.gstatic.com) */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/roboto.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/outfit.woff2') format('woff2');
}

:root {
  /* Surfaces */
  --paper: #FFFFFF;
  --paper-2: #F4F6F5;
  --white: #FFFFFF;

  /* Ink — leicht teal-getönt für Harmonie mit Brand */
  --ink: #0B1A1E;
  --ink-2: #15282C;
  --ink-3: #2A3D40;

  /* Neutrals */
  --mute: #5D6677;
  --mute-2: #C7CCDC;
  --rule: #E5E7E5;
  --rule-2: #D0D4D1;

  /* Brand — Fortunella Teal (Logo-Farbe #00A89C) */
  --brand-50:  #F2FBFA;
  --brand-100: #E0F4F2;
  --brand-200: #C8EBE7;
  --brand-300: #8FD9D2;
  --brand-400: #4DC5BB;
  --brand-500: #00A89C;   /* Anker — Logo */
  --brand-600: #008279;
  --brand-700: #006B62;
  --brand-800: #00504A;
  --brand-900: #003A35;
  --brand:       var(--brand-500);
  --brand-deep:  var(--brand-700);
  --brand-text:  #007068;   /* AA auf weiß und auf --brand-100 */
  --brand-glow:  #3DD5C7;   /* dezent helle Variante für Dark-Sektionen */

  /* Legacy-Aliase (für rückwärtskompatible Nutzung in JSX) */
  --blue: var(--brand-500);
  --blue-hover: var(--brand-600);
  --blue-tint: var(--brand-100);
  --blue-tint-2: var(--brand-200);

  /* Akzent — warmer Komplementär für problem/highlight */
  --accent: #E8704F;
  --accent-deep: #B7461F;
  --accent-tint: #FDEBE4;

  /* Status */
  --warn: #C7411D;
  --ok:   #1E7A4A;
  --info: var(--brand-500);

  /* Dark-Sektion Sub-Texte (statt #B8C2DC / #9CA9D6 Lavendel) */
  --on-dark-1: #E3ECEC;
  --on-dark-2: #B0C4C4;
  --on-dark-3: #8FA4A4;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-1: 0 1px 0 rgba(10,18,38,0.04), 0 1px 2px rgba(10,18,38,0.04);
  --shadow-2: 0 1px 0 rgba(10,18,38,0.04), 0 8px 24px -8px rgba(10,18,38,0.10);
  --shadow-3: 0 1px 0 rgba(10,18,38,0.04), 0 30px 60px -20px rgba(10,18,38,0.20);

  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* clip statt hidden — bricht position: sticky nicht */
}

.mono { font-family: "Outfit", ui-monospace, "SFMono-Regular", Menlo, monospace; }
.roboto { font-family: "Roboto", system-ui, sans-serif; font-weight: 700; letter-spacing: -0.005em; }

/* Magazine typography scale */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(40px, 5.6vw, 84px); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -0.025em; line-height: 1.08; }
h3 { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.02em; line-height: 1.2; }
h4 { font-size: clamp(17px, 1.3vw, 20px); letter-spacing: -0.01em; line-height: 1.35; }
p  { margin: 0; }

/* Display variants — for editorial blocks that need oversized headings */
.display-lg { font-size: clamp(32px, 3.8vw, 52px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; }
.display-md { font-size: clamp(26px, 2.8vw, 38px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }

/* Body-Skala (Utility) */
.lead    { font-size: 19px; line-height: 1.55; color: var(--ink-3); }
.body    { font-size: 17px; line-height: 1.55; }
.body-sm { font-size: 15px; line-height: 1.55; }
.caption { font-size: 13px; line-height: 1.5; color: var(--mute); }

/* Eyebrow */
.eyebrow {
  font-family: "Outfit", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
}
.eyebrow.on-dark { color: var(--mute-2); }
.eyebrow.on-dark::before { background: var(--brand-glow); }

/* Section-Badge — Roboto Bold Pill */
.section-badge {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  font-family: "Roboto", system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-badge.on-dark {
  background: rgba(255,255,255,0.08);
  color: var(--brand-glow);
  border-color: rgba(255,255,255,0.14);
}

/* Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section {
  padding: clamp(80px, 11vw, 160px) 0;
  position: relative;
  border-top: 1px solid var(--rule);
}
.section.tight { padding: clamp(60px, 8vw, 100px) 0; }
.section.white { background: var(--white); }
.section.tint  { background: var(--paper-2); }
.section.dark  { background: var(--ink); color: var(--white); border-top-color: rgba(255,255,255,0.06); }
.section.dark .eyebrow { color: var(--mute-2); }
.section.dark .eyebrow::before { background: var(--brand-glow); }
/* Subtile Transition: Hairline neben Dark-Sektionen leicht aufhellen */
.section.dark + .section { border-top-color: var(--rule-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer; user-select: none;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, border-color .25s;
  text-decoration: none;
  white-space: nowrap;
}
.btn { min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn .arrow {
  width: 18px; height: 18px; display: inline-block;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}

.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary.on-blue { background: var(--white); color: var(--ink); }
.btn.primary.on-dark { background: var(--white); color: var(--ink); }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn.ghost.on-dark { color: var(--white); border-color: rgba(255,255,255,0.25); }

@media (hover: hover) {
  .btn:hover .arrow { transform: translateX(3px); }
  .btn.primary:hover { background: #1A2240; }
  .btn.ghost:hover { background: rgba(10,18,38,0.04); }
  .btn.ghost.on-dark:hover { background: rgba(255,255,255,0.06); }
}

/* Card primitive */
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.card.dark { background: #11193A; border-color: rgba(255,255,255,0.08); color: var(--white); }
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--rule-2); }
  .card.dark:hover { background: #131C42; }
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease-out, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Top rule */
.top-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.section.dark .top-rule { border-top-color: rgba(255,255,255,0.10); }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: end;
  padding-bottom: 64px;
}
@media (max-width: 880px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; padding-bottom: 40px; }
}

/* Phone bezel */
.phone {
  width: 320px;
  aspect-ratio: 320/660;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.10) inset,
    0 0 0 1px var(--ink),
    0 30px 60px -20px rgba(11,26,30,0.35),
    0 60px 120px -40px rgba(0,168,156,0.22);
  position: relative;
}
.phone .screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper);
  border-radius: 34px;
  overflow: hidden;
}
.phone .notch {
  position: absolute;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px;
  background: #050816;
  border-radius: 20px;
  z-index: 30;
}
.phone .status {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 26px 0;
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  z-index: 25;
}
.phone .status .icons { display: flex; gap: 5px; align-items: center; }

/* Floating cards (hero) */
.floater {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  will-change: transform;
  animation: float 6s ease-in-out infinite;
}
.floater .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.floater .dot.green { background: var(--ok); }
.floater .dot.amber { background: #D89A2C; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Marquee for trust line */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex; gap: 56px;
  animation: marq 50s linear infinite;
  white-space: nowrap;
  width: max-content;
  will-change: transform;
}
@keyframes marq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Tag */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--brand-text);
  font-size: 12px; font-weight: 500;
  font-family: "Outfit", monospace;
  letter-spacing: 0.02em;
}
.tag.muted { background: rgba(10,18,38,0.06); color: var(--ink-2); }
.tag.dark-on-dark { background: rgba(255,255,255,0.08); color: var(--white); }

/* Number ticker */
.num {
  font-variant-numeric: tabular-nums;
  font-family: "Outfit", monospace;
}

/* Decorative grid background */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,18,38,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,18,38,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.section.dark .grid-bg {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* Number stat */
.kpi-num {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Utility */
.muted { color: var(--mute); }
.center { text-align: center; }
.flex { display: flex; }
.grow { flex: 1; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

/* Connection line keyframes */
@keyframes dash {
  to { stroke-dashoffset: -200; }
}

/* Push pulse */
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Editorial: oversized decorative numbers */
.deco-num {
  position: absolute;
  font-family: "Outfit", monospace;
  font-size: clamp(180px, 24vw, 360px);
  font-weight: 300;
  color: var(--brand-100);
  line-height: 0.82;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.deco-num.thin   { color: transparent; -webkit-text-stroke: 1px var(--brand-200); }
.deco-num.on-dark{ color: rgba(255,255,255,0.06); }
.deco-num.on-dark.thin{ color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.10); }

/* Editorial: vertikales Edition-Label */
.edition-tag {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left top;
  font-family: "Outfit", monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--mute);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
@media (max-width: 1080px) { .edition-tag { display: none; } }

/* Editorial: Tilt-Utility */
.tilt-l { transform: rotate(-1.2deg); }
.tilt-r { transform: rotate(1deg); }

/* Marquee Strip Sektion */
.strip {
  background: var(--ink);
  color: var(--white);
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.strip.brand { background: var(--brand-700); }
.strip.tint  { background: var(--paper-2); color: var(--ink); border-top-color: var(--rule); border-bottom-color: var(--rule); }
.strip-track {
  display: inline-flex; gap: 64px;
  animation: marq 60s linear infinite;
  white-space: nowrap;
  font-family: "Outfit", monospace;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  will-change: transform;
}
.strip-track > span { display: inline-flex; align-items: center; gap: 24px; }
.strip-track .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand-glow);
  display: inline-block;
}
.strip.tint .strip-track .dot { background: var(--brand-500); }

/* Bento-Helper */
.bento { display: grid; gap: 20px; }
.bento .span-2 { grid-column: span 2; }
.bento .row-2  { grid-row: span 2; }

/* Focus */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* Body measure — bessere Lesbarkeit auf Ultra-Wide */
.container p { max-width: 75ch; }
.container p.full { max-width: none; }

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

/* Selection */
::selection { background: var(--ink); color: var(--paper); }
