/* ==========================================================================
   R&S DataDrive Solutions GmbH — Site styles
   Brand palette sampled from logo: navy #213246, slate #5c6a77, red #e52c1a
   ========================================================================== */

:root {
  --navy-900: #0d1521;
  --navy-800: #121c29;
  --navy-700: #182536;
  --navy-600: #213246;
  --navy-500: #2c4059;
  --slate-500: #5c6a77;
  --slate-400: #8a97a6;
  --slate-300: #aab5c1;
  --red-600: #ab2411;
  --red-500: #e52c1a;
  --red-400: #ff4a38;

  --bg: var(--navy-800);
  --bg-deep: var(--navy-900);
  --surface: var(--navy-700);
  --surface-2: var(--navy-600);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eef5;
  --text-muted: var(--slate-300);
  --text-faint: var(--slate-400);
  --accent: var(--red-500);
  --accent-hover: var(--red-400);
  --accent-soft: rgba(229, 44, 26, 0.14);

  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --header-h: 76px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Language toggle ---------- */
html[lang="de"] [data-lang="en"] { display: none !important; }
html[lang="en"] [data-lang="de"] { display: none !important; }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 120px) 0; position: relative; }
.section--tight { padding: clamp(56px, 7vw, 88px) 0; }
.section--alt { background: var(--bg-deep); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-head--center .eyebrow::after { content: ""; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 18px; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(229, 44, 26, 0.3); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255,255,255,0.03); }
.btn--ghost:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); }
.btn--sm { padding: 10px 18px; font-size: 0.9rem; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text);
}
.link-arrow svg { transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { color: var(--accent-hover); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(18, 28, 41, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-scrolled { border-color: var(--border); background: rgba(13, 21, 33, 0.85); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__name {
  font-family: var(--font-serif); font-style: italic; font-weight: 700;
  font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.05; white-space: nowrap;
}
.brand__suffix { display: block; font-family: var(--font-sans); font-style: normal; font-weight: 500; font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; font-size: 0.93rem; font-weight: 500; color: var(--text-muted);
  white-space: nowrap; transition: color .2s, background .2s;
}
.nav a:hover, .nav a.is-active { color: var(--text); background: rgba(255,255,255,0.05); }

.header-actions { display: flex; align-items: center; gap: 14px; flex: none; }

.lang-switch {
  display: inline-flex; align-items: center; padding: 3px; gap: 2px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(255,255,255,0.03);
}
.lang-switch button {
  padding: 5px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text-faint); transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--navy-800); }
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--text); }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); position: relative; }
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

@media (max-width: 1180px) {
  .header-actions .btn { display: none; }
}
@media (max-width: 1024px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    padding: 16px 20px 24px; gap: 4px; background: var(--bg-deep); border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .25s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .nav-toggle { display: block; }
  .header-actions .btn { display: none; }
}
@media (max-width: 600px) {
  .site-header .container { gap: 12px; }
  .brand { gap: 10px; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__name { font-size: 0.98rem; white-space: normal; line-height: 1.1; }
  .brand__suffix { display: none; }
  .header-actions { gap: 10px; }
  .lang-switch button { padding: 5px 9px; font-size: 0.75rem; }
  .nav-toggle { width: 38px; height: 38px; }
  .nav-toggle span { left: 10px; right: 10px; }
  .nav-toggle span:nth-child(1) { top: 12px; }
  .nav-toggle span:nth-child(2) { top: 18px; }
  .nav-toggle span:nth-child(3) { top: 24px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1),
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 18px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(80px, 11vw, 150px) 0 clamp(72px, 9vw, 120px);
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 75% 20%, rgba(229, 44, 26, 0.16), transparent 60%),
    radial-gradient(800px 600px at 10% 90%, rgba(92, 106, 119, 0.3), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--bg));
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(255,255,255,0.04); font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 28px;
}
.hero__badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); margin-left: 6px; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.8rem); margin-bottom: 24px; }
.hero h1 em { font-family: var(--font-serif); font-style: italic; font-weight: 700; color: var(--accent-hover); }
.hero__lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--text-muted); max-width: 580px; margin-bottom: 36px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 36px; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--text-faint); font-size: 0.9rem; }

