:root {
  --cream: #f8e9ca;
  --cream-dark: #f0dcab;
  --green: #2f4c1f;
  --green-soft: #445e46;
  --brown: #3c2c28;
  --ink: #1c1a17;
  --white: #ffffff;
  --max-width: min(1400px, 92vw);
  --radius: 14px;
}

/* ---------- Scroll reveal (fade + scale-in) ---------- */

.reveal {
  opacity: 0;
  transform: scale(0.94) translateY(14px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-stagger-1.is-visible { transition-delay: 0s; }
.reveal-stagger-2.is-visible { transition-delay: 0.12s; }
.reveal-stagger-3.is-visible { transition-delay: 0.24s; }
.reveal-stagger-4.is-visible { transition-delay: 0.36s; }

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--green);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 4px solid var(--green);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--ink);
}

.brand img {
  height: 34px;
  width: auto;
}

.brand img.brand-wordmark {
  height: 12.75px;
}

nav.primary-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

nav.primary-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
}

nav.primary-nav a:hover {
  color: var(--green);
}

/* ---------- Full-screen sections ---------- */

.screen {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: 100px 0;
  position: relative;
  box-sizing: border-box;
  scroll-margin-top: 66px;
}

.screen .container {
  width: 100%;
}

section.alt {
  background: var(--cream-dark);
  border-top: 1px solid rgba(47, 76, 31, 0.15);
  border-bottom: 1px solid rgba(47, 76, 31, 0.15);
}

/* ---------- Full-bleed dark section variants ---------- */

.section-dark-green {
  background: var(--green);
  color: var(--cream);
}

.section-dark-brown {
  background: var(--brown);
  color: var(--cream);
}

.section-dark-green .eyebrow,
.section-dark-brown .eyebrow {
  color: var(--cream);
  opacity: 0.75;
}

.section-dark-green h2,
.section-dark-brown h2 {
  color: var(--white);
}

.section-dark-green .bullets li,
.section-dark-brown .bullets li {
  color: var(--cream);
}

.section-dark-green .bullets li::before,
.section-dark-brown .bullets li::before {
  background: var(--cream);
}

.section-dark-green .caption,
.section-dark-brown .caption {
  color: var(--cream);
}

.section-dark-green .split-media img,
.section-dark-brown .split-media img {
  padding: 14px;
  background: linear-gradient(135deg, #fff8e6 0%, var(--cream) 45%, #e2cd98 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.section-dark-brown .team-card .role {
  color: var(--cream);
  opacity: 0.85;
}

.section-dark-brown .team-card h3 {
  color: var(--white);
}

.section-dark-green .app-tile h3,
.section-dark-brown .app-tile h3 {
  color: var(--white);
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  flex-direction: column;
  justify-content: center;
  padding-top: 45px;
  padding-bottom: 155px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.hero-text,
.hero-media {
  min-width: 0;
}

.hero-headline {
  font-size: clamp(3.12rem, 6vw, 5.04rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.hero-headline em {
  font-style: italic;
  color: var(--green-soft);
}

.hero p.lede {
  max-width: 520px;
  margin: 0;
  font-size: 1.495rem;
  color: var(--ink);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-media img.hero-logo {
  height: auto;
  width: 100%;
  max-width: 494px;
  margin: 0;
}

.section-divider {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 110px;
  display: block;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 27.5px;
  transform: translateX(-50%);
  width: 39px;
  height: 59.8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 10.4px;
  z-index: 2;
}

.scroll-cue span {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--ink);
  animation: scroll-cue-move 1.8s infinite;
}

.scroll-cue-light {
  border-color: var(--cream);
}

.scroll-cue-light span {
  background: var(--cream);
}

@keyframes scroll-cue-move {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(14px); opacity: 0; }
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--green);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--green);
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--cream);
  color: var(--green);
}

/* ---------- Section headings (grid / centered sections) ---------- */

.section-head {
  max-width: 700px;
  margin: 0 auto 32px;
  text-align: center;
}

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

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0;
}

