/* =========================================================================
   Huang Xiaoqi — counsel website
   Design: editorial law-firm aesthetic. Ink navy + warm gold + paper.
   Display serif for authority, clean sans for clarity. Self-contained.
   ========================================================================= */

:root {
  /* --- Colour palette (refined) --- */
  --ink:          #0b1622;   /* deeper, richer base */
  --ink-2:        #12202f;
  --ink-3:        #1a2d42;
  --ink-soft:     #253547;
  --gold:         #a07832;   /* more restrained, serious gold */
  --gold-2:       #b9954a;
  --gold-bright:  #cca55e;
  --gold-pale:    rgba(160, 120, 50, 0.12);
  --paper:        #f5f2eb;   /* slightly warmer paper */
  --paper-2:      #ece7d9;
  --paper-3:      #e4dece;
  --line:         rgba(11, 22, 34, 0.10);
  --line-med:     rgba(11, 22, 34, 0.16);
  --line-light:   rgba(255, 255, 255, 0.11);
  --line-light2:  rgba(255, 255, 255, 0.06);
  --text:         #1a2535;
  --text-soft:    #4e5f73;
  --text-xsoft:   #6b7d92;
  --text-on-ink:  #ddd6c6;
  --text-on-ink-soft: #8c9fb5;

  /* --- Typography --- */
  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
  --sans:  "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* --- Layout --- */
  --wrap:   1180px;
  --gut:    clamp(22px, 5vw, 64px);
  --radius: 3px;

  /* --- Motion --- */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --t:         0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast:    0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
  /* Eliminate 300ms tap delay globally on mobile */
  touch-action: manipulation;
}

/* Remove default tap highlight; we use :active for on-brand feedback instead */
* { -webkit-tap-highlight-color: transparent; }

/* Custom scrollbar — restrained, on-brand */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--gold-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Selection colour */
::selection { background: var(--gold); color: #fff; }
::-moz-selection { background: var(--gold); color: #fff; }

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
ul { list-style: none; }

/* =========================================================================
   Skip link — visible on focus, hidden otherwise
   ========================================================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.7em 1.2em;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  white-space: nowrap;
  transition: top 0.15s;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Focus visible — accessible, styled */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* ---- Base headings ---- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.015em;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}

/* ---- Eyebrow ---- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.665rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
  flex: none;
}

/* ---- Section shell ---- */
.section { padding-block: clamp(72px, 9vw, 136px); position: relative; }
.section__head {
  max-width: 680px;
  margin-bottom: clamp(40px, 5.5vw, 72px);
}
.section__title {
  font-size: clamp(1.95rem, 4vw, 2.9rem);
  margin-top: 0.6rem;
  line-height: 1.05;
}
.section__intro {
  margin-top: 1.1rem;
  color: var(--text-soft);
  font-size: 1.01rem;
  max-width: 56ch;
  line-height: 1.73;
}

/* ---- Hairline divider ---- */
.hairline {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 70%);
  margin-block: clamp(48px, 6vw, 80px);
  opacity: 0.35;
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85em 1.55em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  white-space: nowrap;
  position: relative;
  line-height: 1;
  /* Minimum 44px tap target height */
  min-height: 44px;
  touch-action: manipulation;
}
.btn--gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 2px 18px rgba(160,120,50,0.28);
}
.btn--gold:hover {
  background: var(--ink);
  box-shadow: 0 6px 28px rgba(11,22,34,0.38);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  border-color: var(--line-med);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}
