@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --ink: #17212b;
  --paper: #f1eee5;
  --cream: #faf8f2;
  --blue: #244e72;
  --ochre: #c78a35;
  --green: #526b57;
  --steel: #68737c;
  --line: rgba(23, 33, 43, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', sans-serif;
}

.site-header {
  min-height: 78px;
  padding: 16px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: rgba(241, 238, 229, 0.96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--cream);
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.2rem;
  font-weight: 600;
}

.brand-name {
  font-weight: 700;
}

.site-header ul,
footer ul {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

.site-header a,
footer a {
  color: inherit;
  text-decoration: none;
}

.site-header nav a[aria-current='page'],
.site-header nav a:hover {
  color: var(--ochre);
}

/*
 * The content is deliberately kept in normal flow.
 * This allows the hero to grow whenever the headline or intro wraps.
 */
.hero {
  --hero-gutter: clamp(21px, 6vw, 88px);

  min-height: 650px;
  min-height: max(650px, 80vh);
  min-height: max(650px, 80svh);

  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
}

/*
 * The image is now the background layer rather than the element that
 * determines the hero's height.
 */
.hero > img {
  width: 100%;
  height: 100%;
  min-height: 0;
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(15, 29, 42, 0.92),
    rgba(15, 29, 42, 0.44) 66%,
    rgba(15, 29, 42, 0.12)
  );
}

/*
 * No absolute positioning or bottom offset.
 * Horizontal margins provide safe gutters without width-plus-left overflow.
 * Vertical padding is part of the content's measurable height.
 */
.hero-content {
  width: auto;
  max-width: 1200px;
  margin-inline: var(--hero-gutter);
  padding-block: clamp(52px, 8vh, 100px);
  padding-block: clamp(52px, 8svh, 100px);
  position: relative;
  z-index: 2;
  color: var(--cream);
}

.eyebrow {
  margin: 0 0 16px;
  color: #f0ba6e;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--ochre);
}

h1,
h2,
h3 {
  font-family: 'IBM Plex Serif', serif;
}

h1 {
  /*
   * The maximum line measure scales with the heading itself.
   * This prevents the font from growing while its container remains frozen
   * at 930px—the wide-screen wrapping failure visible in the screenshot.
   */
  max-width: 9.25em;
  margin: 0 0 24px;
  font-size: clamp(4rem, 8vw, 8rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero-intro {
  max-width: 730px;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero-link {
  width: max-content;
  max-width: 100%;
  margin-top: 20px;
  padding: 15px 22px;
  display: flex;
  background: var(--ochre);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.intro,
.sector-browser,
.language-layers,
.essay {
  width: min(1220px, calc(100% - 42px));
  margin: 110px auto;
}

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 8vw, 110px);
}

.intro h2,
.browser-heading h2,
.essay h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  line-height: 0.96;
}

.intro-copy {
  font-size: 1.06rem;
  line-height: 1.88;
}

.sector-browser {
  padding: clamp(32px, 6vw, 72px);
  background: var(--blue);
  color: var(--cream);
}

.browser-heading {
  max-width: 820px;
}

.browser-heading > p:last-child {
  max-width: 680px;
  line-height: 1.7;
}

.sector-controls {
  margin: 34px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sector-controls button {
  padding: 11px 15px;
  border: 1px solid rgba(250, 248, 242, 0.36);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.sector-controls button:hover,
.sector-controls button.is-active {
  background: var(--ochre);
  border-color: var(--ochre);
  color: var(--ink);
}

.sector-output {
  max-width: 900px;
  padding: 32px;
  background: var(--cream);
  color: var(--ink);
}

.sector-output span {
  color: var(--green);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sector-output h3 {
  margin: 16px 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  font-weight: 400;
}

.sector-output p {
  line-height: 1.75;
}

.language-layers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.language-layers article {
  min-height: 430px;
  padding: 30px;
  background: var(--cream);
}

.language-layers span {
  color: var(--ochre);
  font-size: 0.8rem;
  font-weight: 700;
}

.language-layers h2 {
  margin: 85px 0 18px;
  font-size: 2rem;
  font-weight: 400;
}

.language-layers p {
  line-height: 1.75;
}

.essay {
  max-width: 1040px;
}

.essay-columns {
  margin-top: 46px;
  columns: 2;
  column-gap: 70px;
}

.essay-columns p {
  margin-top: 0;
  break-inside: avoid;
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.08rem;
  line-height: 1.9;
}

footer {
  padding: 38px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  background: var(--ink);
  color: var(--cream);
}

@media (max-width: 900px) {
  .site-header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .language-layers {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    --hero-gutter: 20px;
  }

  .hero-content {
    padding-block: 48px 56px;
  }

  h1 {
    font-size: clamp(3.25rem, 16vw, 4rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
  }

  .hero-intro {
    font-size: 1rem;
    line-height: 1.65;
  }

  .language-layers {
    grid-template-columns: 1fr;
  }

  .essay-columns {
    columns: 1;
  }
}

/*
 * Narrow-screen vertical rhythm
 *
 * Let content determine the hero height instead of preserving the desktop
 * 650px/80vh minimum. This makes the top space intentional and symmetrical
 * rather than collecting all unused height above bottom-aligned content.
 */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-block: 64px;
  }

  .intro,
  .sector-browser,
  .language-layers,
  .essay {
    margin-block: 72px;
  }
}

@media (max-width: 600px) {
  .hero-content {
    padding-block: 48px 56px;
  }

  .intro,
  .sector-browser,
  .language-layers,
  .essay {
    margin-block: 56px;
  }
}
