:root {
  --ink: #0F2A2B;
  --ink-light: #1E4A4C;
  --paper: #FAFBF9;
  --surface: #F0F3F1;
  --marigold: #F4B942;
  --marigold-deep: #C98F1F;
  --teal: #3D7A78;
  --slate: #2C6E8E;
  --muted-on-dark: #A6CBC7;
  --line: #DDE3E0;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", monospace;

  --max-w: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

a { color: inherit; }

/* ---------- texture ---------- */

.dot-grid {
  background-image: radial-gradient(var(--ink-light) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---------- header ---------- */

.site-header {
  position: static;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.site-header.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: none;
  padding-top: 28px;
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.header-overlay .wordmark {
  color: var(--paper);
}

.header-nav {
  display: flex;
  gap: 4px;
}

.header-nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.7;
  padding: 8px 14px;
  border-radius: 6px;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.header-overlay .header-nav a {
  color: var(--paper);
  opacity: 0.82;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  opacity: 1;
  background: rgba(15, 42, 43, 0.06);
}

.header-overlay .header-nav a:hover,
.header-overlay .header-nav a:focus-visible {
  background: rgba(250, 251, 249, 0.1);
}

.header-nav a[aria-current="page"] {
  opacity: 1;
  background: rgba(244, 185, 66, 0.14);
  color: var(--marigold-deep);
}

.header-overlay .header-nav a[aria-current="page"] {
  color: var(--marigold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 20;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-overlay .nav-toggle span {
  background: var(--paper);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background-color: var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  width: 100%;
  min-height: 680px;
}

.hero-content {
  padding: 168px 56px 100px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.hero-rail {
  border-left: 1px solid rgba(244, 185, 66, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  line-height: 1.8;
  text-align: center;
  text-transform: uppercase;
  color: var(--marigold);
}

.stamp {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted-on-dark);
  margin: 0 0 28px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 20px;
}

.hero-headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin: 0 0 24px;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted-on-dark);
  max-width: 46ch;
  margin: 0 0 36px;
}

.cta {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--marigold);
  padding: 13px 26px;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--paper);
  transform: translateY(-1px);
}

/* ---------- sections (shared) ---------- */

.section {
  padding: 72px 0;
}

.section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
  max-width: 20ch;
}

/* ---------- about (color-blocked blocks) ---------- */

.about-block {
  padding: 100px 0;
}

.about-block-tight {
  padding: 48px 0;
}

.about-block-inner {
  max-width: 720px;
}

.about-block-dark {
  background-color: var(--ink);
  color: var(--paper);
}

.about-block-marigold {
  background-color: var(--marigold);
  color: var(--ink);
}

.about-block-light {
  background-color: var(--paper);
  color: var(--ink);
}

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

.dict-word-on-dark {
  color: var(--paper);
}

.dict-word {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

.dict-def-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 16px;
  max-width: 18ch;
}

.dict-def-title-ink {
  color: var(--ink);
}

.dict-def-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted-on-dark);
  margin: 0;
}

.dict-def-body-ink {
  color: rgba(15, 42, 43, 0.78);
}

.dict-usage-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin: 0 0 20px;
}

.about-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dict-example {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.5;
  color: var(--paper);
  border-left: 3px solid var(--marigold);
  padding-left: 24px;
  margin: 0;
}

.dict-example-label {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 10px;
}

.compare-panel {
  padding: 28px 32px;
  border-radius: 12px;
}

.compare-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.compare-list li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.compare-list li:last-child {
  margin-bottom: 0;
}

.compare-old {
  background: var(--surface);
  border: 1px dashed var(--line);
}

.compare-old .compare-label {
  color: rgba(15, 42, 43, 0.4);
}

.compare-old .compare-list li {
  color: rgba(15, 42, 43, 0.45);
  text-decoration: line-through;
  text-decoration-color: rgba(15, 42, 43, 0.3);
}

.compare-new {
  background: var(--ink);
  border: 1px solid var(--teal);
}

.compare-new .compare-label {
  color: var(--marigold);
}