/* ---------- Split (image + text) sections ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  transform: translateY(-38.58px);
}

.split-media {
  order: 1;
}

.split-text {
  order: 2;
}

.split-reverse .split-media {
  order: 2;
}

.split-reverse .split-text {
  order: 1;
}

.split-media img {
  border-radius: var(--radius);
  width: 100%;
}

.split-media .caption {
  margin: 12px 0 0;
  font-size: 1.08rem;
  font-style: italic;
  text-align: center;
}

.split-text h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin: 0 0 20px;
  line-height: 1.25;
}

/* ---------- Solution (full-width stack) ---------- */

.solution-section {
  background: var(--brown);
}

.solution-stack {
  text-align: center;
  width: 100%;
  transform: translateY(-55.45px);
}

.solution-stack .eyebrow {
  text-align: center;
}

.solution-title {
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  line-height: 1.3;
  margin: 0 0 44px;
}

.solution-columns {
  display: grid;
  grid-template-columns: 1.353fr 1fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}

.solution-columns .bullets {
  margin: 0;
}

.solution-media {
  padding: 16.8px;
  background: linear-gradient(135deg, #ebe4d4 0%, #e4d6ba 45%, #d0bd8c 100%);
  border-radius: var(--radius);
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.55),
    0 32px 56px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.solution-media img {
  border-radius: calc(var(--radius) - 6px);
  width: 100%;
  display: block;
  background: #fff8e6;
  padding: 14px 14px 10.5px;
  box-sizing: border-box;
}

.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bullets li {
  position: relative;
  padding-left: 26px;
  font-size: 1.47rem;
  color: var(--ink);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Applications ---------- */

#applications {
  align-items: flex-start;
  min-height: calc(100vh - 66px);
  height: auto;
  padding: 25px 0 50.33px;
  box-sizing: border-box;
}

.app-arc-v2 {
  --app-offset: clamp(80px, 12.5vw, 160px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "q1   text q2"
    "q3   .    q4";
  column-gap: 32px;
  row-gap: 40px;
  align-items: start;
  justify-items: center;
  width: 100%;
}

.app-arc-text {
  grid-area: text;
  text-align: center;
  align-self: center;
  padding: 0 12px;
}

.app-arc-text h2 {
  font-size: 36px;
}

.app-tile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-tile-q1 { grid-area: q1; }
.app-tile-q2 { grid-area: q2; }
.app-tile-q3 { grid-area: q3; transform: translateX(var(--app-offset)); }
.app-tile-q4 { grid-area: q4; transform: translateX(calc(-1 * var(--app-offset))); }

.app-tile.reveal.is-visible {
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.app-tile-q3.reveal.is-visible { transform: translateX(var(--app-offset)); }
.app-tile-q4.reveal.is-visible { transform: translateX(calc(-1 * var(--app-offset))); }

.app-tile-q1:hover, .app-tile-q2:hover { transform: scale(1.05); }
.app-tile-q3:hover { transform: translateX(var(--app-offset)) scale(1.05); }
.app-tile-q4:hover { transform: translateX(calc(-1 * var(--app-offset))) scale(1.05); }

.app-tile:hover {
  transition: transform 0.25s ease;
}

.app-photo {
  border-radius: var(--radius);
  width: clamp(220px, 30vw, 398.39px);
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ebe4d4 0%, #e4d6ba 45%, #d0bd8c 100%);
  border: 3px solid var(--ink);
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.55),
    0 32px 56px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 16.8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-width: 100%;
}

.app-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-tile h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
  flex-shrink: 0;
}

/* ---------- Team ---------- */

#team {
  align-items: flex-start;
  padding: 12.5px 0 50px;
}

.team-grid-3plus {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "p1   p2   p3"
    "p4   pubs pubs";
  gap: 41px 40px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.team-p1 { grid-area: p1; }
.team-p2 { grid-area: p2; }
.team-p3 { grid-area: p3; }
.team-p4 { grid-area: p4; transform: translateY(-20.5px); }

.publications-panel {
  grid-area: pubs;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(248, 233, 202, 0.2);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.pub-heading {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--white);
  text-align: center;
}

.pub-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pub-title {
  margin: 0 0 4px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
}

.pub-citation {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--cream);
}

.pub-patent {
  margin: 0;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--cream);
  opacity: 0.8;
}

.team-card {
  text-align: center;
}

.team-card .avatar {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: var(--green-soft);
}

