/* =======================================================
   BODENOVA — Editorial Refinement Layer
   Purpose: Modernize hero + sections without breaking base.
   Style: Editorial-Minimalist (Boska/Fraunces + Satoshi/Inter)
   Rules: less color, more whitespace, subtle motion, calm.
   ======================================================= */

/* ---------- 1. Add Satoshi from Fontshare (better body pairing) ---------- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&f[]=boska@500,700&display=swap');

:root, [data-theme='light'] {
  /* Refined type — bump body to Satoshi where available, keep Inter as fallback */
  --font-body: 'Satoshi', 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  /* Keep Fraunces for display — already editorial */
  --font-display: 'Fraunces', 'Boska', 'Playfair Display', Georgia, serif;

  /* Refined type scale — slightly larger hero, tighter tracking */
  --text-hero-refined: clamp(2.75rem, 1.5rem + 4vw, 5.5rem);

  /* Editorial spacing rhythm */
  --editorial-gutter: clamp(1.5rem, 2vw + 1rem, 3rem);
  --section-y: clamp(5rem, 8vw, 9rem);

  /* Refined shadows — barely there */
  --shadow-editorial: 0 1px 0 rgba(21,18,33,0.06);
}

/* ---------- 2. HERO: kill the multi-color word splits ---------- */
/* The old design colored "websites" and "business" purple.
   Editorial-minimalist rule: ONE accent, used once per hero max. */

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero-refined);
  font-weight: 500;         /* was likely 700+ — editorial uses medium weight */
  letter-spacing: -0.02em;  /* tighter, more magazine-like */
  line-height: 1.05;
  text-wrap: balance;
  color: var(--color-text);
  margin-block: var(--space-8) var(--space-6);
}

/* Nested spans inside hero__title WERE colored purple — neutralize them. */
.hero__title > span[data-lang] > span:not(.underline-hand) {
  color: inherit;
  font-weight: inherit;
  background: none;
}

/* The italic accent word: keep ONE editorial signal — italic Fraunces */
.hero__title > span[data-lang] > span.underline-hand {
  font-style: italic;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  display: inline-block;
}

/* Subtle handwritten underline in indigo — the ONE accent moment */
.hero__title > span[data-lang] > span.underline-hand::after {
  content: '';
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.08em;
  height: 0.14em;
  background: var(--color-primary);
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left center;
  animation: bn-draw-underline 900ms cubic-bezier(0.65, 0, 0.35, 1) 600ms forwards;
  border-radius: 999px;
}

@keyframes bn-draw-underline {
  to { transform: scaleX(1); }
}

/* ---------- 3. HERO Eyebrow: refine the "Accepting new projects" pill ---------- */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(21,18,33,0.08);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text);
  box-shadow: var(--shadow-editorial);
}

.hero__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: bn-pulse 2s ease-in-out infinite;
}

@keyframes bn-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
  50%      { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.05); }
}

/* ---------- 4. HERO Subtitle: quieter, longer measure ---------- */
.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 58ch;
  margin-block: var(--space-6) var(--space-8);
  text-wrap: pretty;
}

/* ---------- 5. HERO Background: calmer image treatment ---------- */
/* The old design had the Berlin photo dominating. Editorial rule:
   image supports typography, not the other way around. */

.hero::before {
  /* Stronger scrim so type reads confidently — reduce photo dominance */
  background:
    linear-gradient(180deg,
      rgba(251, 250, 246, 0.85) 0%,
      rgba(251, 250, 246, 0.72) 40%,
      rgba(251, 250, 246, 0.88) 100%
    ),
    url('assets/photos/hero-berlin.webp') center/cover no-repeat !important;
  filter: saturate(0.75);   /* desaturate photo — less "bunt" */
}

.hero::after {
  /* Subtle grain for editorial feel */
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

.hero__inner { z-index: 3 !important; }

/* ---------- 6. BUTTONS: refined editorial CTAs ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: all 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--primary {
  background: var(--color-text);          /* midnight — not indigo */
  color: var(--color-text-inverse);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
}

.btn--primary:hover {
  background: var(--color-primary);       /* indigo appears ONLY on hover — the reveal */
  transform: translateY(-1px);
  box-shadow: 0 6px 24px -8px rgba(74, 58, 255, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
}

.btn--ghost:hover {
  background: var(--color-text);
  color: var(--color-text-inverse);
}

/* ---------- 7. NAV refinement — cleaner, lighter ---------- */
.nav {
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(251, 250, 246, 0.78);
  border-bottom: 1px solid rgba(21, 18, 33, 0.06);
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  color: var(--color-text);
  position: relative;
  padding: 0.5rem 0;
  transition: color 200ms ease;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 280ms cubic-bezier(0.65, 0, 0.35, 1);
}

.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* ---------- 8. SECTION rhythm — more editorial breathing ---------- */
section:not(.hero) {
  padding-block: var(--section-y);
}

/* Section headings — Editorial rule: display font, medium weight, tight tracking */
h2, .section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

/* Section eyebrows/kickers — small caps, wide tracking */
.section-eyebrow,
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  display: block;
}

/* ---------- 9. Fade-in on scroll (subtle, moderate motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow,
  .hero__title,
  .hero__subtitle,
  .hero__ctas {
    opacity: 0;
    transform: translateY(12px);
    animation: bn-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .hero__eyebrow  { animation-delay: 100ms; }
  .hero__title    { animation-delay: 220ms; }
  .hero__subtitle { animation-delay: 380ms; }
  .hero__ctas     { animation-delay: 500ms; }

  @keyframes bn-rise {
    to { opacity: 1; transform: translateY(0); }
  }

  /* Scroll-reveal for sections */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 10. Kill the old blob background (it fights the photo) ---------- */
.bn-hero-bg .bn-blob { display: none !important; }

/* ---------- 11. Focus states — editorial precision ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- 12. Selection — indigo tint ---------- */
::selection {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* ---------- 13. Dark mode adaptation ---------- */
[data-theme='dark'] .hero::before {
  background:
    linear-gradient(180deg,
      rgba(13, 11, 20, 0.82) 0%,
      rgba(13, 11, 20, 0.65) 40%,
      rgba(13, 11, 20, 0.88) 100%
    ),
    url('assets/photos/hero-berlin.webp') center/cover no-repeat !important;
  filter: saturate(0.65) brightness(0.85);
}

[data-theme='dark'] .btn--primary {
  background: #FBFAF6;
  color: #151221;
}

[data-theme='dark'] .btn--primary:hover {
  background: var(--color-primary);
  color: #fff;
}

[data-theme='dark'] .nav {
  background: rgba(13, 11, 20, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ---------- 14. Mobile — protect editorial rhythm ---------- */
@media (max-width: 768px) {
  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.08;
  }
  .hero__subtitle {
    font-size: 1rem;
  }
  section:not(.hero) {
    padding-block: clamp(3rem, 8vw, 5rem);
  }
}
