/* ==========================================================================
   REDTOWER — design system
   One set of tokens, two themes. Typography does the work.
   ========================================================================== */

/* ---- Inter (self-hosted, SIL Open Font License) -------------------------
   Self-hosted deliberately: no third-party request, no IP address handed to
   a font CDN, no render-blocking round trip. Licence: assets/fonts/Inter-OFL.txt
   ------------------------------------------------------------------------ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ------------------------------------------------------------ */

:root {
  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale — clamp(min, fluid, max) */
  --fs-display: clamp(2.25rem, 1.05rem + 5.3vw, 5.5rem);
  --fs-h1:      clamp(2.1rem, 1.2rem + 3.8vw, 4rem);
  --fs-h2:      clamp(1.75rem, 1.25rem + 2.1vw, 2.9rem);
  --fs-h3:      clamp(1.3rem, 1.08rem + 0.95vw, 1.85rem);
  --fs-lead:    clamp(1.075rem, 0.98rem + 0.42vw, 1.35rem);
  --fs-body:    1rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-micro:   0.6875rem;

  /* Space */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 6rem;     --sp-10: 8rem;
  --section-y: clamp(4.5rem, 2.5rem + 8vw, 9.5rem);
  --gutter: clamp(1.25rem, 0.6rem + 2.8vw, 3.5rem);
  --measure: 62ch;
  --wrap: 1240px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 420ms;

  --radius: 2px;
  --nav-h: 72px;
}

/* ---- Themes -------------------------------------------------------------
   One token set, two values each: light-dark(light, dark).

   Each token is declared twice on purpose. The first declaration is the light
   value and is what a browser without light-dark() support keeps; the second
   overrides it in every browser that does. So the site degrades to a correct
   light theme rather than to an unstyled one.

   Which side is used comes from `color-scheme`. With JavaScript off, :root
   resolves to the visitor's OS preference. The inline <head> script pins it to
   an explicit choice before first paint, so the theme never flashes.

   All pairs verified: body text ≥ 16:1, secondary ≥ 6.5:1, tertiary ≥ 4.4:1,
   accent ≥ 5.7:1, focus ring ≥ 5.4:1 in both themes.
   ------------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  --bg:          #FBFAF7;  --bg:          light-dark(#FBFAF7, #131211);
  --bg-alt:      #F4F2ED;  --bg-alt:      light-dark(#F4F2ED, #191817);
  --surface:     #FFFFFF;  --surface:     light-dark(#FFFFFF, #1B1A18);

  --text:        #16130F;  --text:        light-dark(#16130F, #F3F0EA);
  --text-2:      #605A52;  --text-2:      light-dark(#605A52, #A9A29A);
  --text-3:      #726B63;  --text-3:      light-dark(#726B63, #8D867D);

  --line:        #E3DED5;  --line:        light-dark(#E3DED5, #2C2A27);
  --line-strong: #CFC8BC;  --line-strong: light-dark(#CFC8BC, #423F3A);
  --line-input:  #8F8880;  --line-input:  light-dark(#8F8880, #6B665D);

  --accent:      #A81B22;  --accent:      light-dark(#A81B22, #E8656A);
  --accent-ink:  #8C161C;  --accent-ink:  light-dark(#8C161C, #F08E92);
  --accent-soft: #F6EAE9;  --accent-soft: light-dark(#F6EAE9, #2A1A1A);
  --on-accent:   #FFFFFF;  --on-accent:   light-dark(#FFFFFF, #17100F);

  --focus:       #1F5FBF;  --focus:       light-dark(#1F5FBF, #7FB0FF);
  /* light-dark() takes colours only, so the shadow pair is set the long way. */
  --shadow-a:    rgba(22,19,15,.06); --shadow-a: light-dark(rgba(22,19,15,.06), rgba(0,0,0,.45));
  --shadow-b:    rgba(22,19,15,.22); --shadow-b: light-dark(rgba(22,19,15,.22), rgba(0,0,0,.7));
  --shadow: 0 1px 2px var(--shadow-a), 0 14px 36px -20px var(--shadow-b);
}

[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  overflow-x: hidden;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

:where(h1, h2, h3, h4) {
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---- Layout primitives ------------------------------------------------- */

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

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 1.5rem + 6vw, 6rem); }
.section--alt { background: var(--bg-alt); }
.rule { border: 0; border-top: 1px solid var(--line); }

