/* First Global — site styles
   Aesthetic: minimal contemporary, Hermès/Aesop-leaning
   ---------------------------------------------------- */

:root {
  /* Palette (v3: White / Anthracite / Bordeaux) */
  --bg: #FFFFFF;
  --bg-2: #F6F6F6;       /* subtle alt band */
  --fg: #2B2B2B;
  --fg-soft: #6E6E6E;
  --hair: rgba(43, 43, 43, 0.16);
  --hair-soft: rgba(43, 43, 43, 0.08);
  --accent: #6B1F2A;     /* bordeaux — primary accent */
  --accent-2: #1078C0;   /* logo blue — secondary accent, sampled from the First Global wordmark */
  --accent-2-soft: rgba(16, 120, 192, 0.14);

  /* Type */
  --font-sans: "Hanken Grotesk", "Söhne", "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 144px;

  /* Layout */
  --max-w: 1440px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Type sizes */
  --t-mono: 11px;
  --t-mono-letter: 0.14em;

  --t-display: clamp(40px, 6.5vw, 96px);
  --t-h1: clamp(32px, 4.4vw, 64px);
  --t-h2: clamp(26px, 3.2vw, 44px);
  --t-h3: clamp(20px, 1.6vw, 24px);
  --t-body: clamp(15px, 1.05vw, 17px);
  --t-body-lg: clamp(17px, 1.25vw, 20px);
  --t-small: 13px;
}

/* Reset --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 180ms ease, color 180ms ease;
}
a:hover { opacity: 0.6; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  text-wrap: balance;
}

button { font: inherit; cursor: pointer; }

/* Utility -------------------------------------------------------------- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: var(--t-mono-letter);
  text-transform: uppercase;
  font-weight: 400;
}

.hairline {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 0;
}

.fg-soft { color: var(--fg-soft); }
.bordeaux { color: var(--accent); }
.blue { color: var(--accent-2); }
.bg-blue-soft { background: var(--accent-2-soft); }

[data-en], [data-it] { display: inline; }
body[data-lang="it"] [data-en] { display: none; }
body[data-lang="en"] [data-it] { display: none; }

/* Reveal-on-scroll ----------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms cubic-bezier(.2,.6,.2,1), transform 700ms cubic-bezier(.2,.6,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Site header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hair-soft);
}
.site-header .container {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  height: 72px;
  gap: var(--s-6);
}
.brand {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.brand .mark { white-space: nowrap; }
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}
@media (max-width: 540px) {
  .brand-logo { height: 26px; }
}
.brand .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  transform: translateY(-2px);
}
.brand .mark { font-weight: 500; }
.brand .mark em { font-style: normal; font-weight: 400; color: var(--fg-soft); }

.nav-primary {
  display: flex;
  justify-content: center;
  gap: var(--s-7);
}
.nav-primary a {
  font-size: 14px;
  letter-spacing: -0.005em;
  position: relative;
  padding: 4px 0;
}
.nav-primary a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--fg);
}

.header-utils {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 4px;
  background: transparent;
}
.lang-switch button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--fg-soft);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}
.lang-switch button.is-active {
  background: var(--fg);
  color: var(--bg);
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  transition: background 200ms ease, color 200ms ease;
}
.cta-pill:hover {
  background: var(--fg);
  color: var(--bg);
  opacity: 1;
}
.cta-pill .arrow { transition: transform 200ms ease; }
.cta-pill:hover .arrow { transform: translateX(3px); }

/* Mobile nav */
.nav-toggle {
  display: none;
  color: var(--fg);
  background: transparent;
}
@media (max-width: 1080px) {
  .site-header .container { grid-template-columns: 1fr auto; height: 64px; }
  .nav-primary {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--hair);
    padding: var(--s-5) var(--gutter) var(--s-6);
    flex-direction: column;
    gap: var(--s-4);
    justify-content: flex-start;
  }
  .nav-primary.is-open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--fg);
    border-radius: 999px;
    background: transparent;
    color: var(--fg);
  }
  .nav-toggle svg { display: block; }
  .nav-toggle svg path {
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
  }
}

