/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fff;
  --text: #1a1a1a;
  --muted: #555;
  --border: #e0e0e0;
  --accent: #2f6fd6;
  --card-blue: #e8eff7;
  --card-green: #d7efec;
  --card-yellow: #f5f0e0;
  --card-sage: #e6ece8;
  --footer-bg: #1a1a1a;
  --footer-text: #fff;
  --font-serif: 'Tenor Sans', 'Helvetica Neue', sans-serif;
  --font-sans: 'Quicksand', 'Helvetica Neue', sans-serif;
  --font-script: 'Dancing Script', cursive;
  --max-width: 1100px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Typography ── */
h1, h2, h3, h4 { line-height: 1.2; }

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-color: var(--border); }

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}
.nav-logo img { height: 56px; width: auto; display: block; }
.nav-logo:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  position: relative;
  transition: opacity 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--accent); }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Page wrapper ── */
main { padding-top: var(--nav-height); }

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
}

.hero-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: normal;
  max-width: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.hero-sub {
  margin-top: 20px;
  font-family: 'Libre Franklin', 'Helvetica Neue', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s;
}

.hero.in-view .hero-label,
.hero.in-view h1,
.hero.in-view .hero-sub {
  opacity: 1;
  transform: translateY(0);
}

/* ── Project Grid ── */
.projects {
  padding: 20px 0 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}
.project-card.in-view { opacity: 1; transform: translateY(0); }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.15s; }
.project-card:nth-child(4) { transition-delay: 0.2s; }

.project-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.1); transform: translateY(-4px); }
.project-card.in-view:hover { transform: translateY(-4px); }

.project-card.blue   { background: var(--card-blue); }
.project-card.green  { background: var(--card-green); }
.project-card.yellow { background: var(--card-yellow); }
.project-card.sage   { background: var(--card-sage); }

.project-card img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}
.project-card:hover img { transform: scale(1.03); }

/* ── Footer ── */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 28px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-inner a {
  color: var(--footer-text);
  transition: color 0.2s, opacity 0.2s;
}
.footer-inner a:hover { color: #8ab4f0; }
.footer-sep { opacity: 0.4; }

/* ── About Page ── */
.about-section {
  padding: 80px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.about-photo.in-view { opacity: 1; transform: translateX(0); }

.about-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}
.about-content.in-view { opacity: 1; transform: translateY(0); }

.about-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  margin-bottom: 28px;
}

.about-content p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 18px;
}

.about-content p:last-of-type { margin-bottom: 32px; }

.btn {
  display: inline-block;
  background: var(--text);
  color: #fff;
  padding: 12px 28px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: background 0.2s, transform 0.2s;
}
.btn:hover { background: #333; transform: translateY(-1px); }

/* ── Case Study Pages ── */
.case-hero {
  padding: 60px 0 40px;
}

.case-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  max-width: 700px;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.case-hero h1.in-view { opacity: 1; transform: translateY(0); }

.case-hero-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 600px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}
.case-hero-sub.in-view { opacity: 1; transform: translateY(0); }

.case-meta {
  display: flex;
  gap: 48px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.meta-item label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.meta-item span {
  font-size: 0.875rem;
  font-weight: 500;
}

.case-hero-image {
  width: 100%;
  border-radius: 12px;
  margin: 48px 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}
.case-hero-image.in-view { opacity: 1; transform: translateY(0); }
.case-hero-image img { width: 100%; display: block; }

/* full-bleed hero banner: title + subtitle + image on a tinted panel */
.case-hero-banner {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.case-hero-banner.blue   { background: var(--card-blue); }
.case-hero-banner.green  { background: var(--card-green); }
.case-hero-banner.yellow { background: var(--card-yellow); }
.case-hero-banner.sage   { background: var(--card-sage); }
.case-hero-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 40px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.case-hero-banner .back-link { align-self: flex-start; margin-bottom: 20px; }
.case-hero-banner h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}
.case-hero-banner-sub {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  text-transform: none;
  max-width: 760px;
  margin: 0 auto;
  text-wrap: balance;
}
.case-hero-banner img {
  width: 100%;
  max-width: 880px;
  margin-top: 44px;
  border-radius: 8px;
  display: block;
}
/* Samsung hero is a portrait phone composition — keep it compact + centered */
.page-samsung .case-hero-banner img {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0;
}

/* overview: text + meta sidebar */
.cs-overview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}
.cs-meta-box {
  background: #fbf7f1;
  border-radius: 0;
  padding: 32px;
}
.cs-meta-box .meta-item { margin-bottom: 24px; }
.cs-meta-box .meta-item:last-child { margin-bottom: 0; }
.cs-meta-box .meta-item span { font-weight: 400; line-height: 1.5; }