.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-5);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-2);
  max-width: var(--measure);
  letter-spacing: -0.012em;
}

.skip {
  position: absolute; left: var(--sp-4); top: -100px;
  z-index: 200; background: var(--text); color: var(--bg);
  padding: var(--sp-3) var(--sp-5); font-size: var(--fs-sm);
  transition: top 160ms var(--ease);
}
.skip:focus { top: var(--sp-4); }

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.86rem 1.55rem;
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease),
              color 200ms var(--ease), transform 200ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }

.btn--sm { padding: 0.55rem 1.05rem; font-size: var(--fs-xs); }

.link-arrow {
  display: inline-flex; align-items: baseline; gap: 0.45em;
  text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px; transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }
.link-arrow span[aria-hidden] { transition: transform 220ms var(--ease); }
.link-arrow:hover span[aria-hidden] { transform: translateX(3px); }

/* ---- Header ------------------------------------------------------------ */

.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 260ms var(--ease), background-color 260ms var(--ease);
}
.header[data-stuck="true"] { border-bottom-color: var(--line); }

.header__inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--sp-5);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; margin-right: auto; color: var(--text);
}
.brand__mark { width: 15px; height: auto; color: var(--text); flex: none; }
.brand__name {
  font-size: 0.9375rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; white-space: nowrap;
}
.brand__name em { font-style: normal; font-weight: 400; color: var(--text-3); }

/* The mark plus REDTOWER carries the brand once space is tight. */
@media (max-width: 560px) {
  .brand__name { font-size: 0.875rem; letter-spacing: 0.11em; }
  .brand__name em { display: none; }
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav a {
  font-size: var(--fs-sm); text-decoration: none; color: var(--text-2);
  transition: color 180ms var(--ease); position: relative; padding-block: 4px;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); }

.header__tools { display: flex; align-items: center; gap: var(--sp-3); }

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; color: var(--text-2);
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 15px; height: 15px; }

.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun  { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun  { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.lang {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; height: 34px;
}
.lang a {
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.08em;
  padding: 0 0.5rem; height: 100%; display: grid; place-items: center;
  text-decoration: none; color: var(--text-3);
  transition: color 180ms var(--ease), background-color 180ms var(--ease);
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--bg); background: var(--text); }

.burger { display: none; }

/* Mobile nav */
@media (max-width: 900px) {
  .nav, .header .btn--primary { display: none; }
  .burger { display: grid; }

  .header[data-open="true"] { background: var(--bg); }

  .mobile-nav {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
    background: var(--bg);
    padding: var(--sp-6) var(--gutter) var(--sp-8);
    display: flex; flex-direction: column; gap: var(--sp-2);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 240ms var(--ease), transform 240ms var(--ease), visibility 240ms;
    overflow-y: auto;
  }
  .mobile-nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
  .mobile-nav a.mobile-nav__link {
    font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none;
    padding-block: var(--sp-4); border-bottom: 1px solid var(--line);
  }
  .mobile-nav .btn { margin-top: var(--sp-6); justify-content: center; }
  body[data-lock="true"] { overflow: hidden; }
}
@media (min-width: 901px) { .mobile-nav { display: none; } }

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

.hero {
  position: relative;
  padding-block: clamp(4.5rem, 2rem + 12vw, 12rem) clamp(4rem, 2rem + 8vw, 9rem);
  overflow: hidden;
}

.hero__mark {
  position: absolute; right: max(-4vw, -80px); top: 50%; translate: 0 -50%;
  height: min(125%, 780px); width: auto; color: var(--text);
  opacity: 0.05; pointer-events: none; z-index: 0;
}
[data-theme="dark"] .hero__mark { opacity: 0.075; }
@media (max-width: 760px) { .hero__mark { opacity: 0.035; height: min(70%, 420px); right: -14%; top: 12%; translate: none; } }

.hero__eyebrow {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
}
.hero__eyebrow::after { content: ""; height: 1px; flex: 1 1 auto; max-width: 120px; background: var(--line); }

.hero__inner { position: relative; z-index: 1; }

.hero h1 {
  font-size: var(--fs-display);
  font-weight: 480;
  letter-spacing: -0.038em;
  line-height: 0.98;
  max-width: 16ch;
}
.hero h1 .accent { color: var(--accent); }

.hero__sub {
  margin-top: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  font-size: var(--fs-lead);
  line-height: 1.5;
  letter-spacing: -0.014em;
  color: var(--text-2);
  max-width: 46ch;
}

.hero__note {
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--text-2);
  display: flex; align-items: center; gap: 0.7rem;
}
.hero__note::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); flex: none;
}