.btn--ghost-light {
  background: transparent;
  border-color: rgba(255,255,255,0.22);
  color: var(--text-on-ink);
}
.btn--ghost-light:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
  transform: translateY(-2px);
}
.btn__arrow {
  transition: transform var(--t);
  flex: none;
  width: 16px;
  height: 16px;
}
.btn:hover .btn__arrow { transform: translateX(4px); }
/* On-brand tap feedback — replaces browser's blue flash */
.btn:active { transform: scale(0.97); }
.btn--gold:active { background: var(--ink); }
.btn--ghost:active { background: var(--paper-2); }
.btn--ghost-light:active { background: rgba(255,255,255,0.1); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  transition: background var(--t), box-shadow var(--t), padding var(--t);
  padding-block: 20px;
  /* Safe-area: push down from notch on iOS/Android */
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header.scrolled {
  /* Solid fallback for browsers without backdrop-filter support */
  background: rgb(245, 242, 235);
  box-shadow: 0 1px 0 var(--line), 0 4px 24px rgba(11,22,34,0.06);
  padding-block: 13px;
  padding-top: calc(13px + env(safe-area-inset-top, 0px));
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.scrolled {
    background: rgba(245, 242, 235, 0.93);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
  }
}

/* Brand */
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  color: var(--ink);
  transition: color var(--t);
}
.brand__name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1;
}
.brand__mark {
  color: var(--gold);
  font-size: 1.3rem;
  font-family: var(--serif);
  line-height: 1;
}
.site-header:not(.scrolled):not(.solid) .brand { color: var(--paper); }
.site-header.solid { background: var(--ink); }
.site-header.solid .brand { color: var(--paper); }

/* Nav links */
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.nav__links { display: flex; gap: clamp(12px, 1.8vw, 26px); }
.nav__links a {
  font-size: 0.765rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-block: 5px;
  transition: color var(--t-fast);
  touch-action: manipulation;
}
.site-header:not(.scrolled):not(.solid) .nav__links a { color: rgba(255,255,255,0.75); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--t);
}
.nav__links a:hover { color: var(--gold); }
.nav__links a:hover::after { width: 100%; }
.site-header:not(.scrolled):not(.solid) .nav__links a:hover { color: #fff; }

/* Language switcher */
.lang { position: relative; }
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.745rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line-med);
  color: var(--ink);
  padding: 0.5em 0.9em;
  border-radius: var(--radius);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  min-height: 44px; /* WCAG 2.5.5 tap target */
  touch-action: manipulation;
}
.lang__btn-label {
  /* Visible language name inside the button */
}
.site-header:not(.scrolled):not(.solid) .lang__btn {
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.75);
}
.lang__btn:hover { border-color: var(--gold); color: var(--gold); }
.lang__btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 172px;
  background: var(--paper);
  border: 1px solid var(--line-med);
  border-radius: var(--radius);
  box-shadow: 0 20px 56px rgba(11,22,34,0.18), 0 2px 8px rgba(11,22,34,0.08);
  padding: 5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--t-fast), visibility var(--t-fast), transform var(--t-fast);
  z-index: 95;
}
.lang.open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.6em 0.85em;
  font-size: 0.82rem;
  color: var(--text);
  border-radius: 2px;
  transition: background var(--t-fast), color var(--t-fast);
  min-height: 44px; /* WCAG 2.5.5 tap target */
  touch-action: manipulation;
}
.lang__menu a:hover,
.lang__menu a:focus-visible { background: var(--paper-2); color: var(--ink); outline-offset: -2px; }
.lang__menu a[aria-current="true"] { color: var(--gold); font-weight: 600; }
.lang__menu a span.tag {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-xsoft);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 11px; /* 22px icon + 11px each side = 44px */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  /* Pull back right edge to keep visual alignment with wrap edge */
  margin-right: -11px;
}
.menu-toggle span {
  width: 22px;
  height: 1.5px;
  background: currentColor;
  color: var(--ink);
  transition: transform var(--t), opacity var(--t);
  display: block;
}
.site-header:not(.scrolled):not(.solid) .menu-toggle span { background: rgba(255,255,255,0.85); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  /* dvh: shrinks/grows with browser chrome; svh: always small viewport (chrome visible)
     vh fallback for browsers that don't support dvh/svh.
     min ensures content always shows even on tiny screens. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 110% 80% at 85% 0%, rgba(160,120,50,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(26,45,66,0.8) 0%, transparent 70%),
    linear-gradient(160deg, var(--ink) 0%, #0e1c2e 50%, #091420 100%);
  color: var(--text-on-ink);
  overflow: hidden;
  padding-block: 140px 80px;
  /* Safe-area: push content away from notch/pill; top already handled by header */
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Subtle grid texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 85% at 40% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 40% 40%, #000 20%, transparent 75%);
}