/* Section primitives --------------------------------------------------- */

.section {
  padding: var(--s-9) 0;
  position: relative;
}
.section--tight { padding: var(--s-7) 0; }
.section--alt   { background: var(--bg-2); }
.section--dark  {
  background: var(--section-dark-bg, var(--fg));
  color: var(--on-dark, var(--bg));
}
.section--dark .hairline { border-color: rgba(255,255,255,0.18); }
.section--dark .fg-soft { color: rgba(255,255,255,0.6); }
.section--dark .cta-pill { border-color: var(--on-dark, var(--bg)); color: var(--on-dark, var(--bg)); }
.section--dark .cta-pill:hover { background: var(--on-dark, var(--bg)); color: var(--section-dark-bg, var(--fg)); }
.section--dark .accent { color: var(--on-dark-accent, var(--accent)); }

.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-6);
  align-items: baseline;
}
.section-head .eyebrow { padding-top: 6px; color: var(--accent-2); }
.section-head h2 { max-width: 22ch; }

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* Hero ----------------------------------------------------------------- */

.hero {
  padding: clamp(80px, 12vw, 160px) 0 clamp(56px, 8vw, 120px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-6);
}
.hero-grid .eyebrow { padding-top: 10px; color: var(--accent-2); }
.hero h1 {
  font-size: var(--t-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  max-width: 16ch;
}
.hero h1 .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.hero .lede {
  margin-top: clamp(32px, 4vw, 56px);
  font-size: var(--t-body-lg);
  color: var(--fg-soft);
  max-width: 52ch;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* Editorial blocks ----------------------------------------------------- */

.editorial {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-6) var(--s-7);
  align-items: start;
}
.editorial .eyebrow { color: var(--accent-2); padding-top: 8px; }
.editorial h2 {
  font-size: var(--t-h1);
  font-weight: 400;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.editorial .body {
  margin-top: var(--s-5);
  font-size: var(--t-body-lg);
  max-width: 56ch;
  line-height: 1.5;
  color: var(--fg-soft);
}
.editorial .body strong { color: var(--fg); font-weight: 500; }
.editorial .cta { margin-top: var(--s-6); }

@media (max-width: 720px) {
  .editorial { grid-template-columns: 1fr; }
}

/* Practice areas (Services list) -------------------------------------- */

.practice-list { border-top: 1px solid var(--hair); }
.practice {
  display: grid;
  grid-template-columns: 200px 1fr 1fr auto;
  gap: var(--s-6);
  padding: clamp(28px, 3.6vw, 44px) 0;
  border-bottom: 1px solid var(--hair);
  align-items: start;
  transition: padding 250ms ease;
}
.practice .num { color: var(--accent-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; }
.practice h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.practice .body {
  color: var(--fg-soft);
  line-height: 1.55;
  max-width: 46ch;
}
.practice .arrow-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  align-self: center;
  white-space: nowrap;
}
.practice .arrow-link::after {
  content: " →";
  transition: padding-left 200ms ease;
  display: inline-block;
}
.practice:hover .arrow-link::after { padding-left: 6px; }

@media (max-width: 980px) {
  .practice { grid-template-columns: 1fr; gap: var(--s-3); }
  .practice .arrow-link { align-self: start; }
}

/* Big quote / pull --------------------------------------------------- */

.pull {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.1;
  max-width: 22ch;
}
.pull em { font-style: italic; color: var(--accent); padding-right: 0.08em; }

/* Italic em accents inside display headings: add trailing breathing room
   so the slanted last letter doesn't crash into the next word. */
h1 em, h2 em, h3 em { padding-right: 0.18em; }

/* Cards (PRIMA formats etc.) ------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: var(--s-6);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: 320px;
  transition: background 250ms ease, border-color 250ms ease;
}
.card:hover { background: rgba(43,43,43,0.03); }
.card .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent-2); }
.card h3 { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--hair-soft);
  font-size: 14px;
  color: var(--fg-soft);
}
.card li:last-child { border-bottom: 0; }
.card .card-foot { margin-top: auto; color: var(--fg-soft); font-size: 13px; }

.card--featured {
  background: var(--section-dark-bg, var(--fg));
  color: var(--on-dark, var(--bg));
  border-color: var(--section-dark-bg, var(--fg));
}
.card--featured .num,
.card--featured li,
.card--featured .card-foot { color: rgba(255,255,255,0.7); }
.card--featured li { border-color: rgba(255,255,255,0.14); }

/* Lean cards — drop the min-height for short-form 2-up layouts */
.cards--lean .card { min-height: 0; gap: var(--s-3); padding: var(--s-5) var(--s-6); }
.cards--lean .card h3 { font-size: clamp(22px, 2vw, 26px); }
.cards--lean .card .num { font-size: 11px; }

/* Markets grid -------------------------------------------------------- */

.markets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hair);
}
.markets > li {
  list-style: none;
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: var(--s-4);
  align-items: baseline;
}
.markets > li:nth-child(3n+2),
.markets > li:nth-child(3n) {
  padding-left: var(--s-5);
  border-left: 1px solid var(--hair-soft);
}
.markets .num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent-2); }
.markets .name { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.markets .meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--fg-soft); text-transform: uppercase; }

