/* ==========================================================
   SamePage website styles
   ----------------------------------------------------------
   You rarely need to touch this file. The most useful part
   is the COLORS AND FONTS section right below: change a hex
   code there and it updates everywhere on the site.
   ========================================================== */


/* ---------- COLORS AND FONTS (brand system) ---------- */
:root {
  --green:      #06402B;  /* D_Green: headings, buttons, footer */
  --green-mid:  #009262;  /* M_Green: hover states, ribbon */
  --cream:      #F1E1CF;  /* Cream: title page, video boxes */
  --paper:      #FBF5EE;  /* Page background (a lighter cream) */
  --brown:      #4A3633;  /* D_Brown: body text */
  --grey:       #6E6560;  /* Small, quieter text */
  --white:      #FFFFFF;

  /* Headings use a condensed serif; body text uses a Century-style serif.
     If you get the real ITC Century fonts as web fonts, swap the names here. */
  --font-title: "Instrument Serif", "Century Schoolbook", Georgia, serif;
  --font-body:  "Schola", "Century Schoolbook", Georgia, serif;
}


/* ---------- FONT FILES (in the fonts/ folder) ---------- */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/schola-regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/schola-italic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schola"; src: url("../fonts/schola-bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }


/* ---------- BASICS ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-mid); }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--green-mid);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--green);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Keeps content centered with comfortable side margins */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ---------- TOP BAR ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--cream);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 1.75rem;
  color: var(--green);
  text-decoration: none;
  line-height: 1;
}
.brand img { width: 34px; }

.site-nav { display: flex; gap: 4px 24px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  font-size: 1rem;
  padding: 4px 0;
}
.site-nav a:hover { text-decoration: underline; }


/* ---------- TITLE PAGE (hero) ---------- */
.hero { padding: 32px 0 24px; }

.title-page {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  border-radius: 28px;
  padding: 88px 24px 72px;
  text-align: center;
}

/* The two ribbon bookmarks hanging from the top edge */
.title-page::before,
.title-page::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 14px), 0 100%);
}
.title-page::before { right: calc(12% + 30px); height: 150px; background: var(--green-mid); }
.title-page::after  { right: 12%;              height: 112px; background: var(--brown); }

.hero-logo { width: 96px; margin: 0 auto 20px; }

.wordmark {
  font-size: clamp(4.5rem, 16vw, 10.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.value-prop {
  font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.4;
  max-width: 32ch;
  margin: 32px auto 0;
  text-wrap: balance;
}

.title-rule {
  width: 56px;
  height: 2px;
  background: var(--green);
  border: 0;
  margin: 36px auto;
}

.byline { margin: 0; text-wrap: balance; }
.imprint { margin: 6px 0 0; color: var(--grey); font-size: 0.95rem; }


/* ---------- SECTIONS (shared) ---------- */
.section {
  padding: 96px 0;
  scroll-margin-top: 64px; /* so the top bar doesn't cover headings */
}
.section + .section { border-top: 1px solid var(--cream); }

.section-title { font-size: clamp(2.75rem, 6vw, 4rem); }

.section-intro {
  max-width: 56ch;
  margin: 16px 0 0;
}


/* ---------- ABOUT ---------- */
.about {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px 72px;
  align-items: start;
}

.lede { font-size: 1.2rem; line-height: 1.65; margin: 20px 0 0; max-width: 34em; }

.how-title { font-size: 2rem; margin-bottom: 8px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--cream);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-title);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--green-mid);
  grid-row: span 2;
}
.steps strong { color: var(--green); }
.steps p { margin: 2px 0 0; }


/* ---------- PROCESS (table of contents) ---------- */
.chapters { list-style: none; margin: 56px 0 0; padding: 0; }

.chapter {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 16px;
  padding: 0 0 44px;
}
.chapter:last-child { padding-bottom: 0; }

.chapter-num {
  font-family: var(--font-title);
  font-size: 3.25rem;
  line-height: 0.9;
  color: var(--green);
}

.chapter-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
}
.chapter-title .leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 2px dotted currentColor;
  opacity: 0.45;
  transform: translateY(-0.2em);
}
.chapter-title .code {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--brown);
}

.chapter p { margin: 8px 0 0; max-width: 62ch; }

/* Chapters that aren't done yet look a little quieter */
.chapter.upcoming .chapter-num { color: #C8B39B; }
.soon {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--grey);
}


/* ---------- BUTTON LINKS ---------- */
.links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; padding: 0; }

.button {
  display: inline-block;
  padding: 7px 18px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.button:hover { background: var(--green); color: var(--cream); }


/* ---------- VIDEOS ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 40px;
  margin-top: 48px;
}

.video h3 { font-size: 2rem; }
.video > p { margin: 8px 0 20px; }

.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream);
}
.video-frame iframe,
.video-frame video { width: 100%; height: 100%; border: 0; display: block; }

.video-frame.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--green);
  font-style: italic;
}
.video-frame.placeholder::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent var(--green);
  opacity: 0.6;
}


/* ---------- TEAM ---------- */
.team {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 28px;
}

.member img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  background: var(--cream);
}
.member h3 { font-size: 2rem; margin-top: 16px; }
.member .role { margin: 4px 0 0; color: var(--brown); }
.member .program { margin: 2px 0 0; color: var(--grey); font-size: 0.95rem; }


/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--green);
  color: var(--cream);
  padding: 56px 0;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--white); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-title); font-size: 3rem; line-height: 1; margin: 0; }
.footer-text { margin: 0; max-width: 46ch; font-size: 0.95rem; }


/* ---------- PHONES AND TABLETS ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .title-page { padding: 72px 16px 56px; border-radius: 20px; }
  .title-page::before { height: 96px; width: 16px; right: calc(8% + 22px); }
  .title-page::after  { height: 72px; width: 16px; right: 8%; }
  .hero-logo { width: 72px; }
  .chapter { grid-template-columns: 40px 1fr; gap: 0 10px; }
  .chapter-num { font-size: 2.5rem; }
  .team { gap: 32px 16px; }
  .member h3 { font-size: 1.6rem; }
}

/* Respect people who turn off animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