/* Diagonal gold accent line */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 38%;
  background: linear-gradient(var(--gold), transparent);
  opacity: 0.5;
}

/* Large watermark character */
.hero__monogram {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-52%);
  font-family: var(--serif);
  font-size: clamp(36vh, 44vh, 52vh);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.04);
  font-weight: 600;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.hero .wrap { position: relative; z-index: 2; }
.hero__inner { max-width: 860px; }

/* Hero eyebrow — slightly different treatment on dark */
.hero .eyebrow { color: var(--gold-2); opacity: 0.9; }
.hero .eyebrow::before { background: var(--gold-2); }

.hero__name {
  font-size: clamp(3.6rem, 11.5vw, 8.2rem);
  letter-spacing: -0.025em;
  margin: 0.22em 0 0.14em;
  color: #fff;
  line-height: 0.96;
  /* Subtle gradient on hero name */
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,0.78) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
/* Fallback for browsers that don't support text-fill-color */
@supports not (-webkit-text-fill-color: transparent) {
  .hero__name { color: #fff; background: none; }
}

.hero__role {
  font-family: var(--sans);
  font-size: clamp(0.9rem, 1.8vw, 1.16rem);
  font-weight: 400;
  color: var(--gold-bright);
  letter-spacing: 0.015em;
  line-height: 1.5;
}
.hero__tagline {
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  max-width: 56ch;
  color: rgba(221,214,198,0.82);
  line-height: 1.68;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2.4rem;
  align-items: center;
}

/* Hero stats bar */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(24px, 4.5vw, 60px);
  margin-top: clamp(44px, 7vw, 80px);
  padding-top: clamp(24px, 3vw, 36px);
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 680px;
  width: fit-content;
}
.stat__num {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  color: var(--gold-bright);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 0.73rem;
  color: var(--text-on-ink-soft);
  margin-top: 0.55em;
  letter-spacing: 0.01em;
  max-width: 20ch;
  line-height: 1.5;
  text-transform: none;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(140,159,181,0.6);
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--gold-2), transparent);
  animation: scrolldash 2.4s ease-in-out infinite;
}
@keyframes scrolldash {
  0%, 100% { opacity: 0.2; transform: scaleY(0.4) translateY(-8px); }
  60% { opacity: 0.8; transform: scaleY(1) translateY(0); }
}

/* =========================================================================
   About / Profile
   ========================================================================= */
.about { background: var(--paper); }
.about__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: clamp(40px, 6.5vw, 88px);
  align-items: start;
}

/* Portrait */
.about__media { position: relative; }
.about__portrait {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, var(--ink-3) 0%, var(--ink) 100%);
  border: 1px solid var(--line);
  position: relative;
}
.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Explicit aspect-ratio + width/height attrs on <img> prevent CLS */
  aspect-ratio: 4 / 5;
}
/* Inner vignette */
.about__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), inset 0 -60px 60px rgba(11,22,34,0.3);
}

/* Accent border — offset frame effect */
.about__media::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid rgba(160,120,50,0.2);
  border-radius: var(--radius);
  z-index: 0;
  pointer-events: none;
}
.about__portrait { position: relative; z-index: 1; }
.about__badge { z-index: 2; position: absolute; }

/* Floating credential badge */
.about__badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--gold);
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  max-width: 220px;
  box-shadow: 0 16px 40px rgba(160,120,50,0.30), 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
}
.about__badge strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  display: block;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.about__badge span { font-size: 0.74rem; opacity: 0.9; margin-top: 0.2em; display: block; }

/* About content */
.about__lead {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.78rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.4rem;
  letter-spacing: -0.01em;
}
.about__body p {
  color: var(--text-soft);
  margin-bottom: 1.05rem;
  font-size: 0.985rem;
}
.about__body p:first-of-type { color: var(--text); }