@media (max-width: 880px) {
  .markets { grid-template-columns: 1fr; }
  .markets > li { padding-left: 0 !important; border-left: 0 !important; }
}

/* Calendar list (PRIMA editions) -------------------------------------- */

.calendar { border-top: 1px solid var(--hair); }
.calendar .row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr auto;
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}
.calendar .yr { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; color: var(--accent); }
.calendar .city {
  font-size: clamp(28px, 3.4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.calendar .when { color: var(--fg-soft); }
.calendar .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  border: 1px solid var(--hair);
  padding: 6px 10px;
  border-radius: 999px;
}

@media (max-width: 880px) {
  .calendar .row { grid-template-columns: 1fr; gap: var(--s-2); padding: var(--s-5) 0; }
  .calendar .badge { justify-self: start; }
}

/* News list ------------------------------------------------------------ */

.news-list { border-top: 1px solid var(--hair); }
.news-item {
  display: grid;
  grid-template-columns: 120px 140px 1fr auto;
  gap: var(--s-5);
  padding: var(--s-6) 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
  transition: padding 250ms ease;
}
.news-item:hover { padding-left: var(--s-3); }
.news-item .date { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--fg-soft); text-transform: uppercase; }
.news-item .stream {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.news-item .title { font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.news-item .more { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }

@media (max-width: 880px) {
  .news-item { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* Contact form -------------------------------------------------------- */

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5) var(--s-6);
  margin-top: var(--s-7);
}
.form .field { display: flex; flex-direction: column; gap: 8px; }
.form .field--full { grid-column: 1 / -1; }
.form label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.form input,
.form select,
.form textarea {
  font: inherit;
  font-size: 16px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  padding: 10px 0;
  color: var(--fg);
  border-radius: 0;
  outline: none;
  transition: border-color 180ms ease;
}
/* Native dropdown panel — force a readable bg/fg so it works in all palettes
   (browsers render <option> using OS chrome; without explicit colors,
   Midnight ends up with invisible text on a dark dropdown). */
.form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%),
                    linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.form select option {
  background: var(--fg);
  color: var(--bg);
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  border-bottom-color: var(--fg);
}
.form textarea { resize: vertical; min-height: 110px; }
.form .submit-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-top: var(--s-3);
}
.form .submit {
  font: inherit;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  transition: background 200ms ease, color 200ms ease;
}
.form .submit:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.form .fine { color: var(--fg-soft); font-size: 13px; max-width: 56ch; }

@media (max-width: 720px) {
  .form { grid-template-columns: 1fr; }
}

/* Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--hair);
  padding: var(--s-9) 0 var(--s-7);
  background: var(--section-dark-bg, var(--fg));
  color: var(--on-dark, var(--bg));
}
.site-footer a:hover { opacity: 0.65; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.footer-top h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 400;
  margin-bottom: var(--s-3);
}
.footer-top ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-top .lockup .word {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
.footer-logo {
  display: block;
  width: 240px;
  height: 45px;
  object-fit: contain;
  object-position: left center;
}
.footer-top .lockup .word em {
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
}
.footer-top .lockup p { color: rgba(255,255,255,0.55); margin-top: var(--s-4); font-size: 14px; max-width: 32ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding-top: var(--s-5);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* Tweaks panel -------------------------------------------------------- */