.team-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.team-card .role {
  color: var(--green);
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.team-bullets {
  text-align: left;
  max-width: 260px;
  margin: 0 auto;
}

.team-bullets li {
  font-size: 0.85rem;
  color: var(--cream);
}

/* ---------- Contact ---------- */

#contact {
  height: calc(100vh - 66px);
  box-sizing: border-box;
  align-items: flex-start;
  padding: 50.08px 0 50px;
}

#contact .section-divider {
  height: 85.94px;
}

.contact-section {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
  color: var(--ink);
  text-align: center;
  justify-content: center;
}

.contact-section .eyebrow {
  color: var(--green);
  font-size: 1.8rem;
}

.contact-section .btn {
  font-size: 1.8rem;
}

.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  margin: 16px 0 32px;
  flex-wrap: wrap;
}

.partner-logos img {
  height: 40px;
  width: auto;
}

.contact-divider {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 40px;
  border: none;
  border-top: 1px solid rgba(47, 76, 31, 0.25);
}

.contact h2 {
  font-size: clamp(3.6rem, 8.1vw, 5.4rem);
  margin: 0 0 18px;
  font-weight: 800;
}

.contact p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--ink);
  opacity: 0.85;
  font-size: 1.944rem;
}

/* ---------- Footer ---------- */

.contact-copyright {
  position: absolute;
  left: 50%;
  bottom: 40.55px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  white-space: nowrap;
  z-index: 2;
}

/* ---------- Responsive ---------- */

@media (max-width: 1032px) {
  .team-grid-3plus {
    grid-template-columns: 1fr;
    grid-template-areas:
      "p1"
      "p2"
      "p3"
      "p4"
      "pubs";
    gap: 40px;
  }
  .pub-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-split {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-media {
    order: -1;
  }
  .hero p.lede {
    margin: 0 auto;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 32px;
    transform: translateY(-68.38px);
  }
  .split-media,
  .split-text,
  .split-reverse .split-media,
  .split-reverse .split-text {
    order: initial;
  }
  #applications {
    padding-top: 12.5px;
  }
  .app-arc-v2 {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "q1"
      "q2"
      "q3"
      "q4";
    row-gap: 32px;
  }
  .app-photo {
    height: auto;
    width: 100%;
  }
  .app-tile-q1 {
    margin-top: -8px;
  }
  .app-tile-q1,
  .app-tile-q2,
  .app-tile-q3,
  .app-tile-q4,
  .app-tile-q1.reveal.is-visible,
  .app-tile-q2.reveal.is-visible,
  .app-tile-q3.reveal.is-visible,
  .app-tile-q4.reveal.is-visible {
    transform: none;
  }
  .app-tile:hover,
  .app-tile-q1:hover,
  .app-tile-q2:hover,
  .app-tile-q3:hover,
  .app-tile-q4:hover {
    transform: none;
  }
  .solution-stack {
    transform: translateY(-64.36px);
  }
  .solution-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .team-card .avatar {
    width: 195px;
    height: 195px;
  }

  /* Fixed viewport-matched heights only work at desktop widths where
     content is tuned to fit. Once grids stack to a single column,
     content needs to grow freely instead of overflowing past the
     fixed box and being visually covered by the bottom notch. */
  #applications,
  #contact {
    height: auto;
  }
  #applications,
  #team,
  #contact {
    padding-bottom: 130px;
  }
  .contact-copyright {
    bottom: 71px;
    font-size: 0.7rem;
    white-space: normal;
    max-width: 100px;
    text-align: center;
    line-height: 1.3;
  }
}

@media (max-width: 700px) {
  .screen {
    padding: 64px 0;
  }
  .solution-stack {
    transform: translateY(-32px);
  }
  .split {
    transform: translateY(-44.07px);
  }
  .hero {
    min-height: auto;
    padding-top: 70px;
    padding-bottom: 130px;
  }
  .hero-headline {
    font-size: clamp(2.2rem, 9vw, 2.8rem);
  }
  .site-header .container {
    justify-content: center;
    text-align: center;
  }
  nav.primary-nav {
    justify-content: center;
    gap: 14px 18px;
    width: 100%;
  }
  nav.primary-nav a {
    font-size: 0.85rem;
  }
  .section-divider {
    height: 60px;
  }
  .scroll-cue {
    bottom: 15px;
    width: 26.13px;
    height: 50.83px;
  }
}
