/* ============================================================
   SURGO FOUNDATION — editorial scroll site
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Montserrat";
  font-weight: 300; font-style: normal;
  src: url("fonts/Montserrat-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 400; font-style: normal;
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 500; font-style: normal;
  src: url("fonts/Montserrat-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 600; font-style: normal;
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 700; font-style: normal;
  src: url("fonts/Montserrat-Bold.ttf") format("truetype");
}

/* ---------- Tokens ---------- */
:root {
  --cream:       #f3edd8;/*#F2EAD3;*/
  --blue:        #3f73f3;
  --blue-alt:    #2d5fe6;
  --blue-deep:   #1A2BBE;
  --teal:        #4D8A9C;
  --coral:       #E84A33;
  --ochre:       #E5B43A;
  --gold-line:   #D4B888;
  --ink:         #3F4F5C;
  --grey:        #586064;

  --font-sans: "Montserrat", system-ui, -apple-system, sans-serif;

  --page-max:     1000px;
  --gutter:       clamp(20px, 4vw, 48px);
  --header-height: 84px;
  --max-width:    1280px;
  --width: 80%;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
}
section {
  max-width: var(--max-width);
  width: var(--width);
  margin: 0 auto;
}
/* Soft constellation background dots throughout */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--cream);
  background-size: 900px 700px;
}