.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__showcase {
  position: relative; width: 100%; max-width: 560px;
  animation: float 8s ease-in-out infinite;
}
.hero__showcase::before {
  content: ""; position: absolute; inset: -2px; border-radius: 30px; z-index: -1;
  background: conic-gradient(from 180deg, transparent, rgba(229,44,26,0.55), transparent 40%, rgba(138,151,166,0.35), transparent 70%);
  filter: blur(22px); opacity: 0.8;
}
.hero__slides {
  position: relative; aspect-ratio: 16 / 10; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: var(--navy-900);
}
.hero__slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 6s linear;
}
.hero__slides img.is-active { opacity: 1; transform: scale(1); }
.hero__slides::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,28,41,0) 55%, rgba(18,28,41,0.75) 100%),
              linear-gradient(90deg, rgba(18,28,41,0.25), transparent 40%);
}
.hero__dots {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2;
  display: flex; gap: 7px; padding: 6px 10px; border-radius: 999px;
  background: rgba(13,21,33,0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero__dots button {
  width: 7px; height: 7px; border-radius: 50%; padding: 0; background: rgba(255,255,255,0.35);
  transition: width .3s var(--ease), background .3s;
}
.hero__dots button[aria-selected="true"] { width: 22px; border-radius: 4px; background: var(--accent); }
.hero__chip {
  position: absolute; padding: 10px 14px; border-radius: 12px; font-size: 0.82rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.hero__chip svg { width: 16px; height: 16px; color: var(--accent-hover); }
.hero__chip--1 { top: -18px; left: -4%; animation: float 6s ease-in-out infinite reverse; z-index: 3; }
.hero__chip--2 { top: 38%; right: -4%; animation: float 8s ease-in-out infinite; z-index: 3; }
.hero__chip--3 { bottom: -18px; left: 8%; animation: float 7.5s ease-in-out 1s infinite reverse; z-index: 3; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .hero__showcase { max-width: 520px; }
  .hero__chip--1 { left: 0; }
  .hero__chip--2 { right: 0; }
  .hero { min-height: 0; }
}
@media (max-width: 560px) {
  .hero__chip { display: none; }
}

/* ---------- Logo strip ---------- */
.trust { padding: 36px 0; border-block: 1px solid var(--border); background: var(--bg-deep); }
.trust__inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 40px; color: var(--text-faint); font-size: 0.9rem; }
.trust__inner span { display: inline-flex; align-items: center; gap: 8px; }
.trust__inner svg { width: 18px; height: 18px; color: var(--slate-400); }

/* ---------- Cards ---------- */
.card {
  position: relative; padding: 32px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(500px 200px at var(--mx, 50%) var(--my, 0%), rgba(229,44,26,0.12), transparent 60%);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--accent-soft); color: var(--accent-hover); border: 1px solid rgba(229,44,26,0.25);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 0.97rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-faint);
}
.tag--accent { background: var(--accent-soft); border-color: rgba(229,44,26,0.3); color: var(--accent-hover); }

/* ---------- Services ---------- */
.services .card--feature { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.services .card--feature .card__visual {
  height: 100%; min-height: 220px; border-radius: var(--radius); position: relative; overflow: hidden;
  background: var(--navy-900); border: 1px solid var(--border);
}
.chain {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 20px;
}
.chain__block {
  width: 54px; height: 54px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2);
  display: grid; place-items: center; font-size: 0.62rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-faint); position: relative;
}
.chain__block::after {
  content: ""; position: absolute; right: -14px; top: 50%; width: 14px; height: 2px; background: var(--slate-500);
}
.chain__block:last-child::after { display: none; }
.chain__block.is-ai { border-color: rgba(229,44,26,0.5); color: var(--accent-hover); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 960px) {
  .services .card--feature { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .services .card--feature { grid-column: span 1; }
  .chain__block { width: 44px; height: 44px; }
}

/* ---------- Technology / Process ---------- */
.process { counter-reset: step; }
.process__list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.process__list::before {
  content: ""; position: absolute; left: 6%; right: 6%; top: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--slate-500), transparent);
}
.step { position: relative; padding-top: 70px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 0 0 8px var(--bg);
}
.step:hover::before { border-color: var(--accent); color: var(--accent-hover); }
.step h3 { font-size: 1.1rem; margin-bottom: 10px; }
.step p { color: var(--text-muted); font-size: 0.93rem; }
@media (max-width: 980px) {
  .process__list { grid-template-columns: repeat(2, 1fr); }
  .process__list::before { display: none; }
}
@media (max-width: 560px) { .process__list { grid-template-columns: 1fr; } }

