:root {
  --paper: #f3efe6;
  --paper-strong: #fbf8f1;
  --paper-muted: #e8e2d5;
  --ink: #1b2624;
  --ink-soft: #5a6660;
  --line: #d5cec0;
  --line-strong: #afa797;
  --forest: #21483f;
  --forest-hover: #173a33;
  --clay: #bd5638;
  --clay-soft: #e9c7b8;
  --sage: #d7dfd6;
  --gold: #b89043;
  --shadow: 0 18px 48px rgba(41, 49, 43, 0.11);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--clay) 48%, transparent);
  outline-offset: 3px;
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1.5px solid currentColor;
  border-radius: 50% 50% 46% 46%;
}

.brand-mark::before {
  content: "";
  width: 10px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateY(-1px);
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--clay);
  border-radius: 50%;
  bottom: 6px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
}

.btn {
  border: 0;
  border-radius: 3px;
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 690;
  font-size: 14px;
  letter-spacing: 0;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fffaf1;
  background: var(--forest);
  box-shadow: 0 8px 18px rgba(23, 58, 51, 0.17);
}

.btn-primary:hover {
  background: var(--forest-hover);
}

.btn-secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.text-link {
  color: var(--ink-soft);
  border: 0;
  background: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.text-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.landing {
  min-height: 100vh;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(
    rgba(27, 38, 36, 0.28) 0.55px,
    transparent 0.55px
  );
  background-size: 6px 6px;
  mask-image: linear-gradient(to right, #000, transparent 68%);
}

.terrain-backdrop {
  position: absolute;
  z-index: 0;
  inset: 82px 0 0;
  width: 100%;
  height: calc(100% - 82px);
  min-height: 720px;
  pointer-events: none;
  opacity: 0.22;
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 9%,
    #000 91%,
    transparent 100%
  );
}

.terrain-backdrop img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.04);
  transform-origin: center;
  filter: drop-shadow(0 3px 2px color-mix(in srgb, var(--ink) 9%, transparent));
}

.landing-header {
  height: 82px;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 68%, transparent);
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 760;
}

.language-switcher a {
  color: inherit;
  padding: 8px 2px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.language-switcher a:hover {
  color: var(--ink);
}

.language-switcher a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--clay);
}

.language-divider {
  color: var(--line-strong);
  font-weight: 400;
}

.landing-main {
  min-height: calc(100vh - 82px);
  max-width: 1380px;
  margin: 0 auto;
  padding: 76px 54px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.09em;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: currentColor;
}

.landing-copy h1 {
  max-width: 760px;
  margin: 25px 0 28px;
  font: 400 clamp(48px, 5.4vw, 78px) / 0.98 var(--serif);
  letter-spacing: 0;
}

.landing-copy h1 em {
  color: var(--clay);
  font-weight: 400;
  font-style: italic;
}

.landing-copy > p {
  max-width: 625px;
  margin: 0;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.65;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.landing-cta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 38px;
  flex-wrap: wrap;
}

.landing-cta .btn {
  min-height: 54px;
  padding-inline: 24px;
  font-size: 15px;
}

.free-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.free-note .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.principle {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  max-width: 620px;
}

.principle strong {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.principle p {
  margin: 0;
  font: italic 17px/1.48 var(--serif);
}

.research-stack {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
}

.folio {
  width: min(100%, 520px);
  min-height: 545px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 42px 42px 34px;
  position: relative;
  transform: rotate(0.7deg);
}

.folio::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  pointer-events: none;
}

.folio-tab {
  position: absolute;
  right: -26px;
  top: 68px;
  width: 27px;
  height: 112px;
  background: var(--clay);
  border-radius: 0 3px 3px 0;
  writing-mode: vertical-rl;
  color: #fff8ed;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.folio-number {
  font: italic 13px var(--serif);
  color: var(--ink-soft);
}

.folio h2 {
  margin: 34px 0 10px;
  font: 400 30px/1.13 var(--serif);
  letter-spacing: 0;
}

.folio-subtitle {
  margin: 0 0 30px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.source-item {
  display: grid;
  grid-template-columns: 29px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.source-index {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: italic 12px var(--serif);
}

.source-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin: 1px 0 5px;
}

.source-item span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.source-pending {
  color: var(--clay);
  font-size: 10px;
  margin-top: 7px;
}

.check {
  color: var(--forest);
  margin-top: 4px;
}

.folio-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
}

.folio-footer span {
  color: var(--ink-soft);
  font: italic 12px var(--serif);
}