/* two-column feature block: media left, text right */
.cs-feature {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: center;
  margin: 96px 0;
  max-width: 960px;
}
.js-anim .cs-feature {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-anim .cs-feature.in-view { opacity: 1; transform: translateY(0); }
/* Anypoint & Samsung feature media are portrait/mobile screens — give them a
   narrower media column (~15% less wide) than LevelTen's landscape screens. */
@media (min-width: 769px) {
  .page-anypoint .cs-feature,
  .page-samsung .cs-feature,
  .page-puppy .cs-feature { grid-template-columns: 1.05fr 1fr; }
  /* Tighten feature block spacing on Samsung — 96px default creates too much
     dead space between consecutive portrait-video blocks. */
  .page-samsung .cs-feature { margin: 56px 0; }
  .page-samsung .cs-section h2 + .cs-feature { margin-top: 28px; }
  .page-samsung .cs-section h2 + p + .cs-feature { margin-top: 28px; }
  .page-samsung .cs-section .cs-feature:last-child  { margin-bottom: 0; }
  /* Samsung phone-screen videos are very tall portrait; cap them to a phone
     size and center so they don't overwhelm the adjacent text. */
  .page-samsung .cs-feature-media video {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  /* PuPPy feature walkthroughs are tall portrait phone mockups; cap them to a
     phone size and center so they don't dominate the page. */
  .page-puppy .cs-feature-media img,
  .page-puppy .cs-feature-media video {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}
.cs-feature-media video,
.cs-feature-media img {
  width: 100%;
  border-radius: 4px;
  display: block;
}
/* render the image flat (no card framing) — for images that already include
   their own background/whitespace */
.cs-feature-media--bare img {
  border-radius: 0;
  box-shadow: none;
}
.cs-feature-text p {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 420px;
}
.cs-media-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  padding: 28px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  color: var(--muted, #888);
  font-size: 0.9rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.015);
}
.cs-section .cs-feature-text h3,
.cs-section .cs-feature-block h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 20px;
}

/* research details accordion */
.cs-accordion {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 40px;
  max-width: 900px;
}
.cs-accordion-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 13px 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
}
.cs-accordion-toggle .chev {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  font-size: 0; /* hide the raw glyph; draw the chevron with borders */
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateX(-1px) rotate(-45deg);
  transition: transform 0.25s ease;
}
.cs-accordion.open .chev { transform: translateY(-2px) rotate(45deg); }
.cs-accordion-content { display: none; padding-bottom: 12px; }
.cs-accordion.open .cs-accordion-content { display: block; }
.cs-accordion-content ol { padding-left: 20px; }
.cs-accordion-content li {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

/* more projects nav */
.cs-more {
  padding: 64px 0 24px;
}
.cs-more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cs-more-card { text-decoration: none; color: inherit; display: block; }
.cs-more-card img {
  width: 100%;
  border-radius: 4px;
  transition: transform 0.3s ease;
}
.cs-more-card:hover img { transform: translateY(-4px); }
.cs-more-card .t {
  margin-top: 14px;
  letter-spacing: 0.01em;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.cs-more-card .tags {
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

/* numbered research findings */
.cs-findings {
  list-style: none;
  counter-reset: finding;
  padding: 0;
  margin: 24px 0 0;
  max-width: 900px;
}
.cs-findings li {
  counter-increment: finding;
  position: relative;
  padding-left: 2.4em;
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 22px;
}
.cs-findings li::before {
  content: "0" counter(finding) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
}
.cs-findings li strong { font-weight: 600; }

/* tabbed explorations */
.cs-tabs { margin: 40px 0 8px; max-width: 900px; }
.cs-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.cs-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 12px;
  margin-bottom: -1px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.cs-tab-btn:hover { color: var(--text); }
.cs-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.cs-tab-panel { display: none; }
.cs-tab-panel.active { display: block; }
.cs-tab-panel h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 16px;
}

/* image carousel */
.cs-carousel {
  position: relative;
  margin: 32px 0 8px;
}
.cs-carousel-viewport { overflow: hidden; }
.cs-carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}
.cs-carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 0;
}
.cs-carousel-slide img {
  width: 100%;
  display: block;
  border-radius: 4px;
}
/* carousel images open full size in a new tab — make the wrapping link fill the
   slide so image widths/centering are preserved, and hint clickability */
