@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@200;300;400;500&family=Bebas+Neue&display=swap');

/* ═══════════════════════════════════════════════
   HANNES KANNES — Design System
   Merged: Sonnet grid structure + Opus warm palette
   ═══════════════════════════════════════════════ */

:root {
  --bg: #f4f1ec;
  --fg: #1a1a1a;
  --navy: #201966;
  --purple: #6A186C;
  --pink: #F21D7A;
  --muted: #8a8580;
  --display: 'Bebas Neue', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --t: 600ms;
  --gap: 10px;
  --cols: 7;
  --pad: 6vw;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 200;
  font-size: 15px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ─── GRID OVERLAY ─── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(32,25,102,.04) 0 1px, transparent 1px calc(100vw / 7)),
    repeating-linear-gradient(to bottom, rgba(32,25,102,.04) 0 1px, transparent 1px 80px);
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad);
  backdrop-filter: blur(12px);
  background: rgba(244,241,236,.85);
}

.brand {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex; gap: 32px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.nav-links a {
  color: var(--fg); text-decoration: none;
  opacity: .5; transition: opacity .2s;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; color: var(--purple); }
.nav-legal-link { display: none; }

/* ─── BURGER ─── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  z-index: 100;
}
.burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--fg);
  transition: transform .4s cubic-bezier(.25,.1,.25,1), opacity .3s;
  transform-origin: center;
}
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4.5px, 4.5px);
}
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4.5px, -4.5px);
}

@media (max-width: 768px) {
  nav {
    backdrop-filter: none;
    background: var(--bg);
  }
  .burger { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s cubic-bezier(.25,.1,.25,1), visibility 0s .4s;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .3s cubic-bezier(.25,.1,.25,1), visibility 0s 0s;
  }

  .nav-links a {
    font-family: var(--display);
    font-size: clamp(40px, 12vw, 72px);
    line-height: 1.15;
    letter-spacing: .02em;
    opacity: 0 !important;
    transform: translateY(24px);
    transition: opacity .4s ease, transform .4s cubic-bezier(.25,.1,.25,1), color .2s;
  }

  /* Close: reverse stagger (bottom to top) */
  .nav-links a:nth-child(1) { transition-delay: .30s; }
  .nav-links a:nth-child(2) { transition-delay: .25s; }
  .nav-links a:nth-child(3) { transition-delay: .20s; }
  .nav-links a:nth-child(4) { transition-delay: .15s; }
  .nav-links a:nth-child(5) { transition-delay: .10s; }
  .nav-links a:nth-child(6) { transition-delay: .05s; }
  .nav-links a:nth-child(7) { transition-delay: 0s; }

  /* Open: forward stagger (top to bottom) */
  .nav-links.open a {
    opacity: .5 !important;
    transform: translateY(0);
  }
  .nav-links.open a:nth-child(1) { transition-delay: .04s; }
  .nav-links.open a:nth-child(2) { transition-delay: .08s; }
  .nav-links.open a:nth-child(3) { transition-delay: .12s; }
  .nav-links.open a:nth-child(4) { transition-delay: .16s; }
  .nav-links.open a:nth-child(5) { transition-delay: .20s; }
  .nav-links.open a:nth-child(6) { transition-delay: .26s; }
  .nav-links.open a:nth-child(7) { transition-delay: .30s; }

  .nav-links.open a:hover,
  .nav-links.open a.active {
    opacity: 1 !important;
    color: var(--navy);
  }

  /* Legal links in overlay: smaller, mono font */
  .nav-links .nav-legal-link {
    display: block;
    font-family: var(--mono) !important;
    font-size: 12px !important;
    letter-spacing: .1em !important;
    line-height: 2.2 !important;
    margin-top: 4px;
  }
  .nav-links .nav-legal-link:nth-child(6) {
    margin-top: 32px;
  }
}

/* ─── SEGMENT LINE ─── */
.seg-line {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
  padding: 0 var(--pad);
  height: 1px;
}
.seg-line span {
  height: 1px;
  background: var(--navy);
  transform-origin: left center;
  transform: scaleX(0);
}
.divider { margin: 0; opacity: .3; }
.divider.anim span:nth-child(1){ animation: draw .9s ease .1s forwards; }
.divider.anim span:nth-child(2){ animation: draw .9s ease .18s forwards; }
.divider.anim span:nth-child(3){ animation: draw .9s ease .26s forwards; }
.divider.anim span:nth-child(4){ animation: draw .9s ease .34s forwards; }
.divider.anim span:nth-child(5){ animation: draw .9s ease .42s forwards; }
.divider.anim span:nth-child(6){ animation: draw .9s ease .50s forwards; }
.divider.anim span:nth-child(7){ animation: draw .9s ease .58s forwards; }

/* ─── SECTION BASE ─── */
section, .section {
  padding: 14vh var(--pad);
  position: relative; z-index: 1;
}

.section-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  opacity: .4; margin-bottom: 48px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px; background: currentColor; opacity: .3;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.2s cubic-bezier(.25,.1,.25,1) .3s;
}
.section-label.in::after {
  transform: scaleX(1);
}

