/* ═══════════════════════════════════════════════════════════════
   MS Global Energy Strategy — stylesheet
   Palette: warm paper, green-black ink, burnished copper accent.
   Type: Fraunces (display serif) + Inter (text/UI).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --paper: #F7F4EE;
  --paper-2: #FCFAF5;
  --band: #F0EBE1;
  --ink: #1C2420;
  --ink-2: #46514C;
  --ink-3: #6B756F;
  --line: rgba(28, 36, 32, 0.14);
  --line-strong: rgba(28, 36, 32, 0.3);
  --copper: #B3592B;
  --copper-deep: #9A4B22;
  --copper-dark: #7F3D1B;
  --copper-soft: rgba(179, 89, 43, 0.07);
  --dark: #161F1A;
  --paper-on-dark: #F3EFE7;
  --paper-on-dark-70: rgba(243, 239, 231, 0.72);
  --paper-on-dark-55: rgba(243, 239, 231, 0.55);
  --line-on-dark: rgba(243, 239, 231, 0.15);
  --copper-light: #CE8352;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── Base ────────────────────────────────────────────────────── */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--paper);
  overflow-x: hidden;
}

/* Film-grain texture over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  color: var(--ink);
}

p { text-wrap: pretty; }

a { color: inherit; }

::selection { background: var(--copper); color: #FDF9F2; }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

[id] { scroll-margin-top: 92px; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7em 1.2em;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8em 1.55em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease);
}

.btn-primary {
  background: var(--copper-deep);
  color: #FDFBF7;
}
.btn-primary:hover {
  background: var(--copper-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(154, 75, 34, 0.6);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-lg { padding: 1em 2em; font-size: 15px; }

/* ── Header ──────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(247, 244, 238, 0.85);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 38px; flex: none; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name,
.brand-sub {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 1.05rem;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.site-nav a:not(.nav-cta) {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}
.site-nav a:not(.nav-cta):hover {
  color: var(--ink);
  text-decoration-color: var(--copper);
}

/* ── Hero ────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 9rem;
  padding-bottom: 2.75rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 460px at 84% 16%, rgba(179, 89, 43, 0.09), transparent 70%),
    radial-gradient(560px 420px at 6% 82%, rgba(28, 36, 32, 0.05), transparent 70%);
}

.hero-art {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 62%);
  mask-image: linear-gradient(105deg, transparent 30%, #000 62%);
}
.hero-art svg { width: 100%; height: 100%; }

.hero-inner {
  position: relative;
  margin-block: auto;
  padding-block: 2rem;
}

.eyebrow, .section-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
}

.eyebrow { margin-bottom: 1.5rem; }

.hero h1 {
  font-size: clamp(1.3rem, 1.8vw + 0.5rem, 2rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.016em;
  max-width: 42ch;
  text-wrap: balance;
}

.hero h1 em { font-style: italic; font-weight: 430; }

.hero-sub {
  max-width: 54ch;
  margin-top: 1.7rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
}

/* Stats band */

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2.2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat + .stat {
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}

.stat-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 480;
  line-height: 1;
  color: var(--ink);
}

.stat-num sup { font-size: 0.55em; color: var(--copper-deep); }

.stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Sections ────────────────────────────────────────────────── */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}