.tech-stack { margin-top: 64px; padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.tech-stack h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 18px; font-weight: 600; }
.tech-stack__row { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-stack .tag { font-size: 0.85rem; padding: 8px 14px; }

/* ---------- Case studies ---------- */
.case {
  display: grid; grid-template-rows: auto 1fr auto; padding: 0;
}
.case__head {
  padding: 28px 28px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.case__industry { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-hover); }
.case__body { padding: 20px 28px 28px; }
.case h3 { font-size: 1.3rem; margin-bottom: 12px; }
.case__metrics { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.case__metrics div { padding: 18px 28px; }
.case__metrics div + div { border-left: 1px solid var(--border); }
.case__metrics strong { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.case__metrics span { font-size: 0.8rem; color: var(--text-faint); }

/* ---------- About / Team ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.about__text p + p { margin-top: 18px; }
.about__text p { color: var(--text-muted); font-size: 1.05rem; }
.values { display: grid; gap: 14px; }
.value { display: flex; gap: 16px; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,0.025); }
.value__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hover); }
.value__icon svg { width: 20px; height: 20px; }
.value h4 { font-size: 1.02rem; margin-bottom: 4px; }
.value p { font-size: 0.92rem; color: var(--text-muted); }
@media (max-width: 900px) { .about__grid { grid-template-columns: 1fr; } }

.team { margin-top: clamp(56px, 7vw, 88px); }
.member { text-align: center; padding: 32px 24px; }
.member__avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-weight: 700; font-size: 1.8rem;
  background: linear-gradient(160deg, var(--navy-500), var(--navy-900)); border: 1px solid var(--border-strong);
  color: var(--text);
}
.member h3 { font-size: 1.1rem; margin-bottom: 4px; }
.member__role { color: var(--accent-hover); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 12px; }
.member p { font-size: 0.92rem; }

/* ---------- Insights ---------- */
.post { padding: 0; display: flex; flex-direction: column; }
.post__cover {
  height: 170px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-600), var(--navy-900));
}
.post__cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.post__cover .glyph {
  position: absolute; right: 22px; bottom: -14px; width: 110px; height: 110px; opacity: 0.55;
}
.post__cover--red { background: linear-gradient(135deg, var(--red-600), var(--navy-900)); }
.post__cover--slate { background: linear-gradient(135deg, var(--slate-500), var(--navy-900)); }
.post__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post__meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-faint); margin-bottom: 12px; }
.post__meta .tag { padding: 3px 9px; }
.post h3 { font-size: 1.15rem; margin-bottom: 10px; }
.post p { flex: 1; font-size: 0.95rem; }
.post .link-arrow { margin-top: 18px; font-size: 0.92rem; }