/* Focus tags */
.focus {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.focus__label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.focus__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.focus__tags li {
  font-size: 0.78rem;
  padding: 0.45em 0.95em;
  border: 1px solid var(--line-med);
  border-radius: 100px;
  color: var(--text-soft);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
  cursor: default;
}
.focus__tags li:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* =========================================================================
   Practice areas
   ========================================================================= */
.practice {
  background: var(--ink);
  color: var(--text-on-ink);
  position: relative;
  overflow: hidden;
}

/* Subtle background texture for practice */
.practice::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.practice .section__title { color: #fff; }
.practice .section__intro { color: var(--text-on-ink-soft); max-width: 54ch; }
.practice .eyebrow { color: var(--gold-2); }
.practice .eyebrow::before { background: var(--gold-2); }

.practice__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.pcard {
  background: var(--ink);
  padding: clamp(28px, 3.2vw, 44px);
  transition: background var(--t);
  position: relative;
  overflow: hidden;
}
.pcard:hover { background: rgba(26,45,66,0.9); }
.pcard__num {
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  font-weight: 600;
  opacity: 0.7;
}
.pcard__title {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: #fff;
  margin: 0.85rem 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.pcard__desc {
  font-size: 0.875rem;
  color: var(--text-on-ink-soft);
  line-height: 1.65;
}
/* Bottom accent on hover */
.pcard::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width var(--t);
}
.pcard:hover::after { width: 100%; }

/* =========================================================================
   Signature Cases — centrepiece treatment
   ========================================================================= */
.cases { background: var(--paper-2); position: relative; }

/* Subtle topographic lines */
.cases::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 79px,
    var(--ink) 79px,
    var(--ink) 80px
  );
  pointer-events: none;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.8vw, 28px);
}

.case {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t);
  position: relative;
}
.case:hover {
  box-shadow: 0 20px 60px -16px rgba(11,22,34,0.22), 0 4px 16px rgba(11,22,34,0.06);
  transform: translateY(-2px);
}

/* Left accent bar */
.case::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-2) 100%);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t);
}
.case:hover::before { transform: scaleY(1); }

/* Figure column — the "centrepiece" stat panel */
.case__figure-wrap {
  background: var(--ink);
  padding: clamp(24px, 2.8vw, 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

/* Radial glow in corner of figure panel */
.case__figure-wrap::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(160,120,50,0.16) 0%, transparent 65%);
  pointer-events: none;
}

/* Top horizontal rule — gold hairline */
.case__figure-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent 80%);
  opacity: 0.6;
}

.case__tag {
  font-size: 0.575rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  opacity: 0.85;
  line-height: 1.5;
  word-break: break-word;
}

