/* ---------- colors + basics ---------- */
:root {
  --cream: #E5E1D6;
  --header: #5E6C60;
  --dark: #2F4E3D;
  --mint: #D4EEC9;
  --green: #B7D7A6;
  --sage: #B8C7B6;
  --blush: #D6C2B5;
  --off: #FAFBF7;
  --warm: #F6F2EE;
  --pale: #D7E6D8;
  --ink: #1F1F1F;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Intel One Mono", ui-monospace, Menlo, Consolas, monospace;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  background: var(--header);
  color: var(--off);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  max-width: 1392px;
}
.logo { font-size: 30px; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 36px; font-size: 20px; }

/* dark green underline that slides in on hover */
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

.pill-btn {
  background: var(--off);
  color: var(--dark);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  transition: background 0.2s;
}
.pill-btn:hover { background: var(--mint); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 12px;
  border: 2px solid var(--dark);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--dark); color: var(--off); }
.btn-primary:hover { background: #24402F; }
.btn-secondary { color: var(--dark); }
.btn-secondary:hover { background: var(--dark); color: var(--off); }

/* ---------- hero ---------- */
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: 110px;
  padding-bottom: 110px;
}
.hero h1 {
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 28px;
}
.hero .tagline { font-size: clamp(18px, 2vw, 24px); max-width: 680px; margin-bottom: 28px; }
.hero .buttons { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.contact { display: flex; align-items: center; gap: 18px; color: var(--header); font-size: 18px; }
.contact a { color: var(--ink); transition: color 0.2s, transform 0.2s; }
.contact a:hover { color: var(--dark); transform: translateY(-2px); }
.contact svg { width: 32px; height: 32px; display: block; }

.photo {
  flex-shrink: 0;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--blush);
  border: 6px solid var(--green);
}

/* ---------- placeholders (delete once you add real images) ---------- */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  color: var(--dark);
  font-weight: 500;
  font-size: 16px;
  text-align: center;
}
.play {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--off);
  display: flex; align-items: center; justify-content: center;
}
.play svg { width: 24px; height: 24px; margin-left: 3px; }

/* ---------- sections ---------- */
.section { padding: 100px 0; }
.section.off { background: var(--off); }
.section.warm { background: var(--warm); }
.label { font-size: 16px; font-weight: 500; color: var(--header); margin-bottom: 6px; }
.section h2 { font-size: clamp(32px, 4vw, 48px); color: var(--dark); line-height: 1.2; margin-bottom: 44px; }

/* ---------- project cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--off);
  border: 1px solid var(--sage);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(47, 78, 61, 0.15); }
.card-media { height: 220px; background: var(--sage); }
.card-media.contain { background: #fff; }
.card-media.contain img { object-fit: contain; padding: 12px; }
.card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 24px; color: var(--dark); line-height: 1.25; }
.card p { font-size: 16px; line-height: 1.5; }
.tags { font-size: 14px; font-weight: 500; color: var(--header); }
.read-more { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--dark); }

.more {
  margin-top: 48px;
  background: var(--warm);
  border-radius: 20px;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.more h3 { font-size: 24px; color: var(--dark); margin-bottom: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--mint);
  color: var(--dark);
  font-size: 16px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
}
.chip.light { background: var(--off); }

/* ---------- about ---------- */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.about-text p { font-size: 20px; line-height: 1.6; margin-bottom: 20px; }
.about-cols h3 { font-size: 24px; color: var(--dark); margin-bottom: 18px; }

/* ---------- climbing + lifting ---------- */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.panel.climb { background: var(--mint); }
.panel.lift { background: var(--pale); }
.panel h3 { font-size: 34px; color: var(--dark); }
.panel > p { font-size: 18px; line-height: 1.55; }
.climb-photo { aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--green); }

