/* ==========================================================================
   Erika Scherer-Heili — Portfolio
   Design tokens: off-white surface, deep navy ink, purple accent
   ========================================================================== */

:root {
  --bg: #FAFAF7;
  --bg-alt: #F1EEE7;
  --ink: #1B2430;
  --ink-soft: #4B5563;
  --accent: #6653A1;
  --accent-dark: #4E3E82;
  --accent-tint: #EFEBFA;
  --accent-tint-2: #E3DCF4;
  --line: #E3DFD6;
  --white: #FFFFFF;
  --live: #1E7B4D;
  --live-bg: #E4F3EA;
  --progress: #9A6B12;
  --progress-bg: #FBF0DA;
  --concept: #4A5568;
  --concept-bg: #EAEAEA;
  --shadow-sm: 0 2px 10px rgba(27, 36, 48, 0.06);
  --shadow-md: 0 14px 40px rgba(27, 36, 48, 0.12);
  --shadow-lg: 0 24px 70px rgba(27, 36, 48, 0.18);
  --radius: 18px;
  --serif: 'Bricolage Grotesque', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==================== MATERIAL SYMBOLS (icon font) ==================== */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9em;
}

.section-sub { max-width: 620px; }

/* subtle grain / texture overlay for warmth */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .material-symbols-rounded { font-size: 18px; margin-right: 6px; }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }

/* ==================== NAV ==================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 250, 247, 0.82);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-nav.scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 24px rgba(27,36,48,0.05);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-mark {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 32px; margin-left: auto; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--accent); }
.nav-cta {
  border: 1.5px solid var(--ink);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ink); color: var(--white); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-links-mobile {
  display: none;
  flex-direction: column;
  padding: 0 32px 20px;
  gap: 4px;
}
.nav-links-mobile a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

/* ==================== HERO ==================== */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 32px 0;
}
.hero-inner { max-width: 1000px; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.01em;
}
.hero .highlight {
  font-style: italic;
  color: var(--accent);
}
.hero-cycle-line { display: block; }
.cycle-word {
  display: inline-block;
  text-align: left;
}
.cycle-word.cycle-in { animation: cycleIn 0.45s ease; }
@keyframes cycleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-sub {
  font-size: 18px;
  max-width: 760px;
  margin-bottom: 2em;
}
.hero-actions { display: flex; gap: 16px; margin-bottom: 72px; flex-wrap: wrap; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.stat-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-tint);
  flex-shrink: 0;
  gap: 2px;
  text-align: center;
}
.stat-icon { font-size: 18px; color: var(--accent-dark); opacity: 0.72; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  color: var(--accent);
  font-weight: 500;
  line-height: 1;
}
.stat-label { font-size: 13.5px; color: var(--ink-soft); max-width: 20ch; }

/* ==================== WORK / FILTERS ==================== */
.work {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px 40px;
}
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.filters { margin-bottom: 40px; }
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-divider { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }
.pill {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color .28s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(155deg, var(--accent-tint), #fff 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  transition: transform 0.4s ease;
}
.project-card:hover .card-media img { transform: scale(1.035); }
.card-status {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  z-index: 2;
}
.status-Live { background: var(--live-bg); color: var(--live); }
.status-In.Progress, .status-In-Progress { background: var(--progress-bg); color: var(--progress); }
.status-Concept { background: var(--concept-bg); color: var(--concept); }

.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 20px; margin-bottom: 0; }
.card-summary { font-size: 14.5px; margin-bottom: 4px; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-tint);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-cta {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-cta svg { transition: transform 0.2s ease; }
.project-card:hover .card-cta svg { transform: translateX(4px); }

.empty-state { text-align: center; padding: 60px 0; color: var(--ink-soft); }

/* ==================== ABOUT ==================== */
.about {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.about-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 30ch; }

.about-side { display: flex; flex-direction: column; }
.headshot {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
}
.headshot img { width: 100%; height: auto; display: block; }

/* ---- credentials row: education + certification, side by side ---- */
.about-extra {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 56px;
}
.extra-card {
  flex: 1 1 300px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.extra-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-size: 24px;
}
.extra-cert-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.extra-cert-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.extra-copy { display: flex; flex-direction: column; gap: 4px; }
.extra-title { font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.3; }
.extra-sub { font-size: 13.5px; color: var(--ink-soft); }
.extra-card-cert {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.extra-card-cert:hover,
.extra-card-cert:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.extra-cta {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.extra-cta .material-symbols-rounded { font-size: 15px; }

/* ---- toolkit: one full-width chip row ---- */
.toolkit-strip {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.toolkit-strip-label {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  flex-shrink: 0;
}
.toolkit-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1px solid var(--accent-tint-2);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
}
.chip .material-symbols-rounded { font-size: 16px; opacity: 0.8; }

/* ==================== CONTACT ==================== */
.contact {
  background: var(--ink);
  color: var(--white);
  margin-top: 40px;
}
.contact-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 110px 32px;
  text-align: center;
}
.contact h2 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contact .section-sub { color: #C7CBD3; margin: 0 auto 2em; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact .btn-ghost { border-color: rgba(255,255,255,0.4); color: var(--white); }
.contact .btn-ghost:hover { background: var(--white); color: var(--ink); }

.site-footer {
  background: var(--ink);
  color: #8890A0;
  text-align: center;
  padding: 24px 32px 40px;
  font-size: 13px;
}
.site-footer p { color: inherit; margin: 0; }

/* ==================== REVEAL ANIMATION ==================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.project-card.reveal { transition-delay: var(--d, 0s); }

/* ==================== DEVICE FRAME PRESENTATION (modal) ==================== */
.frame-shot { max-width: 100%; margin: 0 auto; display: block; }
.frame-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 8px 0 36px;
}
.frame-row .frame-desktop { flex: 1 1 560px; max-width: min(620px, 100%); min-width: 0; }

/* ---- interactive scrollable phone mockup ---- */
.phone-frame {
  width: 230px;
  aspect-ratio: 9 / 19.3;
  background: #1B1B1F;
  border-radius: 42px;
  padding: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
  flex: 0 0 auto;
}
.phone-frame.phone-frame-sm {
  width: 168px;
  border-radius: 32px;
  padding: 9px;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  background: var(--white);
}
.phone-frame.phone-frame-sm .phone-screen { border-radius: 22px; }
.phone-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.25) transparent;
  cursor: grab;
  touch-action: pan-y;
}
.phone-scroll.is-dragging { cursor: grabbing; }
.phone-scroll::-webkit-scrollbar { width: 5px; }
.phone-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 3px; }
.phone-scroll img {
  width: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 18px;
  background: #1B1B1F;
  border-radius: 10px;
  z-index: 3;
  pointer-events: none;
}
.phone-frame.phone-frame-sm .phone-notch { top: 9px; height: 14px; }
.phone-home {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.55);
  z-index: 3;
  pointer-events: none;
}
.phone-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(20,20,26,0.55);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 4;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.phone-hint .material-symbols-rounded { font-size: 13px; }
.phone-hint.is-hidden { opacity: 0; }