.case__figure {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 4.4rem);
  line-height: 0.92;
  color: #fff;
  margin-top: 0.55rem;
  margin-bottom: 0.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.case__figure-label {
  font-size: 0.68rem;
  color: rgba(140,159,181,0.7);
  margin-top: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Spacer pushes meta to bottom */
.case__figure-wrap .case__figure-label {
  flex: 1; /* takes remaining space, pushing meta-block down */
}
/* Bottom meta block */
.case__figure-wrap .case__meta-block {
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex: none;
}
.case__meta {
  font-size: 0.7rem;
  color: rgba(140,159,181,0.65);
  line-height: 1.5;
}
.case__role {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  margin-top: 0.28rem;
  font-style: italic;
  line-height: 1.5;
}

/* Main content column */
.case__main {
  padding: clamp(24px, 2.8vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.case__title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: var(--ink);
  margin-bottom: 0.85rem;
  line-height: 1.18;
  letter-spacing: -0.012em;
}
.case__summary {
  color: var(--text-soft);
  font-size: 0.91rem;
  margin-bottom: 1.25rem;
  line-height: 1.68;
}

/* Outcome callout — refined treatment */
.case__outcome {
  display: flex;
  gap: 0.75em;
  align-items: flex-start;
  font-size: 0.91rem;
  color: var(--ink);
  background: linear-gradient(100deg, var(--paper) 0%, rgba(245,242,235,0.5) 100%);
  border-left: 2px solid var(--gold);
  padding: 0.85em 1.1em;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.case__outcome svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--gold);
  margin-top: 4px;
  opacity: 0.85;
}

.cases__disclaimer {
  margin-top: 2.4rem;
  font-size: 0.75rem;
  color: var(--text-xsoft);
  font-style: italic;
  max-width: 72ch;
}

/* =========================================================================
   Recognition
   ========================================================================= */
.recognition { background: var(--paper); }
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.rec {
  background: var(--paper);
  padding: clamp(28px, 3.2vw, 44px);
  display: flex;
  gap: 24px;
  transition: background var(--t-fast);
  position: relative;
}
.rec:hover { background: #fff; }
/* Subtle top accent on hover */
.rec::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.rec:hover::after { transform: scaleX(1); }

.rec__year {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  flex: none;
  width: 82px;
  padding-top: 3px;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.rec__title {
  font-size: 1.05rem;
  font-family: var(--serif);
  color: var(--ink);
  margin-bottom: 0.45rem;
  line-height: 1.22;
  letter-spacing: -0.008em;
}
.rec__desc { font-size: 0.86rem; color: var(--text-soft); line-height: 1.6; }

/* =========================================================================
   The Firm
   ========================================================================= */
.firm {
  background: var(--ink);
  color: var(--text-on-ink);
  position: relative;
  overflow: hidden;
}

/* Diagonal texture */
.firm::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.firm__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(44px, 7vw, 96px);
  align-items: center;
  position: relative;
}
.firm .section__title { color: #fff; }
.firm .eyebrow { color: var(--gold-2); }
.firm .eyebrow::before { background: var(--gold-2); }
.firm__lead {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  color: var(--gold-2);
  margin-bottom: 1.5rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.firm__body p {
  color: var(--text-on-ink-soft);
  margin-bottom: 1.05rem;
  font-size: 0.96rem;
  line-height: 1.72;
}

/* Stats grid */
.firm__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
}
.fstat {
  background: rgba(11,22,34,0.8); /* slightly more opaque fallback */
  padding: clamp(22px, 2.8vw, 36px);
  text-align: left;
  transition: background var(--t-fast);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .fstat {
    background: rgba(11,22,34,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}
.fstat:hover { background: rgba(26,45,66,0.7); }
.fstat__num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 2.6rem);
  color: var(--gold-bright);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.fstat__label {
  font-size: 0.78rem;
  color: var(--text-on-ink-soft);
  margin-top: 0.5em;
  line-height: 1.4;
}

/* =========================================================================
   Contact
   ========================================================================= */
.contact { background: var(--paper); }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(44px, 7vw, 88px);
  align-items: center;
}
.contact__lead {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.contact__intro {
  margin-top: 1.2rem;
  color: var(--text-soft);
  max-width: 44ch;
  font-size: 0.96rem;
  line-height: 1.68;
}
.contact__cta { margin-top: 2.2rem; display: flex; }

/* Contact card — uses <address> element; reset UA italic */
.contact__card {
  background: var(--ink);
  color: var(--text-on-ink);
  border-radius: var(--radius);
  padding: clamp(28px, 3.8vw, 48px);
  box-shadow: 0 24px 60px rgba(11,22,34,0.22);
  font-style: normal; /* <address> default is italic — override */
}
.cline {
  display: flex;
  gap: 16px;
  padding-block: 18px;
  border-bottom: 1px solid var(--line-light2);
  align-items: flex-start;
}
.cline:last-child { border-bottom: 0; }
.cline svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex: none;
  margin-top: 4px;
  opacity: 0.85;
}
.cline__label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-ink-soft);
  margin-bottom: 0.2em;
}
.cline__value {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.9);
  word-break: break-word;
  line-height: 1.5;
}
.cline__value a { transition: color var(--t-fast); }
.cline__value a:hover { color: var(--gold-bright); }
.cline__note { font-size: 0.72rem; color: var(--text-on-ink-soft); margin-top: 0.25rem; }
.placeholder-pill {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gold);
  padding: 0.18em 0.55em;
  border-radius: 100px;
  margin-left: 0.4em;
  vertical-align: middle;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: #080f1a;
  color: var(--text-on-ink-soft);
  padding-block: clamp(48px, 6vw, 72px) 36px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-footer__brand .brand__name { color: rgba(255,255,255,0.85); font-size: 1.3rem; }