.sticky-header {
  position: sticky;
  top: 100px;
  z-index: 30;
  text-shadow: 0 0px 10px rgba(254, 244, 192, 1);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px clamp(20px, 4vw, 56px);
  background: var(--cream);
  border-bottom: 1px solid var(--blue);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img { width: 150px; height: auto; padding-top: 10px; padding-bottom: 10px;  }
.logo-wordmark {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.logo-wordmark span { display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0px solid rgba(63, 79, 92, 0.2);
  border-radius: 8px;
  background: transparent;
  padding: 9px 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.site-nav a {
  line-height: 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  padding-bottom: 2px;
  padding-top: 2px;
}
.site-nav a.is-active {
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0px;
}
.site-nav a:hover { 
  border-bottom: 2px solid var(--blue);
  padding-bottom: 0px; 
}
.nav-about {
  padding: 6px 16px;
  border: 1.5px solid var(--blue-alt);
  border-radius: 999px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 22px!important;
  background: var(--blue);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
}
.btn-pill:hover { 
  background: var(--blue-alt); 
  border-bottom: 0px solid var(--blue) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  /* padding: 12px var(--gutter) 40px; */
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: 25px;
  position: relative;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 16 / 12;
}

.hero-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 1;
  transition: opacity 900ms ease;
  top: 0;
}

.hero-fallback.is-hidden {
  opacity: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 900ms ease;
  top: 0;
}

.hero-video.is-loaded {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hero-line {
  position: absolute;
  margin: 0;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 3vw, 30px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  /* text-shadow: 0 3px 16px rgba(15, 30, 140, 0.45); */
  /* max-width: 44%; */
}

.line-seeding {
  left: 35%;
  top: 8%;
}

.line-scaling {
  left: 40%;
  top: 23%;
}

.line-delivery {
  left: 34%;
  top: 55%;
}

/* ============================================================
   MISSION
   ============================================================ */
.mission {
  padding: clamp(60px, 9vw, 120px) var(--gutter) clamp(60px, 9vw, 120px);
  text-align: center;
}
.mission-inner {
  max-width: var(--max-width);
  width: 80%;
  margin: 0 auto;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
}
.mission-inner p { margin: 0 0 48px; }
.mission-inner p:last-child { margin-bottom: 0; }

.mission-lead {
  color: #365cf5;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}
.mission-lead strong { color: #365cf5; font-weight: 700; }

.mission-body {
  font-weight: 500;
}
.mission-body strong { font-weight: 700; }
.mission-body.is-odd        { color: #6caaba; }
.mission-body.is-odd strong { color: #6caaba; }
.mission-body.is-even       { color: #365cf5 }
.mission-body.is-even strong{ color: #365cf5; }

.mission-close {
  color: var(--coral);
  font-weight: 600;
  font-size: 24px;
  margin-top: 24px !important;
  line-height: 1.5;
  margin-bottom: 400px;
}

.mission-work-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: clamp(28px, 4vw, 56px) auto;
  margin-top: -25px;
}

.mission-work-divider img {
  width: clamp(44px, 5vw, 72px);
  height: auto;
}

/* ============================================================
   OUR WORK
   ============================================================ */
.work {
  overflow: hidden;
  padding: clamp(20px, 3vw, 40px) var(--gutter) clamp(40px, 6vw, 80px);
  /* margin-top: 300px;
  margin-bottom: 300px; */
}
.work-title {
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--blue-deep);
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0 0 clamp(80px, 3vw, 180px);
  margin: 0;
  letter-spacing: 0.01em;
}
.work-list {
  max-width: var(--max-width);
  width: 80%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 100px;
  margin-top: 100px;
}
.work-item {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 28px;
  align-items: anchor-center;
}
.work-item.reverse {
  grid-template-columns: 1fr 250px;
}
.work-item.reverse .work-image { order: 2; }

/* Stacked variant: image on top, text directly below (single column) */
.work-item.stacked {
  grid-template-columns: 200px 1fr;
  row-gap: 0;
}
.work-item.stacked .work-image { grid-column: 1 / 2; }
.work-item.stacked .work-image img { display: block; }
.work-item.stacked .work-text {
  grid-column: 1 / -1;
  padding-top: 0;
  padding-left: 24px;
}

.work-image {
  position: relative;
  min-height: 265px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.work-image img {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}
.work-animation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.92;
}
.work-text { padding-top: 8px; }
.work-num {
  font-weight: 700;
  font-size: 28px;
  color: var(--ochre);
  margin-right: 8px;
  display: inline-block;
}
.work-name {
  font-weight: 500;
  font-size: 26px;
  color: var(--blue);
  display: inline;
}
.work-text p {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 660px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding: clamp(20px, 3vw, 40px) var(--gutter) clamp(20px, 6vw, 20px);
  margin-bottom: 140px;
  text-align: center;
}
.about-title {
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  color: var(--blue-deep);
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0 0 clamp(20px, 3vw, 40px);
  letter-spacing: 0.01em;
}
.about-image {
  max-width: 640px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}
.about-body {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(40px, 4vw, 64px);
}
.about-section {
  max-width: 680px;
  margin: 0 auto;
}
.about-section-title {
  margin: 0;
  display: block;
  font-weight: 500;
  font-size: 26px;
  color: var(--blue);
  display: inline;
}
.about-section-title-alt {
  color: var(--coral);
}
.about-section-subtitle {
  margin: 6px 0 16px;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.35;
  color: var(--ochre);
}
.about-section p {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(80px, 10vw, 140px);
  margin-bottom: 200px;
}
.timeline-title {
  text-align: center;
  font-weight: 400;
  color: var(--coral);
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 0 0 clamp(40px, 6vw, 80px);
  letter-spacing: 0.01em;
  margin-bottom: 128px !important;
}
.timeline-grid {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 60px;
  row-gap: 18px;
}
/* Hand-drawn vertical line */
.timeline-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  bottom: -10px;
  width: 36px;
  background: url("assets/line_timeline_red.png") no-repeat center top / 35% 100%;
  transform: translateX(-25%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tl-item {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  position: relative;
  padding: 4px 0;
}
.tl-item.left {
  text-align: right;
  padding-right: 24px;
}
.tl-item.right {
  text-align: left;
  padding-left: 24px;
}
.tl-item.left::before,
.tl-item.right::before {
  content: "";
  position: absolute;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}
.tl-item.left::before { right: -3px; background: #528EA5; }
.tl-item.right::before { left: -3px; background: #528EA5;}
.tl-item.dot-red::before { background: #d33734; }
.tl-item.dot-blue::before { background: #242c9b; }
.tl-item.dot-empty::before { background: transparent; }

/* Year blocks — painterly squares */
.tl-year {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin: 14px 0;
}
.tl-year span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 65px;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  letter-spacing: 0.04em;
  background: var(--teal);
  position: relative;
  /* slight rotation to feel hand-placed */
  transform: rotate(-1.5deg);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.04);
}
.tl-year.year-2020 span {
  background: url("assets/2020_section_blue.png") no-repeat center / contain;
  width: 124px;
  height: 105px;
  transform: rotate(-1.5deg);
  box-shadow: none;
}
.tl-year.year-2010 span {
  background: url("assets/2010_section_blue.png") no-repeat center / contain;
  width: 105px;
  height: 112px;
  transform: rotate(2deg);
  box-shadow: none;
}
.tl-year.year-2000 span {
  background: url("assets/2000_section_red_yellow.png") no-repeat center / contain;
  width: 124px;
  height: 143px;
  /* center "2000" over the red (upper-right) square */
  justify-content: flex-end;
  align-items: flex-start;
  padding: 27px 20px 0 0;
  box-sizing: border-box;
  transform: rotate(-2.5deg);
  box-shadow: none;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 600px;
  max-height: 900px;
  background: var(--blue-deep);
  color: #fff;
  overflow: hidden;
}
.contact-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero_contact_bluetree.png");
  background-size: cover;
  background-position: center;
  background-color: var(--blue-deep);
}
.contact-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,22,112,0.35) 0%, rgba(10,22,112,0.15) 35%, rgba(10,22,112,0.55) 100%);
}
.contact-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: clamp(24px, 4vw, 48px) var(--gutter);
  text-align: center;
  z-index: 1;
}
.contact h2 {
  font-weight: 500;
  font-size: clamp(38px, 4.8vw, 56px);
  color: #fff;
  margin: 0 0 28px;
  letter-spacing: 0.01em;
}
.contact-email {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 600;
  color: #fff;
}
.contact-email a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  /* background-color: var(--cream); */
  color: var(--grey);
  padding: 22px clamp(28px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.site-footer a { color: var(--grey); }
.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .site-header.nav-open {
    background: var(--cream);
  }
  body.menu-open {
    overflow: hidden;
  }
  .logo {
    position: relative;
    z-index: 31;
  }
  .logo img { width: 126px; }
  .nav-toggle {
    display: block;
    margin-left: auto;
    position: relative;
    z-index: 31;
  }
  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 16px var(--gutter) 24px;
    text-align: center;
    background: var(--cream);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 20;
  }
  .site-header.nav-open .site-nav {
    display: flex;
  }
  .site-nav a {
    font-size: 21px;
    line-height: 1.2;
  }
  .hero {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 600px;
    min-height: 600px;
    aspect-ratio: 1;
    margin-top: 25px;
  }
  .hero-wrap {
    min-height: 600px;
  }

  .hero-line {
    font-size: clamp(14px, 3.6vw, 22px);
    max-width: 56%;
  }

  .line-seeding {
    left: 35%;
    top: 10%;
  }

  .line-scaling {
    left: 40%;
    top: 23%;
  }

  .line-delivery {
    left: 34%;
    top: 55%;
  }

  .work-item,
  .work-item.reverse,
  .work-item.stacked {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .work-item.reverse .work-image {
    order: 0;
  }
  .work-item.stacked .work-image,
  .work-item.stacked .work-text {
    grid-column: 1;
    padding-left: 0;
  }
  .work-image {
    min-height: 0;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
  }
  .work-animation {
    opacity: 0.9;
  }
  .work-text,
  .work-item.reverse .work-text {
    text-align: left !important;
  }
  .work-text p,
  .work-item.reverse .work-text p {
    max-width: 100%;
    margin-left: 0 !important;
  }

  .timeline-grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }
  .timeline-grid::before {
    left: 10px;
    width: 18px;
    transform: none;
    opacity: 0.55;
  }
  .tl-item.left,
  .tl-item.right {
    text-align: left;
    padding-left: 30px;
    padding-right: 0;
  }
  .tl-item.left::before,
  .tl-item.right::before {
    left: 7px;
    right: auto;
  }
  .tl-year {
    justify-content: flex-start;
    padding-left: 28px;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  section {
    width: 100%;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }

  .hero-line {
    font-size: clamp(12px, 4.2vw, 18px);
    max-width: 64%;
  }

  .line-seeding {
    left: 0;
    top: 10%;
    width: 100%;
    text-align: center;
    max-width: 100%;
  }

  .line-scaling {
    left: 0;
    top: 23%;
    width: 100%;
    text-align: center;
    max-width: 100%;
  }

  .line-delivery {
    left: 0;
    top: 55%;
    width: 100%;
    text-align: center;
    max-width: 100%;
  }

  .mission-inner {
    font-size: 18px;
  }

  .work-list {
    gap: 48px;
  }
  .work-text { padding-top: 4px; }
  .work-num { font-size: 22px; }
  .work-name { font-size: 18px; }

  .tl-item { font-size: 12px; }

  .contact {
    aspect-ratio: auto;
    min-height: 340px;
  }
}