/* Alternate: right-aligned label */
.section-label--right {
  flex-direction: row-reverse;
}
.section-label--right::after {
  transform-origin: right center;
}

/* ─── TWO-COLUMN LAYOUT ─── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 768px) { .split { grid-template-columns: 1fr; gap: 48px; } }

.split-left h2, .col-heading {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 120px);
  line-height: .92;
  letter-spacing: .01em;
  color: var(--navy);
}

.body-text {
  font-size: clamp(13px, 1.6vw, 16px);
  line-height: 2;
  opacity: .75;
}
.body-text p + p { margin-top: 1.4em; }

/* ─── GAP BOX (diagnostic) ─── */
.gap-box {
  margin-top: 40px;
  border: 1px solid var(--fg);
  padding: 24px 28px;
  display: grid; gap: 10px;
}
.gap-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; letter-spacing: .06em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(26,26,26,.12);
}
.gap-row:last-child { border-bottom: none; }
.gap-status { font-size: 10px; opacity: .4; letter-spacing: .1em; text-transform: uppercase; }
.gap-status.ok { opacity: .8; }
.gap-status.missing { color: var(--pink); opacity: 1; }
.gap-status.missing::before { content: '▲ '; font-size: 8px; }

/* ─── SERVICE CARDS ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  border: 1px solid rgba(32,25,102,.15);
  padding: 28px 20px 32px;
  display: flex; flex-direction: column; gap: 20px;
  cursor: default;
  min-height: 240px;
  background: rgba(32,25,102,0);
  transition: all .55s cubic-bezier(.4,0,.2,1);
}
.service-card:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--bg);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(32,25,102,.12);
}

.service-num {
  font-size: 10px; letter-spacing: .14em; opacity: .35;
  transition: all .55s cubic-bezier(.4,0,.2,1);
}
.service-card:hover .service-num { opacity: .6; }
.service-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--navy);
  transition: all .55s cubic-bezier(.4,0,.2,1);
}
.service-card:hover .service-title { color: var(--bg); }
.service-desc {
  font-size: 12px; line-height: 1.8; opacity: .6;
  margin-top: auto;
  transition: all .55s cubic-bezier(.4,0,.2,1);
}
.service-card:hover .service-desc { opacity: .8; }

.service-card.reveal {
  transition: opacity .7s ease, transform .7s ease,
              background .55s cubic-bezier(.4,0,.2,1),
              border-color .55s cubic-bezier(.4,0,.2,1),
              color .55s cubic-bezier(.4,0,.2,1),
              box-shadow .55s cubic-bezier(.4,0,.2,1);
}
.service-card.reveal.in {
  transition: opacity .7s ease, transform .7s ease,
              background .55s cubic-bezier(.4,0,.2,1),
              border-color .55s cubic-bezier(.4,0,.2,1),
              color .55s cubic-bezier(.4,0,.2,1),
              box-shadow .55s cubic-bezier(.4,0,.2,1);
}

/* ─── DARK SECTION ─── */
.dark-section {
  background: var(--navy);
  color: var(--bg);
}
.dark-section .section-label { opacity: .3; }
.dark-section .section-label::after { background: var(--bg); }

/* ─── STEPS ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
@media (max-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.step {
  padding: 32px 0;
  border-top: 1px solid rgba(229,229,229,.15);
}
.step-n {
  font-size: 10px; letter-spacing: .18em; opacity: .3;
  margin-bottom: 32px;
}
.step-title {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: .95;
  margin-bottom: 16px;
}
.step-detail { font-size: 11px; line-height: 1.9; opacity: .5; }

/* ─── TICKER ─── */
.ticker-row {
  display: flex;
  overflow: hidden;
  border-top: 1px solid rgba(229,229,229,.15);
  border-bottom: 1px solid rgba(229,229,229,.15);
  padding: 18px 0;
  margin-top: 80px;
}
.ticker-inner {
  display: flex; gap: 60px;
  white-space: nowrap;
  animation: ticker 18s linear infinite;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .4;
}
.ticker-inner span::before { content: '◆  '; font-size: 7px; }

/* ─── QUOTE ─── */
.quote-text {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 130px);
  line-height: .92;
  letter-spacing: .01em;
  max-width: 900px;
  color: var(--navy);
}
.quote-text .highlight {
  color: var(--pink);
}
.highlight { color: var(--pink); }
.quote-sub {
  max-width: 460px;
  margin-top: 48px;
  font-size: 13px; line-height: 1.9; opacity: .65;
}