.site-footer__brand .brand { color: rgba(255,255,255,0.85); }
.site-footer__tagline { font-size: 0.83rem; margin-top: 0.6rem; max-width: 40ch; opacity: 0.7; }
.site-footer__langs { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.site-footer__langs span.lbl {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}
.site-footer__langs a {
  font-size: 0.82rem;
  transition: color var(--t-fast);
  opacity: 0.7;
  touch-action: manipulation;
}
.site-footer__langs a:hover,
.site-footer__langs a[aria-current="true"] { color: var(--gold-2); opacity: 1; }
.site-footer__disclaimer {
  font-size: 0.72rem;
  line-height: 1.75;
  margin-top: 28px;
  max-width: 78ch;
  color: rgba(140,159,181,0.6);
}
.site-footer__rights {
  font-size: 0.72rem;
  margin-top: 16px;
  color: rgba(94,110,128,0.7);
}

/* =========================================================================
   Back to top
   ========================================================================= */
.to-top {
  position: fixed;
  right: 24px;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t), transform var(--t), background var(--t-fast);
  box-shadow: 0 8px 24px rgba(11,22,34,0.3);
  touch-action: manipulation;
}
.to-top.show { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--gold); border-color: var(--gold); }
.to-top:active { background: var(--gold-2); transform: scale(0.93); }

/* =========================================================================
   Scroll reveal — JS-gated (no-JS sees everything)
   ========================================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.js [data-reveal].in {
  opacity: 1;
  transform: none;
}
/* Stagger delays */
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1024px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 360px; }
  .about__media::before { display: none; } /* remove offset frame on small */
  .firm__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .practice__grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   Mobile — 760px and below
   ========================================================================= */