.compare-new .compare-list li {
  color: var(--paper);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
}

.about-cta-row {
  display: flex;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(250, 251, 249, 0.12);
}

.about-cta-link {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--marigold);
  text-decoration: none;
  padding: 10px 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.about-cta-link:hover,
.about-cta-link:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

/* ---------- teasers (home page) ---------- */

.teasers {
  background: var(--surface);
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.teaser-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.teaser-card:hover,
.teaser-card:focus-visible {
  border-color: var(--teal);
  transform: translateY(-2px);
}

.teaser-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.teaser-card p:not(.work-status) {
  color: rgba(15, 42, 43, 0.7);
  margin: 0;
}

/* ---------- work ---------- */

.work {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.work-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.work-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px;
}

.work-card-primary {
  border-color: var(--teal);
  border-width: 1.5px;
}

.work-status {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.work-card h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 4px;
}

.work-tagline {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: rgba(15, 42, 43, 0.5);
  margin: 0 0 16px;
}

.work-card p:not(.work-status):not(.work-tagline) {
  color: rgba(15, 42, 43, 0.75);
  margin: 0;
}

.work-card-secondary {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- values ---------- */

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.value {
  padding: 0 32px;
  border-left: 1px solid var(--line);
}

.value:first-child {
  padding-left: 0;
  border-left: none;
}

.value h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 10px;
}

.value p {
  color: rgba(15, 42, 43, 0.7);
  margin: 0;
}

/* ---------- contact ---------- */

.contact-page {
  background-color: var(--ink);
  color: var(--paper);
  text-align: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.contact-inner {
  padding: 80px 0;
}

.contact-panel {
  background: var(--ink-light);
  border: 1px solid rgba(250, 251, 249, 0.1);
  border-radius: 20px;
  padding: 56px 48px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  max-width: 560px;
  margin: 0 auto;
}

.contact-page .eyebrow {
  color: var(--marigold);
  text-align: center;
}

.contact-heading {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.015em;
  color: var(--paper);
  margin: 0 0 20px;
}

.contact-sub {
  color: var(--muted-on-dark);
  font-size: 1.05rem;
  max-width: 42ch;
  margin: 0 auto 40px;
}

.contact-form {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted-on-dark);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: rgba(250, 251, 249, 0.08);
  border: 1px solid rgba(250, 251, 249, 0.3);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--paper);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(250, 251, 249, 0.55);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--marigold);
}

.contact-form .cta {
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

.contact-fallback {
  margin: 28px 0 0;
  font-size: 0.9rem;
  color: var(--muted-on-dark);
}

.contact-email {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--marigold);
  text-decoration: none;
  border-bottom: 1px solid var(--marigold-deep);
  padding-bottom: 2px;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--paper);
  border-color: var(--paper);
}

/* ---------- scroll reveal ---------- */

.reveal-block.reveal-pending {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-block.reveal-pending.reveal-up {
  transform: translateY(36px);
}

.reveal-block.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

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

/* ---------- how we work: dark dynamic timeline ---------- */

.timeline-page {
  background-color: var(--ink);
  padding: 140px 0 120px;
}

.timeline-intro {
  margin-bottom: 88px;
}

.timeline-heading {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--paper);
  margin: 0 0 20px;
  max-width: 14ch;
}

.how-work-sub-dark {
  font-size: 1.1rem;
  color: var(--muted-on-dark);
  max-width: 50ch;
  margin: 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  position: relative;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 32px;
}

.timeline-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.timeline-ghost-num {
  position: absolute;
  top: 10px;
  right: -240px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14rem;
  line-height: 1;
  color: var(--ink-light);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.timeline-node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--marigold);
  box-shadow: 0 0 0 4px rgba(244, 185, 66, 0.2), 0 0 20px rgba(244, 185, 66, 0.5);
  flex-shrink: 0;
  margin-top: 6px;
}

.timeline-dot-final {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(61, 122, 120, 0.25), 0 0 20px rgba(61, 122, 120, 0.5);
}