/* ─── CTA ─── */
.cta-section {
  background: var(--navy);
  color: var(--bg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
@media (max-width: 640px) { .cta-section { grid-template-columns: 1fr; } }

.cta-section h2 {
  font-family: var(--display);
  font-size: clamp(56px, 12vw, 160px);
  line-height: .88;
  letter-spacing: .01em;
}

.cta-right { display: flex; flex-direction: column; gap: 16px; align-items: flex-end; }
@media (max-width: 640px) { .cta-right { align-items: flex-start; } }

.cta-link {
  display: inline-flex;
  align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bg); text-decoration: none;
  border: 1px solid rgba(229,229,229,.3);
  padding: 16px 24px;
  transition: background .2s, border-color .2s, color .2s;
}
.cta-link:hover { background: var(--bg); color: var(--navy); border-color: var(--bg); }
.cta-link .arrow { font-size: 14px; }

.cta-email {
  font-size: 11px; letter-spacing: .06em; opacity: .4;
}

/* ─── FOOTER ─── */
footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--pad);
  border-top: 1px solid rgba(32,25,102,.1);
  font-size: 10px; letter-spacing: .1em; opacity: .45;
  flex-wrap: wrap; gap: 12px;
}
footer a {
  color: var(--fg); text-decoration: none;
  transition: opacity .2s;
}
footer a:hover { opacity: 1; }
.footer-links { display: flex; gap: 24px; }

/* ─── BRIDGE VISUAL ─── */
.bridge {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 64px);
  margin: 6vh auto 4vh;
  max-width: 1000px;
}
.bridge-side { flex: 1; min-width: 0; }
.bridge-side h3 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  color: var(--navy);
  margin-bottom: 8px;
}
.bridge-side p { font-size: 12px; line-height: 1.8; opacity: .6; }
.bridge-side--r { text-align: right; }
@media (max-width: 600px) {
  .bridge {
    flex-direction: column;
    text-align: center;
  }
  .bridge-side { min-width: 0; text-align: center; }
  .bridge-side--r { text-align: center; }
  .bridge-octo { order: 0; }
  .bridge-side:first-child { order: -1; }
  .bridge-side:last-child { order: 1; }
}

.bridge-octo { flex: 0 0 auto; width: clamp(80px, 12vw, 140px); position: relative; }
.bridge-octo img { width: 100%; height: auto; }
.bridge-octo::before, .bridge-octo::after {
  content: ""; position: absolute; top: 35%; height: 1px;
  width: clamp(20px, 4vw, 60px);
  background: linear-gradient(90deg, var(--purple), var(--pink));
}
.bridge-octo::before { right: 100%; margin-right: 4px; }
.bridge-octo::after { left: 100%; margin-left: 4px; }

/* ─── PAGE HERO (subpages) ─── */
.page-hero {
  min-height: 50vh;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad) 8vh;
  padding-top: 14vh;
}
.page-hero .page-tag {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .5; margin-bottom: 20px;
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 12vw, 160px);
  line-height: .9;
  color: var(--navy);
}
.page-hero .page-intro {
  max-width: 560px;
  margin-top: 32px;
  font-size: clamp(13px, 1.4vw, 15px);
  line-height: 1.9;
  opacity: .65;
}

/* ─── LEGAL PAGES ─── */
.legal-content {
  max-width: 720px;
  padding: 16vh var(--pad) 10vh;
}
.legal-content h1 {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: .92;
  color: var(--navy);
  margin-bottom: 48px;
}
.legal-content h2 {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  color: var(--navy);
  margin-top: 48px;
  margin-bottom: 16px;
}
.legal-content h3 {
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .06em;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--navy);
}
.legal-content p {
  font-size: 13px;
  line-height: 1.9;
  opacity: .7;
  margin-bottom: 12px;
}
.legal-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}
.legal-content li {
  font-size: 13px;
  line-height: 1.9;
  opacity: .7;
  padding-left: 16px;
  position: relative;
}
.legal-content li::before {
  content: '—';
  position: absolute;
  left: 0;
  opacity: .4;
}
.legal-content a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── COOKIE CONSENT ─── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--navy);
  color: var(--bg);
  padding: 20px var(--pad);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  font-size: 12px; line-height: 1.7;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.25,.1,.25,1);
  flex-wrap: wrap;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { max-width: 700px; opacity: .75; }
.cookie-banner p a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.cookie-btns { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; padding: 10px 20px; border: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.cookie-btn--accept { background: var(--bg); color: var(--navy); }
.cookie-btn--accept:hover { background: var(--pink); color: #fff; }
.cookie-btn--reject { background: transparent; color: var(--bg); border: 1px solid rgba(244,241,236,.25); }
.cookie-btn--reject:hover { border-color: var(--bg); }
@media (max-width: 768px) {
  .cookie-btns { width: 100%; }
  .cookie-btn { flex: 1; text-align: center; }
}

/* ─── FORM FEEDBACK ─── */
.form-success, .form-error {
  padding: 20px 24px;
  font-size: 13px; line-height: 1.8;
  margin-top: 16px;
}
.form-success {
  border: 1px solid rgba(34,197,94,.3);
  color: #166534;
  background: rgba(34,197,94,.06);
}
.form-error {
  border: 1px solid rgba(239,68,68,.3);
  color: #991b1b;
  background: rgba(239,68,68,.06);
}

/* ─── ANIMATIONS ─── */
@keyframes draw { to { transform: scaleX(1); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ─── HERO BLOCK ANIMATION ─── */
@keyframes riseOut {
  0%   { transform: scaleY(0); transform-origin: bottom; }
  50%  { transform: scaleY(1); transform-origin: bottom; }
  51%  { transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}
