/* ── Tokens ── */
:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #6B6B6B;
  --border: #E6E4E1;
  --border-strong: #D8D6D2;
  --device-frame: #15151A;

  --atidot: #222272;
  --atidot-tint: #E4E4F2;
  --via: #075E54;
  --via-tint: #E5F7EF;
  --mirror: #7A5AD9;
  --mirror-label: #553BA8;
  --mirror-tint: #EBDDF7;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --max-w: 1080px;
  --gutter: 24px;
  --radius-tile: 18px;
  --radius-card: 12px;
  --radius-pill: 999px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); color: var(--text); }

h1 { font-size: clamp(44px, 6vw, 60px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 600; line-height: 1.2; }
h3 { font-size: clamp(23px, 3vw, 28px); font-weight: 600; line-height: 1.3; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.body-text { max-width: 640px; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: 0.2s; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero-headline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3em;
}

.hero-photo {
  display: inline-block;
  width: 108px;
  height: 108px;
  border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
  background: var(--border);
  object-fit: cover;
  box-shadow: 0 16px 32px -10px rgba(0,0,0,0.32);
  transition: border-radius 0.6s ease;
  vertical-align: middle;
}

.hero-photo:hover {
  border-radius: 58% 42% 37% 63% / 55% 62% 38% 45%;
}

.hero-tagline {
  max-width: 450px;
  margin: 1.5rem auto 0;
  font-size: 16px;
}

.scroll-arrow {
  display: inline-block;
  margin-top: 2rem;
  animation: bounce 2s infinite;
  color: var(--text);
}

.scroll-arrow svg { width: 24px; height: 24px; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Case Studies Grid ── */
.case-studies { padding: 4rem 0; }
.case-studies > .wrap > h2 { text-align: center; margin-bottom: 3rem; }

.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cs-card { display: block; }
.cs-card:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: var(--radius-tile); }

.cs-tile {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s ease;
  position: relative;
}

.cs-card:hover .cs-tile { transform: translateY(-4px) scale(1.01); }

.cs-tile-placeholder {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cs-tile-placeholder svg { width: 48px; height: 48px; opacity: 0.4; }

.cs-info { padding: 1rem 0 0; }

.cs-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  margin-bottom: 0.5rem;
}

.cs-info h3 { margin-bottom: 0.5rem; }

.cs-desc {
  font-size: 15px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-arrow {
  display: inline-block;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  margin-left: 4px;
}

.cs-card:hover .cs-arrow { opacity: 1; transform: translateX(0); }

/* ── About ── */
.about { padding: 4rem 0; }

.about-inner {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.about-photo {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  border-radius: 42% 58% 63% 37% / 45% 38% 62% 55%;
  background: var(--border);
  object-fit: cover;
  box-shadow: 0 16px 32px -10px rgba(0,0,0,0.18);
  transition: border-radius 0.6s ease;
}

.about-photo:hover {
  border-radius: 58% 42% 37% 63% / 55% 62% 38% 45%;
}

.about-text h2 { margin-bottom: 1rem; }
.about-text p { margin-bottom: 1rem; }

/* ── Footer / Let's Connect ── */
.footer {
  background: var(--surface);
  text-align: center;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.footer .eyebrow { color: var(--text-muted); margin-bottom: 0.75rem; }
.footer h2 { margin-bottom: 2rem; }

.footer-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
  border: none;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.btn-filled { background: var(--text); color: white; }
.btn-outline { background: white; color: var(--text); border: 1px solid var(--border-strong); }

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-email svg { width: 16px; height: 16px; }

/* ── Case Study Detail Page ── */
.cs-page { padding: 2rem 0 4rem; }

/* Centered prose column — single consistent width for all content */
.cs-header,
.cs-back-wrap,
.cs-section,
.cs-section-pair,
.cs-quote,
.cs-meta,
.cs-outcomes,
.cs-next,
.cs-image-standalone { max-width: 720px; margin-left: auto; margin-right: auto; }

.cs-back-wrap { margin-bottom: 2rem; }

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.cs-back:hover { color: var(--text); }

.cs-header { margin-bottom: 2rem; }
.cs-header .eyebrow { margin-bottom: 0.75rem; }
.cs-header h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 0.75rem; }
.cs-header .cs-deck { font-size: 16px; }

/* Hero band — full width breakout */
.cs-hero-band {
  border-radius: var(--radius-tile);
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  margin-bottom: 3rem;
}

.cs-hero-band .device-placeholder {
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
}

/* Meta strip — full width */
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 4rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.cs-meta-item { padding: 0 1rem; border-left: 1px solid var(--border); }
.cs-meta-item:first-child { border-left: none; padding-left: 0; }

.cs-meta-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.cs-meta-value { font-size: 13px; font-weight: 500; color: var(--text); }

/* Content sections — centered prose */
.cs-section { margin-bottom: 3rem; }
.cs-section h2 { font-size: clamp(23px, 3vw, 28px); margin-bottom: 1rem; }
.cs-section p { margin-bottom: 1rem; }
.cs-section ul { margin: 0 0 1rem 1.5rem; }
.cs-section li { margin-bottom: 0.5rem; }

/* Section pairs — text then image, stacked in the prose column */
.cs-section-pair {
  margin-bottom: 3rem;
}

.cs-section-pair h2 { font-size: clamp(23px, 3vw, 28px); margin-bottom: 1rem; }
.cs-section-pair p { margin-bottom: 1rem; }
.cs-section-pair ul { margin: 0 0 1rem 1.5rem; }
.cs-section-pair li { margin-bottom: 0.5rem; }

.cs-section-pair.reverse :first-child { order: 0; }
.cs-section-pair.reverse :last-child { order: 0; }

/* Image placeholders */
.cs-image-placeholder {
  background: var(--border);
  border-radius: var(--radius-tile);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 1.5rem;
}

/* Standalone image */
.cs-image-standalone {
  margin-bottom: 3rem;
}

/* Framed prototype screenshots (transparent PNG with baked-in shadow) */
.cs-shot {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.5rem;
}

/* Quotes — centered in prose column */
.cs-quote {
  border-left: 3px solid var(--text);
  padding: 1rem 0 1rem 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.cs-quote p {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 21px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
}

.cs-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-style: normal;
  color: var(--text-muted);
}

/* Sticky note — research callout */
.cs-sticky {
  position: relative;
  max-width: 420px;
  margin: 2.5rem 0;
  padding: 1.5rem 1.5rem 1.75rem;
  background: #FFF3B0;
  color: #4A4320;
  border-radius: 2px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transform: rotate(-1.6deg);
}

.cs-sticky::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  width: 90px;
  height: 22px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-sticky p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #4A4320;
}

/* Feature cards */
.cs-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}

.cs-feature-card {
  background: var(--mirror-tint);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}

.cs-feature-card h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--mirror-label);
  margin: 0 0 0.5rem;
}

.cs-feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* Outcome block — centered, wider than prose */
.cs-outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem auto 3rem;
  max-width: 720px;
}

.cs-outcome-card {
  border-radius: var(--radius-card);
  padding: 2rem 1rem;
  text-align: center;
}

.cs-outcome-number {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.cs-outcome-label {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Next project link */
.cs-next {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  transition: opacity 0.15s;
}

.cs-next:hover { opacity: 0.7; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem var(--gutter);
    gap: 16px;
  }
  .nav-toggle { display: block; }

  .hero { padding: 3rem 0 2rem; }
  .hero-photo { width: 80px; height: 80px; }

  .cs-grid { grid-template-columns: 1fr; }

  .about-inner { flex-direction: column; align-items: center; text-align: center; }
  .about-photo { width: 200px; height: 200px; }

  .cs-meta { grid-template-columns: repeat(2, 1fr); row-gap: 1rem; }
  .cs-outcomes { grid-template-columns: 1fr; }
}