.hero__cta {
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.25rem);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}

/* ---- Logo / credibility strip ------------------------------------------ */

.strip { border-block: 1px solid var(--line); padding-block: var(--sp-6); }
.strip__label {
  font-size: var(--fs-micro); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: var(--sp-5);
}
.strip__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--sp-4) clamp(1.5rem, 3.4vw, 3.25rem);
}
.strip__list li {
  font-size: clamp(0.875rem, 0.8rem + 0.28vw, 1.0625rem);
  font-weight: 500; letter-spacing: -0.005em; color: var(--text-2);
  white-space: nowrap;
}
.strip__list li span { color: var(--text-3); font-weight: 400; }
.strip__foot { margin-top: var(--sp-5); font-size: var(--fs-xs); color: var(--text-3); max-width: 70ch; }

/* Wraps rather than scrolls: nothing hides off-screen, nothing to tab into. */
@media (max-width: 720px) {
  .strip__list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3) var(--sp-5);
  }
  .strip__list li { white-space: normal; font-size: 0.875rem; line-height: 1.35; }
  .strip__list li span { display: block; color: var(--text-3); }
}
@media (max-width: 400px) { .strip__list { grid-template-columns: 1fr; } }

/* ---- Section head ------------------------------------------------------ */

.head {
  display: grid; gap: var(--sp-5);
  grid-template-columns: 1fr;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
@media (min-width: 900px) {
  .head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-8); align-items: end; }
}
.head h2 { font-size: var(--fs-h2); }

/* ---- Expertise accordion ----------------------------------------------- */

.exp { border-top: 1px solid var(--line); }

.exp__item { border-bottom: 1px solid var(--line); }

.exp__btn {
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  display: grid; align-items: start;
  grid-template-columns: 3.25rem 1fr 2rem;
  gap: var(--sp-4);
  padding-block: clamp(1.5rem, 1rem + 1.4vw, 2.35rem);
  color: var(--text);
  transition: color 200ms var(--ease);
}
.exp__btn:hover { color: var(--accent); }
.exp__btn:hover .exp__num { color: var(--accent); }

.exp__num {
  font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em; color: var(--text-3); padding-top: 0.45em;
  transition: color 200ms var(--ease);
}

.exp__title {
  display: block; font-size: var(--fs-h3); font-weight: 500;
  letter-spacing: -0.024em; line-height: 1.1;
}
.exp__blurb {
  display: block; margin-top: var(--sp-3);
  font-size: var(--fs-sm); color: var(--text-2);
  max-width: 54ch; line-height: 1.55;
}

.exp__sign {
  position: relative; width: 15px; height: 15px; margin-top: 0.55em;
  justify-self: end; color: var(--text-3); flex: none;
}
.exp__sign::before, .exp__sign::after {
  content: ""; position: absolute; background: currentColor;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}
.exp__sign::before { inset: 7px 0 auto 0; height: 1px; }
.exp__sign::after  { inset: 0 7px 0 auto; width: 1px; }
.exp__btn[aria-expanded="true"] .exp__sign::after { transform: rotate(90deg); opacity: 0; }
.exp__btn[aria-expanded="true"] .exp__sign { color: var(--accent); }

.exp__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 380ms var(--ease);
}
.exp__panel[data-open="true"] { grid-template-rows: 1fr; }
.exp__panel > div { overflow: hidden; }

.exp__caps {
  list-style: none; margin: 0;
  padding: 0 0 clamp(1.75rem, 1.2rem + 1.4vw, 2.75rem) calc(3.25rem + var(--sp-4));
  display: grid; gap: var(--sp-2) var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-width: 62rem;
}
.exp__caps li {
  font-size: var(--fs-sm); color: var(--text-2);
  padding-left: 1.05rem; position: relative; line-height: 1.5;
}
.exp__caps li::before {
  content: ""; position: absolute; left: 0; top: 0.66em;
  width: 5px; height: 1px; background: var(--accent);
}
@media (max-width: 640px) {
  .exp__btn { grid-template-columns: 2.25rem 1fr 1.5rem; gap: var(--sp-3); }
  .exp__caps { padding-left: calc(2.25rem + var(--sp-3)); }
}