.tweaks-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  display: none;
  align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.tweaks-fab.is-visible { display: inline-flex; }

.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 201;
  width: 320px;
  max-height: 70vh;
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--hair);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
}
.tweaks-panel.is-open { display: flex; }
.tweaks-panel header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--hair);
}
.tweaks-panel header h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.tweaks-panel .close {
  background: transparent; border: 0; padding: 4px 8px; font-size: 14px; color: var(--fg-soft);
}
.tweaks-section { padding: 14px 16px; border-bottom: 1px solid var(--hair-soft); }
.tweaks-section:last-child { border-bottom: 0; }
.tweaks-section .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin-bottom: 10px;
}
.tweaks-section .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.tweaks-section button.swatch {
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: 6px;
  padding: 10px 8px;
  font-size: 12px;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  text-align: left;
}
.tweaks-section button.swatch .chip {
  display: block; height: 18px; border-radius: 3px;
}
.tweaks-section button.swatch.is-active {
  border-color: var(--fg);
  outline: 2px solid var(--fg);
  outline-offset: -3px;
}
.tweaks-section button.font-choice {
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: 6px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}
.tweaks-section button.font-choice.is-active {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}


/* ============================================================== */
/* Mobile optimisations (added v3.1)                              */
/* ============================================================== */

/* Tighten section padding on small screens */
@media (max-width: 720px) {
  .section { padding: clamp(48px, 11vw, 72px) 0; }
  .section--tight { padding: clamp(40px, 8vw, 56px) 0; }
  .hero { padding: clamp(56px, 14vw, 96px) 0 clamp(40px, 8vw, 64px); }
  .site-footer { padding: clamp(56px, 11vw, 72px) 0 var(--s-6); }
}

/* Collapse inline 3- and 4-column grids on tablet */
@media (max-width: 880px) {
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Collapse all inline grids to one column on phone */
@media (max-width: 600px) {
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* When inline grid collapses, drop the left padding/border that paired columns */
  [style*="grid-template-columns: 1fr 1fr"] > [style*="border-left"] {
    border-left: 0 !important;
    padding-left: 0 !important;
  }
}

/* Header utilities at narrow widths */
@media (max-width: 540px) {
  .site-header .container { gap: var(--s-3); }
  .header-utils { gap: var(--s-2); }
  .header-utils > .cta-pill {
    padding: 7px 12px;
    font-size: 12px;
  }
  .brand { font-size: 16px; }
  .lang-switch button { padding: 3px 8px; font-size: 10px; }
}

/* On very small screens, drop the header CTA pill to give brand + lang + menu room */
@media (max-width: 400px) {
  .header-utils > .cta-pill { display: none; }
}

/* Footer compaction */
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr !important; gap: var(--s-5); }
  .footer-top h4 { margin-top: var(--s-3); }
  .footer-bottom { font-size: 9px; }
}

/* Hero stats: 4 → 2×2 on narrow viewports */
@media (max-width: 720px) {
  .hero .container > div[style*="repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--s-4) var(--s-5);
  }
}

/* Practice rows: tidy on small screens */
@media (max-width: 600px) {
  .practice {
    padding: var(--s-5) 0;
  }
  .practice h3 { font-size: clamp(20px, 5vw, 24px); }
}

/* News list: tighter rhythm */
@media (max-width: 600px) {
  .news-item { padding: var(--s-4) 0; gap: var(--s-2); }
  .news-item .title { font-size: 17px; }
  .news-item .more { font-size: 10px; }
}

/* Calendar rows */
@media (max-width: 600px) {
  .calendar .row { padding: var(--s-4) 0; gap: 6px; }
  .calendar .city { font-size: 26px; }
}

/* Markets list */
@media (max-width: 600px) {
  .markets > li { padding: var(--s-4) 0 !important; }
  .markets .name { font-size: 18px; }
}