.timeline-line {
  width: 3px;
  flex: 1;
  background: linear-gradient(to bottom, var(--marigold), rgba(244, 185, 66, 0.15));
  margin: 8px 0;
  min-height: 60px;
}

.timeline-card {
  position: relative;
  z-index: 1;
  padding-bottom: 88px;
}

.timeline-card-final {
  padding-bottom: 0;
}

.timeline-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--marigold);
  margin: 0 0 14px;
}

.timeline-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  color: var(--paper);
  margin: 0 0 16px;
  max-width: 18ch;
}

.timeline-card p:not(.timeline-label) {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted-on-dark);
  margin: 0;
  max-width: 52ch;
}

.timeline-cta-wrap {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(250, 251, 249, 0.12);
}

.about-cta-link-dark {
  color: var(--marigold);
}

.about-cta-link-dark:hover,
.about-cta-link-dark:focus-visible {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

/* ---------- what's next ---------- */

.next-page {
  background-color: var(--ink);
  flex: 1;
  display: flex;
  align-items: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.next-bg-orbs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.orb-1 {
  width: 340px;
  height: 340px;
  background: var(--marigold);
  opacity: 0.3;
  top: -90px;
  left: 8%;
  animation: float-a 16s ease-in-out infinite;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: var(--teal);
  opacity: 0.35;
  bottom: -80px;
  right: 6%;
  animation: float-b 20s ease-in-out infinite;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: var(--marigold);
  opacity: 0.18;
  top: 45%;
  right: 22%;
  animation: float-a 22s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -32px); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-28px, 26px); }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }
}

.next-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.next-panel {
  background: radial-gradient(
    ellipse 620px 480px at 30% 45%,
    rgba(15, 42, 43, 0.78) 0%,
    rgba(15, 42, 43, 0.45) 45%,
    rgba(15, 42, 43, 0) 75%
  );
  padding: 40px 44px 24px;
}

.next-heading {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  letter-spacing: -0.02em;
  color: var(--paper);
  margin: 24px 0 28px;
}

.next-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted-on-dark);
  margin: 0 0 20px;
}

.next-closer {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--marigold);
  margin: 0 0 56px;
}

.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(250, 251, 249, 0.1);
  padding: 24px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: rgba(250, 251, 249, 0.5);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .header-grid {
    grid-template-columns: 1fr;
  }
  .hero-rail {
    display: none;
  }
  .hero-content {
    padding: 76px 24px 72px;
    max-width: none;
  }
  .about-panels,
  .work-grid {
    grid-template-columns: 1fr;
  }
  .values-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .value {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .value:first-child {
    border-top: none;
    padding-top: 0;
  }
  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .timeline-ghost-num {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .site-header.header-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding-top: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(250, 251, 249, 0.1);
    z-index: 25;
  }
  main {
    padding-top: 64px;
  }
  .about-block {
    padding: 56px 0;
  }
  .timeline-page {
    padding: 56px 0 80px;
  }
  .next-page {
    padding: 56px 0;
  }
  .header-inner {
    padding: 16px 24px;
    height: 100%;
  }
  .header-nav {
    display: none;
  }
  .header-nav.nav-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    inset: 0;
    background: var(--ink);
    padding: 100px 32px 40px;
    gap: 4px;
    z-index: 15;
  }
  .header-nav.nav-open a {
    color: var(--paper);
    font-size: 1.15rem;
    width: 100%;
    padding: 16px 4px;
    border-radius: 0;
    border-bottom: 1px solid rgba(250, 251, 249, 0.1);
    opacity: 1;
    background: none;
  }
  .header-nav.nav-open a[aria-current="page"] {
    color: var(--marigold);
    background: none;
  }
  .contact-inner {
    padding: 40px 0 56px;
  }
  .wrap {
    padding: 0 24px;
  }
  .contact-panel {
    padding: 32px 24px;
    border-radius: 16px;
  }
  .contact-heading {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }
  .contact-sub {
    font-size: 1rem;
  }
  .field input,
  .field textarea {
    font-size: 16px;
  }
  .teaser-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
}