@media (max-width: 760px) {
  body { font-size: 15.5px; }

  /* Mobile nav hidden by default */
  .nav__links { display: none; }
  .lang { display: none; }

  /* Mobile nav open state — full-screen overlay */
  .nav.open .nav__links {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--ink);
    /* Push content below header + notch; bottom padding above home indicator */
    padding-top: calc(80px + env(safe-area-inset-top, 0px));
    padding-inline: var(--gut);
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    z-index: 85;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    justify-content: flex-start;
  }
  .nav.open .nav__links a {
    color: var(--text-on-ink);
    padding-block: 16px;
    border-bottom: 1px solid var(--line-light2);
    font-size: 1.3rem;
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    min-height: 56px; /* generous tap zone on phones */
    display: flex;
    align-items: center;
    touch-action: manipulation;
  }
  .nav.open .nav__links a:active { color: var(--gold-bright); }
  .nav.open .lang {
    display: block;
    position: fixed;
    /* Sit above home indicator */
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    left: calc(var(--gut) + env(safe-area-inset-left, 0px));
    right: calc(var(--gut) + env(safe-area-inset-right, 0px));
    z-index: 86;
  }
  /* Inside the overlay the lang button should be full-width */
  .nav.open .lang__btn {
    width: 100%;
    justify-content: space-between;
  }
  /* Language dropdown opens upwards inside the overlay */
  .nav.open .lang__menu {
    bottom: calc(100% + 8px);
    top: auto;
    left: 0;
    right: 0;
    min-width: unset;
  }

  .menu-toggle { display: flex; z-index: 96; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  /* Tap feedback on hamburger */
  .menu-toggle:active span { background: var(--gold) !important; }

  /* ---- Hero ---- */
  /* Tighten top padding now that we account for safe-area in the header itself */
  .hero {
    padding-block: 120px 64px;
    /* Extra bottom clearance for scroll indicator */
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
  /* Stats: 3-col on phones ≥360px — numbers are short so they fit */
  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 4vw, 24px);
  }
  /* Constrain the watermark so it doesn't push layout on small phones */
  .hero__monogram { font-size: 55vw; right: -6vw; opacity: 0.5; }

  /* CTA buttons: stack full-width on phones for easy tapping */
  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__cta .btn { justify-content: center; }

  /* Scroll indicator — pull up above safe-area bottom */
  .hero__scroll {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /* ---- Sections ---- */
  .section { padding-block: clamp(52px, 8vw, 80px); }
  .section__head { margin-bottom: clamp(28px, 5vw, 48px); }
  /* Tighten section titles at mobile so long translations still fit */
  .section__title { font-size: clamp(1.7rem, 5.5vw, 2.2rem); }

  /* ---- Practice ---- */
  .practice__grid { grid-template-columns: 1fr; }

  /* ---- Cases ---- */
  .case { grid-template-columns: 1fr; }
  .case__figure-wrap {
    padding: clamp(20px, 5vw, 28px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    /* Don't grow too tall on mobile — it's a stat panel, not the main content */
    min-height: auto;
  }
  /* Lay the figure and meta side-by-side inside the panel on mobile */
  .case__figure { font-size: clamp(2.4rem, 10vw, 3.4rem); }

  /* ---- Recognition ---- */
  .rec-grid { grid-template-columns: 1fr; }
  /* On single-column layout the year can sit inline above the text */
  .rec { flex-direction: column; gap: 8px; }
  .rec__year { width: auto; padding-top: 0; }

  /* ---- Firm stats ---- */
  .firm__stats { grid-template-columns: repeat(2, 1fr); }

  /* ---- About badge ---- */
  .about__badge { left: 0; bottom: -16px; }

  /* ---- Footer lang links — bump tap target ---- */
  .site-footer__langs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-block: 4px;
    touch-action: manipulation;
  }
  /* Footer safe-area bottom */
  .site-footer { padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }

  /* ---- Contact card ---- */
  .cline { gap: 12px; }
  /* Phone/email links should be easy to tap */
  .cline__value a { display: inline-block; padding-block: 4px; min-height: 44px; line-height: 44px; }
}

/* =========================================================================
   Small phones — 480px and below
   ========================================================================= */
@media (max-width: 480px) {
  /* Slightly tighter global gutter */
  :root { --gut: clamp(16px, 5vw, 24px); }

  /* Hero name: reduce letter-spacing on narrow screens */
  .hero__name { letter-spacing: -0.03em; }
  /* Hero stats: drop to single column only on truly tiny screens */
  .hero__stats { grid-template-columns: repeat(3, 1fr); }
  /* Stat numbers: keep them readable but contained */
  .stat__num { font-size: clamp(1.6rem, 6.5vw, 2rem); }
  .stat__label { font-size: 0.67rem; }

  /* Firm stats: single column on smallest phones */
  .firm__stats { grid-template-columns: 1fr; }
  .contact__grid { gap: 32px; }

  /* Case figure panel — compact on 360px */
  .case__figure { font-size: clamp(2.2rem, 9vw, 3rem); }

  /* Tighten section padding */
  .section { padding-block: clamp(44px, 8vw, 64px); }

  /* Recognition: compact year */
  .rec__year { font-size: 0.88rem; }
}

/* =========================================================================
   Very small — 360px and below (budget Android, SE-class)
   ========================================================================= */