.cs-carousel-slide > a { display: block; }
.cs-carousel-slide a { cursor: zoom-in; }
.cs-carousel-slide a:hover img { opacity: 0.9; }

/* JS-wrapped content images: the link is layout-neutral (display:contents) so
   it adds click-to-open-in-new-tab without affecting sizing or centering. */
.img-zoom-link { display: contents; }
.img-zoom-link img { cursor: zoom-in; transition: opacity 0.2s ease; }
.img-zoom-link img:hover { opacity: 0.9; }
.cs-carousel-prev,
.cs-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  font-size: 0;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.cs-carousel-prev::before,
.cs-carousel-next::before {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--text);
  border-bottom: 1.5px solid var(--text);
}
.cs-carousel-prev::before { transform: translateX(2px) rotate(135deg); }
.cs-carousel-next::before { transform: translateX(-2px) rotate(-45deg); }
.cs-carousel-prev { left: 12px; }
.cs-carousel-next { right: 12px; }
.cs-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.cs-carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.2);
  cursor: pointer;
}
.cs-carousel-dots button.active { background: var(--text); }
/* carousel slides that carry a caption + multiple images */
.cs-carousel-slide .slide-cap {
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 22px;
}
.cs-carousel-slide .slide-imgs {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
}
.cs-carousel-slide .slide-imgs img {
  width: auto;
  max-width: 42%;
  max-height: 380px;
  border-radius: 6px;
}
.slide-img-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 520px;
  min-height: 280px;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  color: var(--muted, #888);
  font-size: 0.9rem;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.015);
}

/* prominent framing question (e.g. Challenge HMW) */
.cs-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.01em;
  max-width: 820px;
}

/* small app-icon strip (Phone / Messages / Contacts) */
.sm-app-icons {
  display: flex;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  margin-top: 36px;
  max-width: 900px;
}
.sm-app-icons img {
  display: block;
  width: 100%;
  max-width: 580px;
  height: auto;
}

/* wide meta box (2x2 grid of label/value pairs) */
.cs-meta-box.wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
  margin-top: 36px;
}
.cs-meta-box.wide .meta-item { margin-bottom: 0; }

/* image placeholder for assets still to be supplied */
.cs-ph {
  background: var(--card-yellow);
  border: 1px dashed #cbb9a0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 24px;
  min-height: 220px;
  width: 100%;
}

/* Phone mockup: an iPhone 15 frame PNG (transparent screen + exterior) overlaid
   on top of a frameless Marvel embed. The metal frame is opaque and sits above
   the iframe, so it masks the screen's rounded corners; the iframe bleeds a hair
   under the metal so no gap shows. */