/* ---------- CTA banner ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(40px, 6vw, 72px);
  background: linear-gradient(135deg, var(--navy-600), var(--navy-900)); border: 1px solid var(--border-strong);
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 32px; align-items: center;
}
.cta::before {
  content: ""; position: absolute; width: 480px; height: 480px; right: -160px; top: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(229,44,26,0.35), transparent 65%); pointer-events: none;
}
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 14px; }
.cta p { color: var(--text-muted); font-size: 1.05rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; } .cta__actions { justify-content: flex-start; } }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); }
.contact__info p { color: var(--text-muted); margin-bottom: 28px; }
.contact__item { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.contact__item:last-child { border-bottom: 1px solid var(--border); }
.contact__item svg { flex: none; width: 22px; height: 22px; color: var(--accent-hover); margin-top: 2px; }
.contact__item strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.contact__item span, .contact__item a { color: var(--text-muted); font-size: 0.95rem; }
.contact__item a:hover { color: var(--text); }

.form {
  padding: 36px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--text); padding: 13px 16px; border-radius: 10px;
  background: rgba(13, 21, 33, 0.7); border: 1px solid var(--border-strong); transition: border-color .2s, box-shadow .2s;
}
.field select option { background: var(--navy-800); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { min-height: 140px; resize: vertical; }
.field--check { flex-direction: row; align-items: flex-start; gap: 12px; }
.field--check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; padding: 0; }
.field--check label { font-weight: 400; font-size: 0.85rem; }
.field--check label a { text-decoration: underline; text-underline-offset: 3px; }
.form__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form__status { font-size: 0.9rem; color: var(--text-faint); min-height: 1.4em; }
.form__status.is-success { color: #58d68d; }
.form__status.is-error { color: var(--accent-hover); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } .form { padding: 26px 20px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--border); padding: 64px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer__about p { color: var(--text-muted); font-size: 0.93rem; margin-top: 18px; max-width: 360px; }
.footer__col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 18px; }
.footer__col li + li { margin-top: 10px; }
.footer__col a { color: var(--text-muted); font-size: 0.95rem; transition: color .2s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px;
  border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-faint);
}
.footer__bottom a { color: var(--text-muted); }
.footer__bottom a:hover { color: var(--text); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Sub pages (legal, insights) ---------- */
.page-hero { padding: clamp(64px, 8vw, 100px) 0 clamp(40px, 5vw, 64px); background: linear-gradient(180deg, var(--navy-900), var(--bg)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 16px; }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 700px; }
.prose { max-width: 820px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.prose h3 { font-size: 1.15rem; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text-muted); }
.prose p + p { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 22px; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.prose .placeholder { background: rgba(229,44,26,0.12); color: var(--accent-hover); padding: 0 6px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.notice {
  padding: 16px 20px; border-radius: var(--radius); border: 1px solid rgba(229,44,26,0.35); background: var(--accent-soft);
  color: var(--text); font-size: 0.93rem; margin-bottom: 32px;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Consent banner & settings modal ---------- */
html.consent-open { overflow: hidden; }

.consent { position: fixed; inset: 0; z-index: 200; display: grid; place-items: end center; padding: 20px; pointer-events: none; }
.consent--modal { place-items: center; }
.consent__backdrop {
  position: absolute; inset: 0; background: rgba(8, 13, 21, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s;
}
.consent.is-visible .consent__backdrop { opacity: 1; pointer-events: auto; }
.consent--passive .consent__backdrop { display: none; }

.consent__banner, .consent__modal {
  position: relative; pointer-events: auto; width: min(100%, 980px);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  opacity: 0; transform: translateY(24px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.consent.is-visible .consent__banner, .consent.is-visible .consent__modal { opacity: 1; transform: none; }
.consent__banner::before, .consent__modal::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.consent__banner[hidden], .consent__modal[hidden] { display: none !important; }

.consent__banner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px 30px; }
.consent__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-hover); border: 1px solid rgba(229,44,26,0.3);
}
.consent__icon svg { width: 26px; height: 26px; }
.consent__title { font-size: 1.15rem; margin-bottom: 8px; }
.consent__text { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.consent__links { margin-top: 10px; font-size: 0.85rem; display: flex; gap: 10px; color: var(--text-faint); }
.consent__links a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.consent__links a:hover { color: var(--text); }
.consent__actions { display: flex; flex-direction: column; gap: 10px; min-width: 190px; }
.consent__actions .btn { width: 100%; }
.consent__link-btn {
  font-size: 0.9rem; font-weight: 600; color: var(--text-muted); padding: 8px; border-radius: 8px;
  text-decoration: underline; text-underline-offset: 3px;
}
.consent__link-btn:hover { color: var(--text); }

.consent__modal { width: min(100%, 640px); padding: 26px 28px 22px; max-height: calc(100vh - 40px); overflow: auto; }
.consent__modal .consent__text { font-size: 0.88rem; }
.consent__modal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.consent__modal-head h2 { font-size: 1.35rem; }
.consent__close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.consent__close:hover { background: rgba(255,255,255,0.06); }
.consent__close svg { width: 18px; height: 18px; }
.consent__cats { margin-top: 16px; border-top: 1px solid var(--border); }
.consent__cat { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.consent__cat-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.consent__cat-text span { font-size: 0.83rem; color: var(--text-muted); line-height: 1.45; }
.consent__always { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
.consent__status { min-height: 1.4em; margin-top: 14px; font-size: 0.88rem; color: #58d68d; }
.consent__modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.12);
  border: 1px solid var(--border-strong); transition: background .25s, border-color .25s;
}
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); transition: transform .25s var(--ease);
}
.switch input:checked + .switch__track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 820px) {
  .consent { padding: 12px; }
  .consent__banner { grid-template-columns: 1fr; gap: 18px; padding: 24px 22px; }
  .consent__icon { display: none; }
  .consent__actions { flex-direction: row; flex-wrap: wrap; }
  .consent__actions .btn { flex: 1 1 140px; width: auto; }
  .consent__link-btn { flex-basis: 100%; }
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; z-index: 90;
  background: var(--surface-2); border: 1px solid var(--border-strong); display: grid; place-items: center;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s, background .2s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); border-color: var(--accent); }
.to-top svg { width: 18px; height: 18px; }