@media (max-width: 360px) {
  .hero__name { font-size: clamp(2.8rem, 10vw, 4rem); }
  .section__title { font-size: clamp(1.55rem, 5vw, 1.9rem); }
  .about__lead { font-size: clamp(1.1rem, 4.5vw, 1.3rem); }
  .contact__lead { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  /* Prevent long firm name overflowing badge */
  .about__badge { max-width: 180px; }
  /* Hero stats: switch to 1 column on sub-360 if numbers are wide */
  .hero__stats { grid-template-columns: 1fr; gap: 16px; }
}

/* =========================================================================
   Landscape phone — ensure hero doesn't require lots of scrolling
   ========================================================================= */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: calc(80px + env(safe-area-inset-top, 0px)) 48px;
    align-items: flex-start;
  }
  .hero__monogram { display: none; }
  .hero__stats { margin-top: clamp(24px, 4vw, 40px); }
  /* Tighten section padding in landscape so content is reachable */
  .section { padding-block: clamp(40px, 5vw, 64px); }
}

/* =========================================================================
   CJK overrides — Noto fonts render heavier; adjust weight, spacing, sizing
   ========================================================================= */
:lang(zh) h1,
:lang(zh) h2,
:lang(zh) h3 {
  letter-spacing: 0.025em;
  line-height: 1.2;
  font-weight: 700; /* Noto Serif SC needs 700 to look right at 600 weight */
}
:lang(zh) .hero__name {
  /* Chinese chars at same size feel much larger — scale down slightly */
  font-size: clamp(2.8rem, 8.5vw, 6rem);
  letter-spacing: 0.06em;
  line-height: 1;
  /* Disable gradient clip — CJK fonts don't support it reliably */
  -webkit-text-fill-color: #fff;
  background: none;
}
:lang(zh) .hero__role { letter-spacing: 0.06em; }
:lang(zh) .about__lead { letter-spacing: 0.02em; }
:lang(zh) .nav__links a { letter-spacing: 0.06em; }
:lang(zh) .eyebrow { letter-spacing: 0.14em; } /* less spacing with CJK chars */
:lang(zh) .section__title { letter-spacing: 0.03em; }
:lang(zh) .pcard__title { letter-spacing: 0.03em; }
/* CJK mobile: hero name needs more breathing room at narrowest widths */
@media (max-width: 480px) {
  :lang(zh) .hero__name { font-size: clamp(2.4rem, 9vw, 3.6rem); letter-spacing: 0.05em; }
  :lang(zh) .section__title { font-size: clamp(1.5rem, 5vw, 2rem); }
}

/* German long-word safety — hyph + break-word everywhere */
:lang(de) {
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}
:lang(de) .pcard__title { word-break: break-word; hyphens: auto; -webkit-hyphens: auto; }
:lang(de) .case__title  { word-break: break-word; hyphens: auto; -webkit-hyphens: auto; }
:lang(de) .hero__tagline { font-size: clamp(0.88rem, 1.45vw, 1.1rem); }
:lang(de) .hero__name { font-size: clamp(3rem, 9.5vw, 7rem); } /* Latin — can go bigger */
:lang(de) .rec__title { hyphens: auto; -webkit-hyphens: auto; word-break: break-word; }
/* German mobile: eyebrow labels can be very long — allow wrap */
@media (max-width: 760px) {
  :lang(de) .eyebrow { white-space: normal; }
  :lang(de) .case__tag { word-break: break-word; hyphens: auto; -webkit-hyphens: auto; }
  :lang(de) .hero__tagline { font-size: clamp(0.9rem, 2vw, 1rem); }
  :lang(de) .hero__name { font-size: clamp(2.8rem, 9vw, 5rem); }
}

/* French/Spanish — no specific overrides needed but ensure quotes */
:lang(fr), :lang(es) { quotes: "\00AB" "\00BB" "\2039" "\203A"; }
/* French/Spanish mobile: longer section titles need size safety */
@media (max-width: 480px) {
  :lang(es) .section__title,
  :lang(fr) .section__title { font-size: clamp(1.55rem, 5.5vw, 2rem); }
  :lang(es) .contact__lead,
  :lang(fr) .contact__lead { font-size: clamp(1.6rem, 6.5vw, 2.2rem); }
}

/* =========================================================================
   Print safety
   ========================================================================= */
@media print {
  .site-header, .to-top, .hero__scroll { display: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .hero { min-height: auto; padding-block: 40px; background: #0b1622 !important; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.7em; opacity: 0.6; }
}