/* Forms */
@media (max-width: 600px) {
  .form input, .form select, .form textarea { font-size: 16px; } /* prevent iOS zoom */
  .form .submit-row { flex-direction: column; align-items: stretch; }
  .form .submit { width: 100%; }
}

/* Editorial / hero / section-head: hide the left rail label, move it inline above */
@media (max-width: 720px) {
  .hero-grid > .eyebrow,
  .editorial > .eyebrow,
  .section-head > .eyebrow {
    margin-bottom: var(--s-3);
  }
}

/* Cards (PRIMA formats etc.) */
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr !important; }
  .card { min-height: 0; }
}

/* Tweaks panel: smaller on phones */
@media (max-width: 540px) {
  .tweaks-panel { right: 12px; left: 12px; width: auto; bottom: 68px; }
  .tweaks-fab { right: 12px; bottom: 12px; }
}

/* Type adjustments on phones */
@media (max-width: 480px) {
  h1, .hero h1 { letter-spacing: -0.02em; }
  .lede { font-size: 16px !important; line-height: 1.5; }
}


/* ============================================================== */
/* Animations (MBM-inspired)                                      */
/* ============================================================== */

/* --- Marquee strip --------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(20px, 2.6vw, 36px) 0;
  background: var(--bg);
  /* feathered edges so words slip in / out softly */
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marqueeScroll var(--marquee-duration, 40s) linear infinite;
  font-size: clamp(29px, 4.8vw, 70px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}
.marquee-track > .group {
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-right: clamp(28px, 4vw, 56px);
}
.marquee-track .dot {
  display: inline-block;
  width: clamp(8px, 0.8vw, 14px);
  height: clamp(8px, 0.8vw, 14px);
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.18em);
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Hero word-by-word reveal --------------------------------- */
.hero h1 .w {
  display: inline-block;
  /* Clip top/bottom only so the italic glyphs (e.g. APAC's "C") can
     extend past their advance-width box on the right without being cut. */
  clip-path: inset(-0.05em -0.5em 0 -0.05em);
  vertical-align: bottom;
  line-height: 1.05;
  padding-bottom: 0.04em; /* descender headroom */
}
.hero h1 .w.is-done {
  clip-path: none; /* italic glyphs free to extend after the reveal */
}
/* Italic accent glyphs slant right past their advance width — push the
   following word over so the tip of the last italic letter (e.g. APAC's
   "C") isn't crowded by the next non-italic word. */
.hero h1 .accent { padding-right: 0.28em; }
.hero h1 .w-i {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}
.hero h1.is-revealed .w-i {
  animation: wordRise 900ms cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i,0) * 65ms + 180ms);
}
@keyframes wordRise {
  to { transform: translateY(0); }
}

/* --- Pulse dot — used near hero accent for an editorial pulse - */
.pulse-dot {
  display: inline-block;
  width: clamp(10px, 1vw, 14px);
  height: clamp(10px, 1vw, 14px);
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 0.18em;
  transform: translateY(-0.04em);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translateY(-0.04em) scale(1); opacity: 1; }
  50%      { transform: translateY(-0.04em) scale(1.35); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* --- Soft underline anim on text links ------------------------ */
a.under {
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}
a.under::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 350ms cubic-bezier(.2,.7,.2,1);
}
a.under:hover::after { right: 0; }


/* ============================================================== */
/* Markets v2 — eye-catching 3x3 grid                              */
/* ============================================================== */
.markets-v2 {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
  position: relative;
}
.market {
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: clamp(28px, 4vw, 48px) clamp(20px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 18px);
  position: relative;
  min-height: clamp(140px, 16vw, 200px);
  transition: background 280ms ease, transform 280ms ease;
}
.market::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.market:hover {
  background: var(--bg-2);
}
.market:hover::after {
  transform: scaleX(1);
}
.market-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.market-name {
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: auto;
}
.market-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.market-tag::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.market.is-base::after {
  transform: scaleX(1);
}

@media (max-width: 880px) {
  .markets-v2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .markets-v2 { grid-template-columns: 1fr; }
  .market { min-height: 0; }
}