.band {
  background: var(--band);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 740px;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.section-title {
  margin-top: 1.1rem;
  font-size: clamp(1.3rem, 1.8vw + 0.5rem, 2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.lede {
  margin-top: 1rem;
  color: var(--ink-3);
}

/* ── 01 · The principal ──────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about-body p {
  max-width: 58ch;
  font-size: 1.06rem;
  line-height: 1.8;
}

.about-body p + p { margin-top: 1.25em; }

.about-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem 2.2rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 500;
}

.card-title::after {
  content: "";
  display: block;
  width: 2.2rem;
  height: 2px;
  margin-top: 0.85rem;
  background: var(--copper);
}

.card-list {
  list-style: none;
  padding: 0;
  margin-top: 1.1rem;
}

.card-list li {
  padding-block: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-list li + li { border-top: 1px solid var(--line); }

/* ── 02 · Areas of practice ──────────────────────────────────── */

.practice-row {
  display: grid;
  grid-template-columns: 4rem 1fr 1.35fr;
  gap: 2rem;
  align-items: baseline;
  padding-block: 1.7rem;
  border-top: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}

.practice-row:last-child { border-bottom: 1px solid var(--line); }

.practice-row:hover { background: var(--copper-soft); }

.p-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--copper-deep);
}

.p-title {
  font-size: 1.45rem;
  font-weight: 470;
  line-height: 1.2;
}

.p-desc {
  font-size: 0.98rem;
  line-height: 1.65;
}

/* ── 03 · Ways of working ────────────────────────────────────── */

.eng-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.eng-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.1rem;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

.eng-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 89, 43, 0.4);
  box-shadow: 0 18px 40px -24px rgba(28, 36, 32, 0.28);
}

.eng-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 1.1rem;
}

.eng-title {
  font-size: 1.35rem;
  font-weight: 480;
  line-height: 1.25;
  margin-bottom: 0.7rem;
}

.eng-card > p:last-child {
  font-size: 0.95rem;
  line-height: 1.65;
}

.eng-terms {
  margin-top: 1.4rem;
  padding: 2rem 2.2rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.eng-terms-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}

.eng-terms-lede {
  margin-top: 0.5rem;
  max-width: 60ch;
  font-size: 0.98rem;
  color: var(--ink-3);
}

.eng-terms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.eng-terms-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 0.5rem;
}

.eng-terms-grid p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* ── 04 · Selected work ──────────────────────────────────────── */

.work-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding-block: 1.9rem;
  border-top: 1px solid var(--line);
}

.work-row:last-child { border-bottom: 1px solid var(--line); }

.work-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.4rem;
}

.work-title {
  font-size: 1.5rem;
  font-weight: 470;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}

.work-desc {
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 62ch;
}

/* ── 05 · Contact (dark finale) ──────────────────────────────── */

.dark {
  background: var(--dark);
  color: var(--paper-on-dark-70);
  -webkit-font-smoothing: antialiased;
}

.dark .section-eyebrow { color: var(--copper-light); }

.dark :focus-visible { outline-color: var(--copper-light); }

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: start;
}

.contact-title {
  color: var(--paper-on-dark);
}

.contact-lede {
  max-width: 44ch;
  margin-top: 1.2rem;
  margin-bottom: 2.4rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--line-on-dark);
}

.contact-row:last-child { border-bottom: 1px solid var(--line-on-dark); }

.contact-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-on-dark-55);
}

.contact-value {
  color: var(--paper-on-dark);
  font-size: 1.02rem;
}

a.contact-value {
  text-decoration: underline;
  text-decoration-color: rgba(206, 131, 82, 0.5);
  text-underline-offset: 4px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}

a.contact-value:hover {
  color: var(--copper-light);
  text-decoration-color: var(--copper-light);
}

/* Footer */

.site-footer {
  margin-top: clamp(4rem, 9vw, 6.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line-on-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: 13px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper-on-dark);
  font-family: var(--serif);
  font-size: 1rem;
}

.foot-brand .brand-mark { width: 30px; }

.foot-legal { color: rgba(243, 239, 231, 0.5); }

.to-top {
  color: var(--paper-on-dark-70);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}

.to-top:hover {
  color: var(--copper-light);
  text-decoration-color: var(--copper-light);
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 70ms);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .eng-grid,
  .eng-terms-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .practice-row {
    grid-template-columns: 3rem 1fr;
    gap: 0.5rem 1.5rem;
  }
  .p-desc { grid-column: 2; }

  .work-row {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

@media (max-width: 760px) {
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem 2rem;
  }
  .stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 740px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .header-inner { height: 64px; }
  .hero { padding-top: 7.5rem; }
  .hero-art { opacity: 0.55; }
}