.cs-phone-mock {
  position: relative;
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 429 / 884;
}
.cs-phone-screen {
  position: absolute;
  top: 1.6%;
  left: 3.9%;
  right: 3.9%;
  bottom: 1.5%;
  overflow: hidden;
  background: #000;
  border-radius: 11.2% / 5.2%;
}
.cs-phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, 0.22));
}
.cs-prototype {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* persona card inside carousel */
.pp-persona {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}
.pp-persona-photo { min-height: 360px; border-radius: 0; border: none; }
.pp-persona-body { padding: 32px; }
.pp-quote {
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.55;
  border-left: 3px solid var(--card-green);
  padding-left: 14px;
  margin-bottom: 20px;
}
.pp-persona-body h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; }
.pp-persona-body p { font-size: 0.85rem; line-height: 1.7; }
/* Persona source cards differ in aspect ratio (some 667x420, some 667x500).
   Pin them to a consistent height so they read as the same size and the
   carousel doesn't jump vertically between slides. Higher specificity than
   `.cs-carousel-slide img { width:100% }` so the width override sticks. */
.cs-carousel .pp-persona-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(280px, 40vw, 480px);
  margin: 0 auto;
  border-radius: 8px;
}
.pp-wireframe-img {
  display: block;
  width: 64%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

/* captioned figures */
.cs-figure { margin: 28px 0 0; }
.cs-figure figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 14px;
}
.pp-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pp-photo-wide { grid-column: 1 / -1; }
.pp-photo-wide-img {
  grid-column: 1 / -1;
  width: 64%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

/* bordered stat cards */
.cs-stat-box-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.cs-stat-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-stat-box .num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
}
.cs-stat-box .change {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--muted);
}
.cs-stat-box .desc { font-size: 0.9rem; }

/* award links */
.cs-awards { margin: 8px 0 8px; }
.cs-awards a {
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-decoration: none;
}
.cs-awards a:hover { text-decoration: underline; }

/* Case study sections */
.cs-section {
  padding: 56px 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cs-section.in-view { opacity: 1; transform: translateY(0); }

/* Alternating tinted section bands — full bleed */
/* case-hero-banner is child 1, Overview is child 2 (skip it), tint starts at child 3 */
.cs-section:nth-child(odd):not(.cs-section--no-tint) {
  background: #fdfbf7;
  box-shadow: 0 0 0 100vmax #fdfbf7;
  clip-path: inset(0 -100vmax);
}
.cs-section--no-tint {
  background: transparent !important;
  box-shadow: none !important;
  clip-path: none !important;
}

.cs-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  margin-bottom: 20px;
}

.cs-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 24px;
}

.cs-section p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}
.cs-section p a,
.cs-section li a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s;
}
.cs-section p a:hover,
.cs-section li a:hover { opacity: 0.7; }

.cs-section ul,
.cs-section ol:not(.cs-findings):not(.sm-principle-list) {
  padding-left: 20px;
  margin-bottom: 16px;
}
.cs-section ul li,
.cs-section ol:not(.cs-findings):not(.sm-principle-list) li {
  font-size: 0.9375rem;
  line-height: 1.75;
  margin-bottom: 6px;
  max-width: 900px;
}

.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Samsung — Guiding Principles */
.sm-principles { align-items: start; gap: 80px; }
.sm-principle-list {
  margin: 0;
  padding-left: 1.3em;
  list-style: decimal;
}
.sm-principle-list li {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  padding-left: 8px;
  white-space: nowrap;
}
/* Iterations carousel — single full-width image per slide, clickable to open full SVG */
.sm-iterations-carousel .slide-imgs { gap: 0; }
.sm-iterations-carousel .slide-imgs a { display: block; width: 85%; margin: 0 auto; }
.sm-iterations-carousel .slide-imgs img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.sm-iterations-carousel .slide-imgs a:hover img { opacity: 0.85; }