.hevy { background: var(--off); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.hevy-top { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.live { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--dark); }
.live::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #4CAF50; }
.handle { color: var(--header); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--warm); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 24px; color: var(--dark); }
.stat span { font-size: 13px; color: var(--header); font-weight: 500; }
.small-label { font-size: 15px; font-weight: 600; color: var(--header); }
.workout {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--sage);
}
.workout b { display: block; color: var(--dark); }
.workout span, .workout small { font-size: 13px; color: var(--header); }
.text-link { font-weight: 600; color: var(--dark); }
.text-link:hover { text-decoration: underline; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: var(--off); padding: 72px 0; }
.site-footer .container { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.site-footer h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.site-footer p { color: var(--mint); }
.footer-links { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-size: 20px; font-weight: 600; }
.footer-links a:hover { color: var(--mint); }

/* ---------- case study pages ---------- */
.study-intro { padding: 96px 0 80px; }
.study-intro h1 { font-size: clamp(40px, 6vw, 72px); color: var(--dark); line-height: 1.1; margin: 8px 0 20px; }
.study-intro .summary { font-size: clamp(18px, 2vw, 24px); max-width: 880px; margin-top: 24px; line-height: 1.55; }

.media { display: flex; flex-direction: column; gap: 24px; padding-bottom: 96px; }
.media-main { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--pale); }
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.media-row > div { border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--pale); }
.media .video { background: var(--sage); }

.writeup { background: var(--off); padding: 96px 0; }
.writeup .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.writeup h2 { font-size: 34px; color: var(--dark); margin-bottom: 20px; }
.writeup ul { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.writeup li { position: relative; padding-left: 32px; font-size: 18px; line-height: 1.6; }
.writeup li b { color: var(--dark); }
.writeup li::before { content: ""; position: absolute; left: 6px; top: 0.7em; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.study-footer { background: var(--dark); color: var(--off); padding: 56px 0; font-size: 20px; font-weight: 600; }
.study-footer a:hover { color: var(--mint); }

/* ---------- photos, captions, and video ---------- */
.media-main video { background: #000; object-fit: contain; }
.caption { font-size: 15px; color: var(--header); margin-top: -8px; }
figure { display: flex; flex-direction: column; gap: 10px; }
.frame { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--pale); }
.frame.contain { background: #fff; }
.frame.wide { aspect-ratio: auto; background: none; border: 1px solid var(--sage); }
.frame.wide img { height: auto; }
.frame.chart { aspect-ratio: 7 / 5; }
.frame.chart img { padding: 8px; }
.checklist li b { font-weight: 700; }
code { font-family: inherit; background: var(--mint); color: var(--dark); padding: 1px 6px; border-radius: 6px; }
.frame.contain img { object-fit: contain; padding: 16px; }
figcaption { font-size: 15px; color: var(--header); }

/* ---------- the challenge ---------- */
.mission { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.mission-text { font-size: 20px; line-height: 1.6; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checklist li {
  background: var(--mint);
  color: var(--dark);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- navigation steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.step {
  background: var(--off);
  border: 1px solid var(--sage);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-num { font-size: 14px; font-weight: 600; color: var(--header); }
.step h3 { font-size: 20px; color: var(--dark); }
.step p { font-size: 15px; line-height: 1.55; }
.diagrams { margin-bottom: 32px; }
.steps.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 0; }
.section-intro { max-width: 880px; margin-bottom: 36px; }

/* ---------- plaid token handoff ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flow-step {
  position: relative;
  background: var(--warm);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.flow-step p { font-size: 15px; line-height: 1.55; }
.flow-step.mine { background: var(--mint); border: 2px solid var(--dark); }
.mine-tag {
  align-self: flex-start;
  margin-top: auto;
  background: var(--dark);
  color: var(--off);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.hardware .small-label { margin-bottom: 12px; }

/* ---------- fade up on scroll ---------- */
.fade { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fade { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- phones + tablets ---------- */
@media (max-width: 900px) {
  .nav { gap: 18px; font-size: 16px; }
  .hero .container { flex-direction: column-reverse; align-items: flex-start; padding-top: 64px; padding-bottom: 64px; gap: 40px; }
  .photo { width: 220px; height: 220px; }
  .cards, .about-cols, .halves, .writeup .container, .media-row, .mission { grid-template-columns: 1fr; }
  .steps, .flow { grid-template-columns: 1fr 1fr; }
  .steps.three { grid-template-columns: 1fr; }
  .about-cols { gap: 40px; }
  .more { flex-direction: column; align-items: flex-start; padding: 28px; }
  .section { padding: 72px 0; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .footer-links { align-items: flex-start; }
}
@media (max-width: 560px) {
  .site-header .container { flex-wrap: wrap; gap: 12px; }
  .nav .nav-link { display: none; }
  .panel { padding: 24px; }
  .steps, .flow { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stat { padding: 12px; }
}