.mini-progress {
  width: 120px;
  height: 4px;
  background: var(--paper-muted);
}

.mini-progress i {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--clay);
}

.margin-note {
  position: absolute;
  left: calc(50% - 410px);
  bottom: 125px;
  width: 170px;
  padding: 15px 17px;
  background: var(--sage);
  border: 1px solid var(--line-strong);
  transform: rotate(-3deg);
  box-shadow: 0 8px 25px rgba(32, 47, 41, 0.1);
  font: italic 12px/1.45 var(--serif);
}

.margin-note b {
  display: block;
  color: var(--forest);
  font: 750 9px var(--sans);
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--ink) 44%, transparent);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(460px, 100%);
  position: relative;
  padding: 30px 32px 28px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-kicker {
  color: var(--clay);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-card h2 {
  margin: 14px 0 10px;
  font: 400 28px/1.15 var(--serif);
}

.modal-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.modal-card a {
  color: var(--forest);
  font-weight: 700;
}

@media (max-width: 1000px) {
  .landing-main {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 60px;
  }

  .landing-copy h1 {
    max-width: 850px;
  }

  .terrain-backdrop {
    inset: 82px 0 0;
    width: 100%;
    height: calc(100% - 82px);
    opacity: 0.18;
  }

  .research-stack {
    min-height: 570px;
  }

  .folio {
    width: min(92%, 580px);
  }
}

@media (max-width: 720px) {
  .landing-header {
    padding: 0 22px;
    height: 70px;
  }

  .landing-header .btn-secondary {
    display: none;
  }

  /* Let the hero grow with its content instead of being force-centered in a
     full-height track (which pushed content around and left odd gaps). */
  .landing-main {
    padding: 46px 22px 92px;
    min-height: auto;
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .landing-copy,
  .research-stack {
    min-width: 0;
  }

  .landing-copy h1 {
    font-size: clamp(36px, 10vw, 52px);
    margin: 20px 0 22px;
  }

  .terrain-backdrop {
    inset: 70px 0 0;
    width: 100%;
    height: calc(100% - 70px);
    opacity: 0.16;
  }

  .terrain-backdrop img {
    width: 150%;
    margin-left: -25%;
    transform: scale(1.08);
  }

  .landing-header-actions {
    gap: 16px;
  }

  .landing-header .text-link {
    display: none;
  }

  .principle {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .research-stack {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }

  .folio {
    width: calc(100% - 26px);
    padding: 34px 28px 28px;
    min-height: 0;
  }

  .source-item > div {
    min-width: 0;
  }

  .folio-tab {
    right: -13px;
  }

  .margin-note {
    position: static;
    align-self: flex-start;
    margin-left: 10px;
  }
}

/* Phones — tighten type scale and rhythm so the hero reads well on ~375px. */
@media (max-width: 480px) {
  .landing-header {
    padding: 0 18px;
    height: 64px;
  }

  .brand-name {
    font-size: 22px;
  }

  .landing-main {
    padding: 30px 18px 64px;
    gap: 34px;
  }

  .eyebrow {
    font-size: 11px;
    gap: 10px;
  }

  .eyebrow::before {
    width: 22px;
  }

  .landing-copy h1 {
    font-size: clamp(30px, 8.6vw, 38px);
    line-height: 1.04;
    margin: 16px 0 18px;
  }

  .landing-copy > p {
    font-size: 16px;
    line-height: 1.6;
  }

  .landing-cta {
    margin-top: 26px;
    gap: 14px;
  }

  .landing-cta .btn {
    width: 100%;
    min-height: 52px;
  }

  .free-note {
    font-size: 12px;
  }

  .principle {
    margin-top: 32px;
    padding-top: 18px;
  }

  .principle p {
    font-size: 16px;
  }

  .terrain-backdrop {
    inset: 64px 0 0;
    height: calc(100% - 64px);
    opacity: 0.13;
  }

  /* Drop the paper tilt on the narrowest screens so nothing kisses the edge. */
  .folio {
    width: 100%;
    padding: 28px 22px 24px;
    transform: rotate(0deg);
  }

  .folio-tab {
    top: 54px;
    height: 96px;
    right: -12px;
  }

  .folio h2 {
    font-size: 25px;
    margin: 24px 0 8px;
  }

  .folio-subtitle {
    margin-bottom: 20px;
  }

  .source-item strong {
    font-size: 13px;
  }

  .source-item span {
    font-size: 11px;
  }

  .margin-note {
    margin-left: 0;
    align-self: stretch;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
