:root {
  --ink: #18211f;
  --muted: #65716c;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --line: #d8ded7;
  --green: #1f6f54;
  --blue: #2d5d7b;
  --gold: #b9822b;
  --red: #9b4d3d;
  --shadow: 0 22px 70px rgba(22, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 78px;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(24, 33, 31, 0.12);
  background: rgba(247, 245, 239, 0.94);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

.tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  overflow-x: auto;
}

.tab {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover,
.tab.is-active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.cta-tab {
  color: #fff;
  background: var(--green);
}

.cta-tab:hover,
.cta-tab.is-active {
  color: #fff;
  border-color: var(--green);
  background: #195b45;
}

.logo-ticker {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  overflow: hidden;
  border-top: 1px solid rgba(24, 33, 31, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -14px 40px rgba(22, 32, 30, 0.09);
  backdrop-filter: blur(14px);
}

.logo-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 10px 14px;
  animation: logo-scroll 46s linear infinite;
}

.ticker-logo {
  display: grid;
  width: 184px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ticker-logo img {
  display: block;
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 70px;
}

.panel {
  display: none;
  min-height: calc(100vh - 136px);
}

.panel.is-active {
  display: block;
  animation: rise 260ms ease both;
}

.hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.hero.is-active {
  display: grid;
}

.hero-copy {
  padding: clamp(16px, 3vw, 30px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: none;
  font-size: clamp(2.35rem, 5vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  max-width: 1100px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.hero-copy > p:not(.eyebrow),
.section-heading > p:not(.eyebrow) {
  max-width: none;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-copy > p:not(.eyebrow),
.team-card p {
  text-align: justify;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 8px;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  background: var(--green);
}

.secondary-action {
  color: var(--green);
  background: transparent;
}

.hero-visual {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: min(58vh, 560px);
  object-fit: cover;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.metric-row span {
  min-height: 88px;
  padding: 18px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.35;
}

.metric-row span:last-child {
  border-right: 0;
}

.metric-row strong {
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
}

.section-heading {
  padding: clamp(24px, 5vw, 70px) 0 28px;
}

.section-heading h2 {
  max-width: none;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.08;
}

.service-grid,
.client-grid,
.partner-card-grid,
.project-grid,
.publication-list,
.team-grid {
  display: grid;
  gap: 16px;
}

.service-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-grid article,
.client,
.partner-card,
.publication-card,
.team-card,
.timeline article,
.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.service-grid article {
  min-height: 220px;
  padding: 22px;
}

.icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 1.5rem;
}

.service-grid p,
.client p,
.publication-card p,
.team-card p,
.timeline p,
.project-card p,
.project-card li {
  color: var(--muted);
  line-height: 1.6;
}

.client-grid {
  grid-template-columns: repeat(3, 1fr);
}

.partner-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.partner-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 124px;
  padding: 18px;
}

.partner-card img {
  display: block;
  width: 100%;
  max-height: 76px;
  object-fit: contain;
}

.person-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: #e7f0ec;
  position: relative;
}

.person-icon::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  transform: translateY(-11px);
}

.person-icon::after {
  content: "";
  position: absolute;
  bottom: 16px;
  width: 52px;
  height: 28px;
  border-radius: 28px 28px 12px 12px;
  background: var(--green);
}

.partner-card strong {
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.35;
}

.client {
  padding: 22px;
}

.client strong,
.client span {
  display: block;
}

.client span,
.project-card span,
.publication-card span,
.team-card span {
  margin: 8px 0 14px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-grid {
  display: block;
}

.project-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  break-inside: avoid;
  page-break-inside: avoid;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(31, 111, 84, 0.45);
  box-shadow: 0 16px 46px rgba(22, 32, 30, 0.1);
  transform: translateY(-2px);
}

.project-card summary {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.project-card summary::-webkit-details-marker {
  display: none;
}

.project-card img,
.project-placeholder {
  width: 100%;
  height: 260px;
  min-height: 0;
  border-radius: 6px;
  object-fit: contain;
  object-position: center;
}

.project-placeholder {
  display: grid;
  align-content: center;
  justify-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(155, 77, 61, 0.92), rgba(45, 93, 123, 0.92)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.12) 12px 14px);
}

.project-placeholder strong {
  font-size: 2.2rem;
}

.project-placeholder span {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.85);
}

.project-card summary small {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  font-weight: 800;
}

.project-card[open] summary small {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.project-card[open] {
  position: relative;
  min-height: 558px;
  padding-left: 334px;
}

.project-details {
  padding: 0 24px 24px;
}

.project-details-split {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  padding: 0 24px 24px 14px;
}

.project-card[open] summary {
  display: block;
  padding: 14px 24px 0 0;
}

.project-card[open] summary > img,
.project-card[open] summary > .project-placeholder {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 300px;
  height: 260px;
}

.project-card[open] .project-details-split {
  display: block;
  padding: 18px 24px 24px 0;
}

.project-card[open] .project-extra-media,
.project-card[open] .project-extra-panel {
  position: absolute;
  top: 288px;
  left: 14px;
  width: 300px;
}

.project-extra-media {
  align-self: start;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.project-extra-media img {
  display: block;
  width: 100%;
  height: 260px;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

.project-extra-panel {
  display: grid;
  height: 260px;
  align-content: center;
  justify-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(31, 111, 84, 0.96), rgba(45, 93, 123, 0.92)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.12) 12px 14px);
}

.project-extra-panel strong {
  font-size: 2.1rem;
}

.project-extra-panel span {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.project-details h4 {
  margin: 18px 0 8px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.project-card[open] .project-details h4:first-child {
  margin-top: 0;
}

.project-card ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 20px;
  padding: 24px;
}

.timeline time {
  color: var(--green);
  font-weight: 800;
}

.timeline h3 {
  margin-bottom: 0;
}

.timeline p {
  grid-column: 1 / -1;
  margin: 8px 0 0;
}

.publication-list {
  grid-template-columns: repeat(2, 1fr);
}

.publication-card {
  display: block;
  padding: 26px;
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.publication-card:hover {
  border-color: rgba(45, 93, 123, 0.48);
  box-shadow: 0 16px 46px rgba(22, 32, 30, 0.1);
  transform: translateY(-2px);
}

.publication-card strong {
  display: block;
  margin-top: 18px;
  color: var(--blue);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.publication-card em {
  display: block;
  margin-top: 12px;
  color: var(--green);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 800;
}

.publication-card-muted {
  border-left: 6px solid var(--gold);
}

.publication-card-muted strong {
  color: var(--green);
}

.team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  min-height: 320px;
  padding: 20px;
}

.team-photo {
  overflow: hidden;
  min-height: 260px;
  border-radius: 8px;
  background: #edf2ef;
}

.team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.team-photo-placeholder strong {
  font-size: 3rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.88fr minmax(360px, 0.72fr);
  align-items: start;
  gap: 44px;
}

.contact-form {
  margin-top: clamp(24px, 5vw, 70px);
  padding: 22px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfaf6;
}

textarea {
  resize: vertical;
}

.form-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .hero.is-active,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .client-grid,
  .partner-card-grid,
  .project-grid,
  .publication-list,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    height: 420px;
  }

}

@media (max-width: 640px) {
  main {
    width: min(100% - 22px, 1200px);
    padding-top: 14px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .brand {
    min-width: 0;
  }

  .tab {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .metric-row,
  .partner-card,
  .project-card summary,
  .project-details-split,
  .team-card,
  .timeline article {
    grid-template-columns: 1fr;
  }

  .metric-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-row span:last-child {
    border-bottom: 0;
  }

  .project-card img {
    height: 260px;
    min-height: 0;
  }

  .project-card[open] {
    position: static;
    min-height: 0;
    padding-left: 0;
  }

  .project-card[open] summary {
    display: grid;
    padding: 14px;
  }

  .project-card[open] summary > img,
  .project-card[open] summary > .project-placeholder,
  .project-card[open] .project-extra-media,
  .project-card[open] .project-extra-panel {
    position: static;
    width: 100%;
  }

  .project-placeholder {
    height: 220px;
    min-height: 0;
  }

  .project-details {
    padding: 0 18px 22px;
  }

  .project-details-split {
    padding: 0 18px 22px;
  }

  .team-photo {
    min-height: 240px;
  }

  .ticker-logo {
    width: 148px;
  }

  .contact-form {
    min-width: 0;
  }
}