/* ---- Principles -------------------------------------------------------- */

.principles {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: 1fr;
}
@media (min-width: 620px)  { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(4, 1fr); } }

.principle {
  background: var(--bg);
  padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.principle h3 { font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.015em; }
.principle p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }
.principle__idx {
  font-size: var(--fs-micro); letter-spacing: 0.14em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.section--alt .principle { background: var(--bg-alt); }

/* ---- Case / experience ------------------------------------------------- */

.case {
  display: grid; gap: var(--sp-6);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 1.4rem + 2vw, 3.25rem);
}
@media (min-width: 900px) {
  .case { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6rem); }
}

.case__name { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.024em; }
.case__kind {
  margin-top: var(--sp-2); font-size: var(--fs-micro); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
}
.case__meta { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--text-2); max-width: 46ch; line-height: 1.62; }
.case__link { margin-top: var(--sp-4); font-size: var(--fs-sm); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tags li {
  font-size: var(--fs-xs); color: var(--text-2);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.3rem 0.75rem; white-space: nowrap;
}

.quote { margin-top: var(--sp-6); }
.quote blockquote {
  font-size: clamp(1.25rem, 1.05rem + 0.95vw, 1.85rem);
  line-height: 1.32; letter-spacing: -0.025em; font-weight: 400;
  border-left: 2px solid var(--accent); padding-left: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
  max-width: 30ch;
}
.quote figcaption { margin-top: var(--sp-4); padding-left: clamp(1rem, 0.6rem + 1.4vw, 1.75rem); font-size: var(--fs-sm); color: var(--text-2); }
.quote figcaption strong { color: var(--text); font-weight: 500; display: block; }

.disclosure { margin-top: var(--sp-5); padding-left: clamp(1rem, 0.6rem + 1.4vw, 1.75rem); }
.disclosure summary {
  cursor: pointer; font-size: var(--fs-sm); color: var(--text-2);
  list-style: none; display: inline-flex; align-items: center; gap: 0.5rem;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary:hover { color: var(--accent); border-color: var(--accent); }
.disclosure summary::after { content: "+"; font-size: 1em; line-height: 1; }
.disclosure[open] summary::after { content: "–"; }
.disclosure[open] summary { margin-bottom: var(--sp-4); }
.disclosure p {
  font-size: var(--fs-sm); line-height: 1.62; color: var(--text-2); max-width: 58ch;
}

/* ---- About ------------------------------------------------------------- */

.about { display: grid; gap: var(--sp-7); }
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--sp-8); align-items: start; }
}
.about__body > * + * { margin-top: var(--sp-5); }
.about__body p { color: var(--text-2); font-size: var(--fs-body); line-height: 1.65; max-width: 58ch; }
.about__body p strong { color: var(--text); font-weight: 500; }

.facts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.facts li {
  display: grid; gap: var(--sp-1) var(--sp-5); padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr;
}
@media (min-width: 520px) { .facts li { grid-template-columns: 8.5rem 1fr; } }
.facts dt, .facts .k {
  font-size: var(--fs-micro); letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-3);
  padding-top: 0.25em;
}
.facts .v { font-size: var(--fs-sm); color: var(--text); line-height: 1.5; }

