:root {
  --brand-brass: #955d2c;
  --brand-gold: #b59f4a;
  --brand-forest: #026f23;
  --brand-ink: #161616;
  --brand-copy: #2c2c2c;
  --brand-muted: #5f6779;
  --brand-text: #7e4d1f;
  --brand-paper: #f7f5f5;
  --brand-cloud: #dfdcd5;
  --brand-line: rgba(0, 0, 0, 0.12);
  --brand-glow: rgba(181, 159, 74, 0.2);
  --font-sans: "Manrope", sans-serif;
  --font-serif: "Instrument Serif", serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius-sm: 10px;
  --radius-lg: 30px;
  --shadow-card: 0 24px 80px rgba(61, 51, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--brand-copy);
  background:
    radial-gradient(circle at top left, rgba(181, 159, 74, 0.25), transparent 28%),
    radial-gradient(circle at right 10%, rgba(162, 102, 50, 0.18), transparent 24%),
    linear-gradient(180deg, #f1eee8 0%, #f7f5f5 52%, #ece7df 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 80%);
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero,
.thesis-grid,
.portfolio {
  position: relative;
  z-index: 1;
  scroll-snap-align: start;
}

.hero {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
}

.hero-intro {
  min-height: 100vh;
}

/* Only hero-panel gets the card treatment — cards signal interactivity */
.hero-panel {
  position: relative; /* required: makes ::after glow position relative to the card, not the section */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - 48px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  background: rgba(247, 245, 245, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 45%;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
}

.section-label,
.company-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-mark {
  position: relative;
  z-index: 1;
  max-width: 7ch;
  margin: 0 0 28px;
  font-family: var(--font-serif);
  font-size: clamp(4.25rem, 15vw, 10rem);
  line-height: 0.84;
  letter-spacing: -0.06em;
  color: var(--brand-ink);
  font-weight: 400;
}

/* Statement headline — large serif, sits below the brand mark */
.hero-statement {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 11vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.kicker {
  margin: 0 0 16px;
  color: var(--brand-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.kicker {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--brand-ink);
  font-weight: 400;
}

.intro {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin: 24px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--brand-muted);
}

.scroll-hint {
  position: relative;
  z-index: 1;
  margin: 32px 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-muted);
  opacity: 0.5;
}

.thesis-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 22px;
}

/* thesis-card and signal-card: plain sections, no card treatment */
.thesis-card,
.signal-card {
  padding: 28px;
  border-radius: 28px;
}

.thesis-card h2 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.thesis-card p:last-child {
  max-width: 34rem;
  margin: 18px 0 0;
  line-height: 1.7;
  color: var(--brand-muted);
}

.signal-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.signal-list li {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.98rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}

/* portfolio: plain section, no card treatment */
.portfolio {
  padding: 0;
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 64rem;
  margin-bottom: 18px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* company-card: interactive card — gets the full card treatment */
.company-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.company-card:hover {
  transform: translateY(-4px);
  border-color: rgba(162, 102, 50, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(223, 220, 213, 0.8));
}

.company-card:focus-visible,
.footer-link:focus-visible {
  outline: 2px solid var(--brand-brass);
  outline-offset: 3px;
}

/* :visited child selectors are blocked by browsers (privacy model) — style the link itself */
.company-card:visited {
  opacity: 0.72;
}

.company-card h3 {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.company-index {
  color: var(--brand-brass);
}

/* company-detail: always visible, pushed to bottom of card via auto margin */
.company-detail {
  margin: auto 0 0;
  max-width: 100%;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(44, 44, 44, 0.68);
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy,
.footer-link {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-copy);
}

.footer-link {
  text-decoration: none;
}

.footer-link:hover {
  color: var(--brand-brass);
}

.footer-symbol {
  font-size: 0.9em;
}

/* Tablet: 2-column company grid between 641px and 900px */
@media (max-width: 900px) and (min-width: 641px) {
  .company-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero-statement {
    max-width: 12ch;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 12px;
    padding-bottom: 24px;
  }

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

  .hero-intro .hero-panel {
    min-height: calc(100vh - 24px);
  }

  .site-footer {
    width: min(100% - 20px, 1120px);
    padding-bottom: 24px;
  }

  .hero-panel,
  .thesis-card,
  .signal-card {
    padding: 22px;
    border-radius: 24px;
  }

  /* Tighten glow blob position on mobile */
  .hero-panel::after {
    inset: auto -5% -25% 35%;
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }

  .company-card {
    transition: none;
  }
}