/* ==================== MODAL ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 36, 48, 0.55);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg);
  width: min(920px, 100%);
  max-height: 92vh;
  border-radius: 22px;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal-scroll { max-height: 92vh; overflow-y: auto; overflow-x: hidden; padding: 56px 48px 64px; }
.modal-close {
  position: sticky;
  float: right;
  top: 18px;
  margin-right: 18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--ink); color: var(--white); }

/* ==================== CERTIFICATE LIGHTBOX ==================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 36, 48, 0.82);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.lightbox-overlay.is-open { opacity: 1; pointer-events: auto; }
.lightbox-img {
  max-width: min(880px, 100%);
  max-height: 88vh;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: block;
  transform: scale(0.97);
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
}
.lightbox-overlay.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  z-index: 1101;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: var(--ink); color: var(--white); }

.ms-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ms-eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 10px; }
.ms-title { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 6px; }
.ms-subtitle { font-size: 16px; color: var(--ink-soft); max-width: 60ch; margin-bottom: 22px; }
.ms-scope { font-size: 13.5px; color: var(--ink-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.ms-scope b { color: var(--ink); font-weight: 600; }
.ms-scope span { display: inline-flex; align-items: center; gap: 6px; }
.ms-ico { font-size: 16px; color: var(--accent); }

.ms-section { margin-bottom: 36px; }
.ms-section h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 12px; }
.ms-section p { font-size: 15.5px; color: var(--ink); }
.ms-section ul { margin: 0; padding-left: 20px; color: var(--ink); font-size: 15.5px; }
.ms-section li { margin-bottom: 10px; }
.ms-section li::marker { color: var(--accent); }

.ms-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.ms-result {
  background: var(--accent-tint);
  border-radius: 14px;
  padding: 18px 18px 16px;
}
.ms-result .rnum { font-family: var(--serif); font-size: 1.9rem; color: var(--accent-dark); display: block; }
.ms-result .rlabel { font-size: 12.5px; color: var(--ink-soft); }

.ms-gallery { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 8px 0 8px; }
.ms-gallery figure { margin: 0; max-width: 100%; min-width: 0; }
.ms-gallery img {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.ms-gallery figcaption { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin-top: 8px; max-width: 320px; }
.ms-gallery.tight img { max-height: 380px; width: auto; }
.ms-gallery.wide img { max-height: 520px; width: auto; }
.ms-gallery.emails img { max-height: 300px; width: auto; }

.ms-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 32px;
}

.ms-logogrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 20px; align-items: center; }
.ms-logogrid .logo-box { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display:flex; align-items:center; justify-content:center; aspect-ratio: 1; }
.ms-logogrid .logo-box.dark { background: #14161c; }
.ms-logogrid img { max-width: 100%; max-height: 100%; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links-mobile.is-open { display: flex; }
  .hero-sub { font-size: 16px; }
  /* Reserve room for the longest cycling hero word (e.g. "hold together")
     so shorter/longer words never change how many lines this wraps to,
     which would otherwise shove the rest of the page up and down. */
  .hero-cycle-line { min-height: calc(2 * 1.12em); }
  .modal-scroll { padding: 56px 22px 48px; }
  .frame-row .frame-desktop { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .hero { padding-top: 64px; }
  .work, .about { padding-left: 20px; padding-right: 20px; }
  .nav-inner { padding: 14px 20px; }
  .stat-strip { grid-template-columns: 1fr; row-gap: 24px; }
  .stat { flex-direction: row; align-items: center; gap: 16px; }
}