.person { border: 1px solid var(--line); padding: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); }
.person__photo { margin: 0 0 var(--sp-5); }
.person__photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  filter: grayscale(1) contrast(1.02);
  transition: filter 420ms var(--ease);
}
.person:hover .person__photo img { filter: grayscale(0) contrast(1); }
:root[data-theme="dark"] .person__photo img { filter: grayscale(1) contrast(0.96) brightness(0.92); }
:root[data-theme="dark"] .person:hover .person__photo img { filter: grayscale(0) contrast(1) brightness(0.97); }
@media (prefers-reduced-motion: reduce) {
  .person__photo img, .person:hover .person__photo img { transition: none; }
}
.person__name { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.018em; }
.person__role { margin-top: var(--sp-1); font-size: var(--fs-sm); color: var(--text-2); }
.person__links { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.person__links a { font-size: var(--fs-sm); color: var(--text-2); text-decoration: none; transition: color 180ms var(--ease); }
.person__links a:hover { color: var(--accent); }

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

.contact { display: grid; gap: var(--sp-7); }
@media (min-width: 900px) {
  .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 6vw, 7rem); align-items: start; }
}
.contact h2 { font-size: var(--fs-h2); max-width: 16ch; }
.contact__direct { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.contact__direct a { font-size: var(--fs-lead); text-decoration: none; letter-spacing: -0.015em; border-bottom: 1px solid var(--line); padding-bottom: 3px; width: fit-content; transition: border-color 180ms var(--ease), color 180ms var(--ease); }
.contact__direct a:hover { color: var(--accent); border-color: var(--accent); }

.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: var(--fs-xs); letter-spacing: 0.04em; color: var(--text-2); }
.field label .req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid var(--line-input);
  padding: 0.7rem 0; font-size: var(--fs-body); border-radius: 0;
  transition: border-color 180ms var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--text-3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.field--row { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; }
@media (min-width: 560px) { .field--row { grid-template-columns: 1fr 1fr; } }
.form__note { font-size: var(--fs-xs); color: var(--text-3); max-width: 46ch; line-height: 1.55; }
.form__note a { color: var(--text-2); }
.form__note--err { color: var(--accent); }

/* Inline confirmation that replaces the form after a successful submit */
.form__ok {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: var(--sp-6) var(--sp-6) var(--sp-6) var(--sp-5);
  background: var(--bg-alt);
  max-width: 46ch;
  outline: none;
}
.form__ok-title {
  font-size: var(--fs-lead);
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 var(--sp-2);
}
.form__ok p:last-child { margin: 0; color: var(--text-2); line-height: 1.6; }

/* Thank-you page */
.thanks { max-width: 54ch; padding-block: var(--sp-8); }
.thanks h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; margin: var(--sp-3) 0 var(--sp-5); }
.thanks__lead { font-size: var(--fs-lead); color: var(--text-2); line-height: 1.55; margin: 0 0 var(--sp-3); }
.thanks__meta { color: var(--text-3); font-size: var(--fs-sm); margin: 0 0 var(--sp-7); }
.thanks__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.footer { border-top: 1px solid var(--line); padding-block: var(--sp-7) var(--sp-6); }
.footer__grid { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-7); } }

.footer__brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.footer__addr { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-2); font-style: normal; line-height: 1.7; }
.footer h3 { font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: var(--sp-4); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.footer ul a { font-size: var(--fs-sm); color: var(--text-2); text-decoration: none; transition: color 180ms var(--ease); }
.footer ul a:hover { color: var(--accent); }

.footer__bar {
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--text-3);
}

/* ---- Legal pages ------------------------------------------------------- */

.legal { max-width: 72ch; }
.legal h1 { font-size: var(--fs-h1); margin-bottom: var(--sp-6); }
.legal h2 { font-size: var(--fs-h3); margin-top: var(--sp-7); margin-bottom: var(--sp-4); }
.legal p, .legal li { color: var(--text-2); line-height: 1.7; font-size: var(--fs-sm); }
.legal p + p { margin-top: var(--sp-4); }
.legal ul { padding-left: 1.15rem; display: grid; gap: var(--sp-2); margin-top: var(--sp-3); }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.legal a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.legal dl { margin-top: var(--sp-4); }

/* ---- No JavaScript ------------------------------------------------------
   The page must still read completely with scripting disabled: every
   expertise panel is open, and the controls that need JS are withdrawn
   rather than left as dead affordances.
   ------------------------------------------------------------------------ */

html:not(.js) .exp__panel { grid-template-rows: 1fr; }
html:not(.js) .exp__sign,
html:not(.js) .theme-toggle,
html:not(.js) .burger,
html:not(.js) .mobile-nav { display: none !important; }
html:not(.js) .exp__btn { cursor: default; grid-template-columns: 3.25rem 1fr; }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---- Reveal animation -------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }

@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;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .exp__panel { transition: none; }
}

/* ---- Print ------------------------------------------------------------- */

@media print {
  .header, .mobile-nav, .hero__mark, .form, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
