@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  /* Material-inspired semantic tokens */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-variant: #fff7f2;
  --text: #111111;
  --muted: #5f5f5f;
  --line: #ebebeb;
  --accent: #f96815;
  --accent-dark: #dd5f12;
  --accent-soft: rgba(249, 104, 21, 0.1);
  --focus-ring: rgba(249, 104, 21, 0.34);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  z-index: 20;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent);
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav a {
  padding: 0.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  transition: color 140ms ease, border-color 140ms ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.7rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.lang-toggle a.active {
  color: var(--accent);
  font-weight: 600;
}

.hero {
  padding: 7.4rem 0 4.4rem;
  text-align: center;
}

.section {
  padding: 4.2rem 0;
}

.hero-grid {
  display: block;
}

.hero-intro {
  max-width: 920px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--text);
  font-weight: 500;
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  margin-right: 0.45rem;
  vertical-align: middle;
}

h1 {
  font-size: clamp(2.15rem, 6vw, 4.2rem);
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
  color: var(--accent);
}

h2,
h3 {
  font-family: "EB Garamond", Georgia, serif;
  line-height: 1.2;
  font-weight: 600;
}

h2 {
  position: relative;
  padding-left: 0.75rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 3px;
  height: 0.95em;
  background: var(--accent);
  border-radius: 999px;
}

.lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 78ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.55rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.74rem 1.18rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease,
    transform 140ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--text);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-card,
.card,
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.35rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover,
.article:hover {
  border-color: rgba(249, 104, 21, 0.42);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.cards {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
}

.services-page h1 {
  color: var(--text);
}

.services-page .lead {
  color: var(--text);
}

.services-page .card {
  border-left: 1px solid var(--line);
}

.services-page .card h2 {
  color: var(--text);
}

.services-page .muted {
  color: var(--muted);
}

.articles {
  margin-top: 1.6rem;
  display: grid;
  gap: 1rem;
}

.proof-strip {
  margin-top: 1.3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.proof-strip p {
  margin: 0;
  padding: 0.9rem 1rem;
  text-align: center;
  font-size: 0.88rem;
}

.proof-strip p:first-child {
  background: var(--surface-variant);
  color: var(--accent-dark);
  font-weight: 600;
}

.proof-strip p + p {
  border-left: 1px solid var(--line);
}

.section-accent {
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.muted {
  color: var(--muted);
}

.narrow {
  max-width: 780px;
}

.projects-page h1 {
  max-width: 850px;
  color: var(--text);
}

.projects-page > .container > .lead {
  margin-left: 0;
  max-width: 76ch;
}

.project-list {
  display: grid;
  gap: 1rem;
  margin-top: 2.4rem;
}

.project-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.35rem;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.project-card-link {
  color: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card-link:hover {
  border-color: rgba(249, 104, 21, 0.5);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.project-number {
  color: var(--accent);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
}

.project-content h2 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.project-content p {
  max-width: 82ch;
}

.project-type {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-outcome {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.case-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 600;
}

.project-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  padding: 1.8rem;
  border-radius: 12px;
  background: var(--surface-variant);
}

.project-cta h2 {
  margin-top: 0;
}

.project-cta p {
  margin-bottom: 0;
}

.case-hero {
  padding-bottom: 3rem;
  background: linear-gradient(180deg, var(--surface-variant), #fff);
}

.case-hero h1 {
  max-width: 900px;
  color: var(--text);
}

.case-hero .lead {
  margin-left: 0;
  max-width: 82ch;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent-dark);
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-facts div {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem;
}

.case-facts div + div {
  border-left: 1px solid var(--line);
}

.case-facts span,
.section-kicker {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-facts strong {
  font-size: 0.94rem;
}

.case-section h2 {
  max-width: 800px;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
}

.case-narrow {
  max-width: var(--max);
}

.case-narrow > h2,
.case-narrow > p,
.case-narrow > .decision-list {
  max-width: 820px;
}

.case-question .case-narrow > h2,
.case-question .case-narrow > p {
  max-width: none;
}

.case-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 3rem;
}

.case-list {
  padding-left: 1.2rem;
}

.case-list li + li {
  margin-top: 0.6rem;
}

.case-figure {
  margin: 0;
}

.case-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.case-figure figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.case-figure-wide {
  max-width: 980px;
  margin: 2rem auto 0;
}

.case-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.6rem;
}

.case-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.case-card h3 {
  margin-top: 0;
  font-size: 1.35rem;
}

.decision-list {
  padding: 0;
  list-style: none;
  counter-reset: decision;
}

.decision-list li {
  position: relative;
  min-height: 2.5rem;
  padding: 0.75rem 0 0.75rem 3.4rem;
  border-bottom: 1px solid var(--line);
  counter-increment: decision;
}

.decision-list li::before {
  content: "0" counter(decision);
  position: absolute;
  left: 0;
  top: 0.7rem;
  color: var(--accent);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.case-note {
  margin-top: 1.7rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
}

.constraint-diagram {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3.5rem 5rem;
  min-height: 390px;
  padding: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(var(--line), var(--line)) center / 1px 70% no-repeat,
    linear-gradient(90deg, var(--line), var(--line)) center / 70% 1px no-repeat,
    #fff;
}

.diagram-node {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid rgba(249, 104, 21, 0.28);
  border-radius: 10px;
  background: var(--surface-variant);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.diagram-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.25rem;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px rgba(249, 104, 21, 0.2);
}

.analysis-path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-path div {
  display: grid;
  gap: 0.4rem;
  padding: 1.2rem;
}

.analysis-path div + div {
  border-left: 1px solid var(--line);
}

.analysis-path span {
  color: var(--accent);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.35rem;
}

.analysis-path strong {
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2.2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  gap: 1rem;
  font-size: 0.92rem;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;
    padding: 0.85rem 0;
    gap: 0.65rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 5.8rem;
  }

  .proof-strip {
    grid-template-columns: 1fr;
  }

  .proof-strip p + p {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-facts,
  .case-cards {
    grid-template-columns: 1fr;
  }

  .case-facts div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .case-split {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .analysis-path {
    grid-template-columns: 1fr 1fr;
  }

  .analysis-path div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .analysis-path div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .constraint-diagram {
    gap: 4rem 1rem;
    min-height: 350px;
    padding: 1.2rem;
  }

  .diagram-core {
    width: 108px;
    height: 108px;
    font-size: 1.05rem;
  }

  .analysis-path {
    grid-template-columns: 1fr;
  }

  .analysis-path div + div,
  .analysis-path div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