.sm-principle-carousel { margin-top: 36px; }
.sm-principle-carousel .cs-carousel-slide .slide-imgs { gap: 0; }
.sm-principle-carousel .cs-carousel-slide .slide-imgs a { display: block; width: 100%; }
.sm-principle-carousel .cs-carousel-slide .slide-imgs img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  border-radius: 4px;
}
.cs-final-intro {
  grid-template-columns: 1fr 1.35fr;
  align-items: center;
}
.cs-final-intro .cs-image-full { margin: 0; }

.cs-image-full {
  width: 100%;
  border-radius: 4px;
  margin: 24px 0;
}

.cs-video-full {
  width: 100%;
  border-radius: 4px;
  margin: 24px 0;
  display: block;
}

.cs-video-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}
.cs-video-row video {
  width: 100%;
  border-radius: 8px;
}

.cs-media-caption {
  font-size: 0.8rem;
  color: #888;
  margin-top: -16px;
  margin-bottom: 24px;
}

.cs-image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.cs-image-row img {
  border-radius: 8px;
  width: 100%;
}

.cs-callout {
  position: relative;
  background: none;
  border: none;
  padding: 8px 0 8px 52px;
  margin: 40px 0;
  max-width: 820px;
  text-align: left;
}
.cs-callout::before {
  content: "\201C";
  position: absolute;
  left: -4px;
  top: 0.46em;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 5rem;
  line-height: 0;
  color: #cbc6bd;
}
.cs-callout p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.4;
  color: var(--text);
  margin: 0;
}
.page-puppy .cs-callout { max-width: 1020px; }
/* When a callout closes out a section (heading + quote), drop its bottom
   margin so the section padding alone sets the spacing below it. */
.cs-section .cs-callout:last-child { margin-bottom: 0; }

.cs-stat-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.cs-stat { text-align: center; }
.cs-stat .num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  display: block;
}
.cs-stat .label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.tag {
  background: #f0f0f0;
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* placeholder for missing images */
.img-placeholder {
  background: #f0f0f0;
  border-radius: 8px;
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--text); gap: 10px; }

/* ── Scroll fade utility ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .container, .nav-inner, footer { padding-left: 24px; padding-right: 24px; }
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px 24px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  nav.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 2px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-links a::after { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-two-col { grid-template-columns: 1fr; gap: 24px; }
  .case-meta { gap: 24px; }
  .cs-stat-row { gap: 24px; }
  .cs-overview-grid { grid-template-columns: 1fr; gap: 28px; }
  .cs-feature { grid-template-columns: 1fr; gap: 24px; margin: 40px 0; }
  .cs-feature-media { order: -1; }
  .cs-more-grid { grid-template-columns: 1fr; gap: 32px; }
  .case-hero-banner-inner { padding: 24px 24px 44px; }
  .cs-stat-box-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cs-tab-nav { gap: 18px; }
  .cs-tab-btn { font-size: 0.85rem; }
  .cs-carousel { padding: 0; }
  .cs-carousel-slide .slide-imgs { gap: 16px; }
  .cs-carousel-slide .slide-imgs img { max-width: 47%; }
  .sm-app-icons { gap: 28px; padding: 24px; }
  .cs-meta-box.wide { grid-template-columns: 1fr; gap: 22px; }
  .pp-persona { grid-template-columns: 1fr; }
  .pp-persona-photo { min-height: 240px; }
  .pp-photo-grid { grid-template-columns: 1fr; }
}

/* Respect users who prefer reduced motion: drop the scroll reveals/transitions
   and keep all content visible. Autoplay videos are paused (and given controls)
   from main.js for the same users. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .hero,
  .project-card,
  .cs-section,
  .cs-feature,
  .case-hero-image,
  .case-hero h1,
  .case-hero-sub,
  .about-photo,
  .about-content {
    opacity: 1 !important;
    transform: none !important;
  }
}
