/* YYC Data Solutions — dark theme */

:root {
  --bg: #000000;
  --bg-elevated: #0c0c0c;
  --surface: #141414;
  --surface-muted: #1a1a1a;
  --ink: #f8fafc;
  --ink-muted: #a1a1aa;
  --accent: #ff2b2b;
  --accent-hover: #ff5050;
  --accent-soft: rgba(255, 43, 43, 0.12);
  --solution-green: #4ade80;
  --solution-green-bright: #86efac;
  --solution-green-glow: rgba(74, 222, 128, 0.5);
  --border: #27272a;
  --radius: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.85);
  --font-sans: "Montserrat", system-ui, sans-serif;
  --max: 720px;
  /** Matches `.case-list` — wide columns for case cards & business-problem block */
  --content-wide: 960px;
  --header-h: auto;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

/* Viewport: no visible scrollbar — wheel / trackpad / keyboard scroll unchanged */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 82, 91, 0.45) transparent;
}

textarea::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

textarea::-webkit-scrollbar-track {
  background: transparent;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(82, 82, 91, 0.35);
  border-radius: 999px;
}

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

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

/* Header — logo + primary nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.site-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 56px;
  max-width: min(260px, 72vw);
  object-fit: contain;
}

/* Inline header mark */
.site-logo--mark {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(240px, 72vw);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 1rem;
}

.site-nav__link {
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav__link:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.site-nav__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Business problem — mic + transcription (matches site theme) */
.problem-hero {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 1.75rem;
  padding: clamp(1.35rem, 3.5vw, 2rem) clamp(1rem, 3vw, 1.35rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(
    165deg,
    var(--surface) 0%,
    var(--bg-elevated) 42%,
    var(--surface-muted) 100%
  );
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
}

.problem-hero__prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0;
}

.problem-hero__prompt.is-hidden {
  display: none;
}

.problem-hero__mic {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.problem-hero__mic:hover {
  background: var(--surface);
  border-color: #52525b;
  color: var(--ink);
  transform: scale(1.04);
}

.problem-hero__mic:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.problem-hero__mic svg {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1;
}

.problem-hero__wave {
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(255, 43, 43, 0.38);
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.78);
  pointer-events: none;
  animation: problem-hero-wave 1.85s ease-out infinite;
}

.problem-hero__mic .problem-hero__wave--2 {
  animation-delay: 0.45s;
}

.problem-hero__mic .problem-hero__wave--3 {
  animation-delay: 0.9s;
}

.problem-hero__mic.is-recording .problem-hero__wave {
  border-color: rgba(255, 43, 43, 0.62);
}

@keyframes problem-hero-wave {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  18% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

.problem-hero__mic-label {
  margin: 0;
  max-width: 22rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-muted);
}

.problem-hero__toggle-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.problem-hero__toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  max-width: 14rem;
  line-height: 1.4;
}

.problem-hero__ios-toggle {
  width: 56px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.problem-hero__ios-toggle::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--ink-muted);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.problem-hero__ios-toggle.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 43, 43, 0.45);
}

.problem-hero__ios-toggle.is-active::before {
  transform: translateX(26px);
  background: var(--accent);
}

.problem-hero__ios-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.problem-hero__panel {
  position: relative;
  width: 100%;
  max-width: 40rem;
  margin: 1.35rem auto 0;
  padding: 1.35rem 1.15rem 1.15rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  display: none;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-hero__panel.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.problem-hero__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.problem-hero__close:hover {
  color: var(--ink);
  background: var(--bg-elevated);
}

.problem-hero__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.problem-hero__close svg {
  width: 14px;
  height: 14px;
}

.problem-hero__mode-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 0 1rem;
  padding-right: 2rem;
}

.problem-hero__mode-btn {
  padding: 0.45rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.problem-hero__mode-btn:first-child {
  border-radius: 999px 0 0 999px;
  border-right-width: 0;
}

.problem-hero__mode-btn:last-child {
  border-radius: 0 999px 999px 0;
}

.problem-hero__mode-btn:hover:not(.is-active) {
  color: var(--ink);
  background: var(--surface-muted);
}

.problem-hero__mode-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 43, 43, 0.35);
  color: var(--ink);
}

.problem-hero__mode-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

.problem-hero__panel-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}

.problem-hero__transcript {
  min-height: 3.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  color: #d4d4d8;
  white-space: pre-wrap;
  word-break: break-word;
}

.problem-hero__voice-area.is-hidden {
  display: none;
}

.problem-hero__text-area textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
  box-sizing: border-box;
}

.problem-hero__text-area textarea::placeholder {
  color: var(--ink-muted);
}

.problem-hero__text-area textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: #52525b;
}

.problem-hero__send {
  display: block;
  width: 100%;
  max-width: 16rem;
  margin: 1rem auto 0;
  appearance: none;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.problem-hero__send:hover:not(:disabled) {
  background: var(--accent-hover);
}

.problem-hero__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.problem-hero__send:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.problem-hero__ai {
  width: 100%;
  max-width: 40rem;
  margin: 1rem auto 0;
  padding: 1.15rem 1.15rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  opacity: 0;
  transform: translateY(10px);
  display: none;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.problem-hero__ai.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.problem-hero__ai-text {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  color: #d4d4d8;
  white-space: pre-wrap;
  word-break: break-word;
}

.problem-hero__ai-text.is-loading::after {
  content: "…";
  animation: problem-hero-dots 1.2s steps(4, end) infinite;
}

@keyframes problem-hero-dots {
  0%,
  20% {
    content: "";
  }
  40% {
    content: ".";
  }
  60% {
    content: "..";
  }
  80%,
  100% {
    content: "...";
  }
}

@media (max-width: 600px) {
  .problem-hero__mic {
    width: 72px;
    height: 72px;
  }

  .problem-hero__mic svg {
    width: 28px;
    height: 28px;
  }

  .problem-hero__panel {
    padding: 1.15rem 0.85rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .problem-hero__mic .problem-hero__wave {
    animation: none;
    opacity: 0.2;
    transform: scale(1.02);
  }

  .problem-hero__panel,
  .problem-hero__ai {
    transition: none;
  }

  .problem-hero__ai-text.is-loading::after {
    animation: none;
    content: "…";
  }
}

@media (min-width: 900px) {
  .site-header__inner {
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
  }

  .site-nav {
    justify-content: flex-end;
    max-width: 52rem;
  }

  .site-nav__link {
    font-size: 0.8125rem;
  }
}

/* Hero */
.hero {
  padding: clamp(1rem, 3vw, 2.05rem) 1.5rem clamp(0.95rem, 2.4vw, 1.5rem);
}

.hero__inner {
  /* Match #who-we-are / #contact content column for one left edge site-wide */
  max-width: var(--content-wide);
  margin: 0 auto;
}

.hero__who-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  /* Inset hover fill: padding keeps copy off the highlight edge; negative margin
     keeps the text column aligned with .hero__cta-row below. */
  margin: -0.5rem -1rem;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.hero__who-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.hero__who-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Opening line: supporting context — “The best part?” is the visual hook */
.hero h1.hero__headline {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2.65vw, 1.28rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--ink-muted);
  max-width: min(38rem, 100%);
}

.hero__best-part {
  margin: 0 0 0.55rem;
  font-size: clamp(1.75rem, 5vw, 2.55rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--ink);
  /* Wider measure so the hook + lead sit in ~two lines on typical viewports */
  max-width: min(47rem, 100%);
}

.hero__lead {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--ink-muted);
  font-weight: 500;
  max-width: min(36rem, 100%);
}

.hero__lead--after-hook {
  margin-top: 0.15rem;
  font-size: 1rem;
  color: var(--ink);
  opacity: 1;
  font-weight: 600;
  line-height: 1.55;
  max-width: min(47rem, 100%);
}

.hero__lead + .hero__lead {
  margin-top: 0.55rem;
}

.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.85rem;
}

.hero__cta {
  appearance: none;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero__cta:hover {
  background: var(--accent-soft);
  color: var(--ink);
  border-color: var(--accent-hover);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero__scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.hero__scroll-hint svg {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  animation: nudge 2s ease-in-out infinite;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Interactive case stories */
.story-section {
  scroll-margin-top: 88px;
  padding: clamp(0.85rem, 2vw, 1.5rem) 1.25rem clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.story-section__intro {
  max-width: 44rem;
  margin: 0 auto 0.75rem;
  text-align: center;
}

.story-section__intro h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.story-section__intro p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.5;
}

.story-section__intro p + p {
  margin-top: 0.65rem;
}

.story-fallback {
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.story-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.story-control {
  appearance: none;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.story-control:hover:not(:disabled) {
  border-color: #52525b;
  color: var(--ink);
}

.story-control:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.story-control:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.story-control--link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-color: var(--accent);
  color: var(--ink);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(255, 43, 43, 0.35);
}

.story-control--link:hover {
  border-color: var(--accent-hover);
  color: var(--ink);
  background: rgba(255, 43, 43, 0.18);
}

.story-stage-wrap {
  display: grid;
  /* Fixed-width side rails so the stage stays centered when one arrow is [hidden] */
  grid-template-columns: minmax(5.5rem, 6.5rem) minmax(0, 1fr) minmax(5.5rem, 6.5rem);
  grid-template-areas: "prev stage next";
  gap: 0.5rem 0.65rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

/* Minimal nav: gray text/chevrons only — no panel, border, or shadow */
.story-nav {
  appearance: none;
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.25rem 0.2rem;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #71717a;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* Keep layout width when hidden so the story stage does not shift sideways */
.story-nav[hidden] {
  display: flex !important;
  visibility: hidden;
  pointer-events: none;
}

.story-nav:not([hidden]):hover {
  color: #a1a1aa;
}

.story-nav:not([hidden]):active {
  opacity: 0.85;
}

.story-nav:focus-visible {
  outline: 2px solid rgba(161, 161, 170, 0.6);
  outline-offset: 4px;
  border-radius: 4px;
}

.story-nav__chev {
  font-size: clamp(1.35rem, 3.2vw, 1.65rem);
  font-weight: 300;
  line-height: 1;
  color: inherit;
  letter-spacing: 0;
  opacity: 0.88;
}

.story-nav:not([hidden]):hover .story-nav__chev {
  opacity: 1;
}

.story-nav__label {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-align: center;
  max-width: 6rem;
  hyphens: auto;
  color: inherit;
  opacity: 0.92;
}

.story-nav--prev {
  grid-area: prev;
}

.story-nav--next {
  grid-area: next;
}

.story-stage-mid {
  grid-area: stage;
  min-width: 0;
}

.story-stage {
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 680px) {
  .story-stage-wrap {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "stage stage"
      "prev next";
    gap: 0.5rem 0.5rem;
  }

  .story-nav {
    flex-direction: row;
    justify-content: flex-start;
    min-height: unset;
    padding: 0.35rem 0.25rem;
    gap: 0.45rem;
  }

  .story-nav__label {
    text-align: left;
    max-width: none;
    flex: 1;
    font-size: 0.625rem;
  }
}

/* Fixed frame: same size for every phase and case (scroll inside if needed). */
.story-sequence {
  position: relative;
  width: 100%;
  height: 26rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.story-situation__text::-webkit-scrollbar,
.story-pain__list-scroll::-webkit-scrollbar,
.story-sequence > .story-phase--solution:not([hidden])::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

.story-situation__text::-webkit-scrollbar-track,
.story-pain__list-scroll::-webkit-scrollbar-track,
.story-sequence > .story-phase--solution:not([hidden])::-webkit-scrollbar-track {
  background: transparent;
}

.story-situation__text::-webkit-scrollbar-thumb,
.story-pain__list-scroll::-webkit-scrollbar-thumb,
.story-sequence > .story-phase--solution:not([hidden])::-webkit-scrollbar-thumb {
  background: rgba(82, 82, 91, 0.35);
  border-radius: 999px;
}

.story-situation__text::-webkit-scrollbar-thumb:hover,
.story-pain__list-scroll::-webkit-scrollbar-thumb:hover,
.story-sequence > .story-phase--solution:not([hidden])::-webkit-scrollbar-thumb:hover {
  background: rgba(113, 113, 122, 0.5);
}

.story-sequence > .story-phase:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  justify-content: flex-start;
}

/* Situation + pain: no outer scrollbar (avoids “window” clip around the pulse). */
.story-sequence > .story-phase--situation:not([hidden]),
.story-sequence > .story-phase--pain:not([hidden]) {
  overflow-y: hidden;
}

.story-sequence > .story-phase--solution:not([hidden]) {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 82, 91, 0.4) transparent;
}

.story-phase[hidden] {
  display: none !important;
}

.story-phase--situation {
  /* Hug the controls above: top-aligned, stable while the situation types */
  padding: 0.35rem 0.5rem clamp(0.75rem, 2vw, 1.25rem);
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-phase--situation.is-leaving {
  opacity: 0;
}

.story-situation__label {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
  text-align: center;
}

.story-situation__meta {
  margin: 0 auto 1rem;
  max-width: 52rem;
  text-align: center;
}

.story-situation__title {
  margin: 0 0 0.45rem;
  font-size: clamp(0.9375rem, 2vw, 1.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.35;
}

.story-situation__source {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}

.story-situation__source-k {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: var(--accent);
  margin-right: 0.35rem;
}

.story-situation__text {
  margin: 0 auto;
  max-width: 58rem;
  font-size: clamp(0.98rem, 2.2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #9ca3af;
  text-align: center;
  /* Typing grows downward; label/title/source stay put; long copy scrolls here */
  max-height: calc(26rem - 7.25rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 82, 91, 0.4) transparent;
}

.story-phase--situation .story-typed-caret {
  background: #71717a;
}

.story-typed-target {
  white-space: pre-wrap;
}

.story-typed-caret {
  display: inline-block;
  width: 0.08em;
  margin-left: 0.06em;
  height: 1em;
  vertical-align: -0.08em;
  background: var(--accent);
  animation: story-caret-blink 0.95s step-end infinite;
}

@keyframes story-caret-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.story-phase--pain {
  padding: clamp(0.75rem, 2vw, 1.5rem) 0.5rem;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-phase--pain.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.story-phase--solution {
  padding: 0.25rem 0;
}

.story-panel {
  position: relative;
  min-height: 0;
}

/* --- Pain: full-width hero + two slow smooth red pulses --- */
.story-panel--pain {
  padding: clamp(1.25rem, 3vw, 2.5rem) 1rem;
  border: none;
  background: transparent;
  box-shadow: none;
  max-width: 100%;
  overflow: visible;
}

.story-pain {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 18rem;
  margin: 0 auto;
}

.story-pain--hero {
  max-width: min(100%, 44rem);
  padding: clamp(0.5rem, 2vw, 1.25rem) 0;
  overflow: visible;
}

/* Softer, smaller glow so it isn’t hard-clipped like a “window” */
.story-pain--hero .story-pain__pulse {
  width: min(105%, 380px);
  height: 145%;
  filter: blur(8px);
}

.story-pain--hero .story-pain__title {
  font-size: 0.75rem;
  margin-bottom: 0.65rem;
}

.story-pain--hero .story-pain__list {
  font-size: clamp(0.92rem, 2vw, 1.12rem);
  font-weight: 500;
  color: #9ca3af;
}

.story-pain--hero .story-pain__list li + li {
  margin-top: 0.4rem;
}

.story-pain__list-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  max-height: calc(26rem - 10.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 82, 91, 0.4) transparent;
}

.story-pain__pulse {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(110%, 320px);
  height: 160%;
  transform: translate(-50%, -50%) scale(0.72);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 43, 43, 0.5) 0%,
    rgba(255, 43, 43, 0.14) 42%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: blur(3px);
}

.story-pain__title {
  position: relative;
  z-index: 1;
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #9ca3af;
}

.story-pain__list {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: inline-block;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  line-height: 1.45;
}

.story-pain__list li {
  position: relative;
  padding-left: 1rem;
}

.story-pain__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #71717a;
  box-shadow: none;
}

.story-pain__list li + li {
  margin-top: 0.28rem;
}

/* --- Solution: no frame, centered, fade-in only --- */
.story-panel--solution,
.story-solution-card {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem) 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.story-solution__body {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.story-panel__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.story-solution__head {
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.story-solution-card .story-panel__lead {
  text-align: center;
}

.story-solution-steps {
  margin: 0 0 1rem;
  text-align: center;
}

.story-solution__steps {
  margin: 0;
  display: inline-block;
  max-width: 38rem;
  width: 100%;
  text-align: left;
  font-size: clamp(0.9375rem, 2.1vw, 1.0625rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.58;
  white-space: pre-wrap;
  min-height: 2.75rem;
  letter-spacing: -0.01em;
}

.story-solution-typed-caret {
  display: inline-block;
  width: 0.08em;
  margin-left: 0.06em;
  height: 1em;
  vertical-align: -0.08em;
  background: var(--solution-green-bright);
  animation: story-caret-blink 0.95s step-end infinite;
}

.story-solution-card .story-panel__result {
  text-align: center;
}

.story-solution-card .story-panel__title.story-solution__title {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.story-solution-card .story-solution__lead {
  font-size: clamp(1.02rem, 2.25vw, 1.15rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

html.story-enhance .story-section .story-solution__result.story-solution-result--pending {
  opacity: 0;
}

html.story-enhance .story-section .story-solution__result.story-solution-result--shown {
  opacity: 1;
  transition: opacity 3s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-panel__logo {
  height: 34px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  flex-shrink: 0;
}

.story-panel__logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.story-panel__title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.story-solution__title {
  color: var(--solution-green-bright);
}

.story-panel__lead {
  margin: 0 0 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.story-panel__list {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.52;
}

.story-panel__list li + li {
  margin-top: 0.28rem;
}

.story-panel__result {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--solution-green);
  line-height: 1.5;
}

.story-solution__result {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--solution-green);
  line-height: 1.5;
}

/* ~6.8s: two slow, smooth swells (no rapid double-beat or long trailing fade) */
@keyframes story-pain-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62);
  }
  10% {
    opacity: 0.52;
    transform: translate(-50%, -50%) scale(0.86);
  }
  22% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.99);
  }
  34% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(0.91);
  }
  42% {
    opacity: 0.06;
    transform: translate(-50%, -50%) scale(0.86);
  }
  52% {
    opacity: 0.48;
    transform: translate(-50%, -50%) scale(0.93);
  }
  64% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(1.02);
  }
  76% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.94);
  }
  86% {
    opacity: 0.05;
    transform: translate(-50%, -50%) scale(1.04);
  }
  100% {
    opacity: 0.04;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes story-pain-reveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes story-solution-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html.story-enhance .story-section .story-panel.story-panel--pain,
html.story-enhance .story-section .story-panel.story-panel--solution {
  transition: none;
}

html.story-enhance
  .story-section
  .story-panel.story-panel--pain:not(.story-panel--in-pain)
  .story-pain {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(3px);
}

html.story-enhance .story-section .story-panel.story-panel--in-pain .story-pain {
  animation: story-pain-reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.story-enhance .story-section .story-panel.story-panel--in-pain .story-pain__pulse {
  animation: story-pain-pulse 6.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

html.story-enhance
  .story-section
  .story-panel.story-panel--solution:not(.story-panel--in-solution) {
  opacity: 0;
}

html.story-enhance .story-section .story-panel.story-panel--in-solution {
  animation: story-solution-fade-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Manual return to pain: calm pulse (no repeat animation) */
html.story-enhance
  .story-section.story-section--pain-nav-static
  .story-panel.story-panel--in-pain
  .story-pain__pulse {
  animation: none;
  opacity: 0.1;
  transform: translate(-50%, -50%) scale(1.18);
}

@media (prefers-reduced-motion: reduce) {
  html.story-enhance
    .story-section
    .story-panel.story-panel--pain:not(.story-panel--in-pain)
    .story-pain {
    opacity: 1;
    transform: none;
    filter: none;
  }

  html.story-enhance .story-section .story-panel.story-panel--in-pain .story-pain {
    animation: none;
  }

  html.story-enhance .story-section .story-typed-caret,
  html.story-enhance .story-section .story-solution-typed-caret {
    animation: none;
    opacity: 1;
  }

  html.story-enhance
    .story-section
    .story-solution__result.story-solution-result--shown {
    transition: none;
    opacity: 1;
  }

  html.story-enhance .story-section .story-panel.story-panel--in-pain .story-pain__pulse {
    animation: none;
    opacity: 0.22;
    transform: translate(-50%, -50%) scale(1);
    filter: none;
  }

  html.story-enhance
    .story-section
    .story-panel.story-panel--solution:not(.story-panel--in-solution) {
    opacity: 1;
    transform: none;
    filter: none;
  }

  html.story-enhance .story-section .story-panel.story-panel--in-solution {
    animation: none;
  }
}

/* Content sections */
.page-section {
  scroll-margin-top: 88px;
  padding: clamp(2rem, 4vw, 2.75rem) 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-section__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.page-section h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-section p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
}

.page-section p + p {
  margin-top: 0.75rem;
}

#your-business-problem .business-problem__privacy-note {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-muted);
}

#your-business-problem .business-problem__privacy-note strong {
  font-weight: 700;
  color: #c4c4cc;
}

.page-section--emphasis {
  background: var(--bg-elevated);
}

#your-business-problem .page-section__inner,
#who-we-are .page-section__inner,
#contact .page-section__inner {
  max-width: var(--content-wide);
}

.contact-block {
  margin-top: 0.15rem;
}

.page-section--contact .contact-block__intro {
  margin: 0;
}

.page-section--contact .contact-block__intro + .contact-block__intro {
  margin-top: 0.75rem;
}

/* Canadian flag — contact line + site footer (inline with text, no baseline gap) */
.ca-flag-icon {
  display: inline-block;
  margin-left: 0.28em;
  line-height: 0;
  vertical-align: middle;
}

.ca-flag-icon img {
  display: block;
  width: auto;
  height: 0.85em;
  max-height: 14px;
  margin: 0;
}

.site-footer .ca-flag-icon {
  margin-left: 0.22em;
}

.page-section--contact .contact-block__phone-wrap {
  margin: 0.85rem 0 0;
}

.page-section--contact .contact-block__phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.page-section--contact .contact-block__phone-link:hover {
  color: var(--accent-hover);
}

.page-section--contact .contact-block__phone-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  /* B&W PNG: true inversion — black → white, white → black */
  filter: invert(1);
}

.page-section--contact .contact-block__phone-link:hover .contact-block__phone-icon {
  filter: invert(1) brightness(1.08);
}

.page-section--contact .contact-block__email-wrap {
  margin: 0.55rem 0 0;
}

.page-section--contact .contact-block__address-wrap {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.page-section--contact .contact-block__address-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.page-section--contact .contact-block__address {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* Match content width to “Tell us…” / email form: full width of --content-wide inner */
.who-we-are__intro {
  max-width: none;
}

.who-we-are__intro strong {
  color: var(--ink);
  font-weight: 700;
}

.who-we-are__team {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 2.25rem) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: none;
}

.who-we-are__profile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.65rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.who-we-are__profile-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.85rem, 2.5vw, 1.15rem);
  min-width: 0;
}

.who-we-are__photo-wrap {
  flex-shrink: 0;
  margin: 0;
  line-height: 0;
}

.who-we-are__photo {
  display: block;
  width: 96px;
  height: 96px;
  max-width: min(96px, 26vw);
  max-height: min(96px, 26vw);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--surface-muted);
}

.who-we-are__icon-badge {
  box-sizing: border-box;
  width: 96px;
  height: 96px;
  max-width: min(96px, 26vw);
  max-height: min(96px, 26vw);
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.who-we-are__icon-badge svg {
  width: 44px;
  height: 44px;
}

.who-we-are__head {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  /* One rhythm between name, title, and email */
  gap: 0.2rem;
}

.who-we-are__name {
  margin: 0;
  padding: 0;
  margin-block: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.who-we-are__role {
  margin: 0;
  padding: 0;
  margin-block: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  line-height: 1.15;
}

.who-we-are__email {
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.who-we-are__email-link {
  font-family: var(--font-sans);
  font-size: inherit;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
  word-break: break-all;
  line-height: inherit;
  transition: color 0.15s ease;
}

.who-we-are__email-link:hover {
  color: var(--accent-hover);
}

.who-we-are__email-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.who-we-are__bio-block {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.who-we-are__bio {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink-muted);
}

.who-we-are__bio-block .who-we-are__bio + .who-we-are__bio {
  margin-top: 0.75rem;
}

.who-we-are__bio-note {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  opacity: 0.85;
}

.who-we-are__bio-link {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.who-we-are__bio-link:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.who-we-are__bio-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Cases */
.cases {
  padding: clamp(2rem, 4vw, 2.75rem) 1.5rem 4rem;
}

.cases__intro {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
}

.cases__intro h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cases__intro p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.case-list {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow);
}

.case-card--placeholder {
  border-style: dashed;
  border-color: #3f3f46;
  background: var(--surface-muted);
  box-shadow: none;
}

.case-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.case-card__label {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
}

.case-card__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.case-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
}

.case-card__body {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
  font-weight: 500;
}

.case-card__body + .case-card__body {
  margin-top: 1rem;
}

.case-card__note {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-style: italic;
  font-weight: 500;
}

/* Portfolio — explore cases in detail */
.page-section__inner--portfolio {
  max-width: var(--content-wide);
}

.page-section__inner--portfolio h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-section__inner--portfolio p {
  max-width: 52rem;
}

.page-section__inner--portfolio strong {
  color: #e4e4e7;
  font-weight: 700;
}

/* Portfolio — project work (placeholder + note) */
.portfolio-soon {
  scroll-margin-top: 88px;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.portfolio-soon__sub {
  display: block;
  margin: 0 0 clamp(1.5rem, 3.5vw, 2.5rem);
  padding: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
  max-width: 40rem;
}

.portfolio-soon__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 1.5rem);
  max-width: 52rem;
  margin-top: 0;
  margin-bottom: 2rem;
}

.portfolio-soon__speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 0.45rem;
  width: min(100%, 6.5rem);
}

.portfolio-soon__avatar-link {
  display: block;
  line-height: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-soon__avatar-link:hover {
  border-color: #3f3f46;
  box-shadow: 0 12px 36px -18px rgba(0, 0, 0, 0.9);
}

.portfolio-soon__avatar-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.portfolio-soon__avatar {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-muted);
}

.portfolio-soon__name-link {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.portfolio-soon__name-link:hover {
  color: var(--accent);
}

.portfolio-soon__name-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.portfolio-soon__bubble {
  position: relative;
  flex: 1;
  min-width: min(100%, 16rem);
  margin: 0;
  padding: clamp(1.1rem, 2.5vw, 1.35rem) clamp(1.15rem, 2.8vw, 1.5rem);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portfolio-soon__bubble::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 28px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 9px solid var(--border);
}

.portfolio-soon__bubble::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 29px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--surface);
}

@media (max-width: 520px) {
  .portfolio-soon__bubble::before,
  .portfolio-soon__bubble::after {
    display: none;
  }

  .portfolio-soon__row {
    flex-direction: column;
    align-items: stretch;
  }

  .portfolio-soon__speaker {
    flex-direction: row;
    width: auto;
    align-items: center;
    gap: 0.75rem;
  }
}

.portfolio-soon__hi {
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.portfolio-soon__bubble > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
}

.portfolio-soon__bubble > p + p {
  margin-top: 0.75rem;
}

.portfolio-soon__inline-link {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.portfolio-soon__inline-link:hover {
  color: var(--accent-hover);
}

.portfolio-soon__inline-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.portfolio-soon__signoff {
  margin-top: 1rem !important;
  font-weight: 600 !important;
  color: #d4d4d8 !important;
}

.portfolio-soon__footer-links {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.portfolio-soon__footer-links a {
  white-space: nowrap;
}

.cases--detail .cases__intro--detail {
  max-width: var(--content-wide);
  margin-bottom: 1.25rem;
}

.cases__tag-shell {
  max-width: var(--content-wide);
  margin: 0 auto 1.15rem;
}

.cases__tag-label {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.cases-tag-filter--flat {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.cases-tag-filter--grouped {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.cases-tag-filter__all {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  align-items: flex-start;
}

.cases-tag-filter__group {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.cases-tag-filter__group-title {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.cases-tag-filter__group-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.cases-tag-filter__btn {
  appearance: none;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-muted);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.cases-tag-filter__btn:hover {
  border-color: #52525b;
  color: var(--ink);
}

.cases-tag-filter__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cases-tag-filter__btn.is-active {
  border-color: rgba(255, 43, 43, 0.45);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 43, 43, 0.2);
}

.case-detail {
  scroll-margin-top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow);
}

.case-detail__head {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.case-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.65rem;
}

.case-detail__tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 43, 43, 0.28);
  background: rgba(255, 43, 43, 0.08);
  color: #fca5a5;
}

.case-detail__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.12rem, 2.4vw, 1.32rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.case-detail__source {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}

.case-detail__source-k {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: var(--ink-muted);
  margin-right: 0.35rem;
}

.case-detail__body {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.case-detail__section {
  margin: 0;
}

.case-detail__k {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.case-detail__p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink-muted);
}

.case-detail__p--intro {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-weight: 600;
}

.case-detail__p--result {
  color: #d4d4d8;
  font-weight: 600;
}

.case-detail__section ul {
  margin: 0;
  padding: 0 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
}

.case-detail__section li + li {
  margin-top: 0.4rem;
}

.case-detail__section--solution {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: rgba(74, 222, 128, 0.06);
}

.case-detail__section--solution .case-detail__k {
  color: var(--solution-green-bright);
}

.case-detail__section--result {
  padding-top: 0.25rem;
}

.cases-detail__empty {
  margin: 0;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cases-detail__empty code {
  font-size: 0.85em;
  color: #d4d4d8;
}

.cases-detail__noscript {
  max-width: var(--content-wide);
  margin: 1.5rem auto 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Team profile — Yury */
.profile-page__hero {
  scroll-margin-top: 88px;
}

.profile-page__hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(1.25rem, 4vw, 2rem);
  max-width: var(--content-wide);
}

.profile-page__photo-wrap {
  flex-shrink: 0;
  line-height: 0;
}

.profile-page__photo {
  display: block;
  width: clamp(120px, 28vw, 160px);
  height: clamp(120px, 28vw, 160px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow);
}

.profile-page__intro {
  flex: 1;
  min-width: min(100%, 16rem);
}

.profile-page__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.profile-page__name {
  margin: 0 0 0.2rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.profile-page__role-row {
  margin: 0 0 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  max-width: 40rem;
  line-height: 1.35;
}

.profile-page__role-row .profile-page__role {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
}

.profile-page__role-sep {
  color: #52525b;
  font-weight: 700;
  user-select: none;
}

.profile-page__role-row .profile-page__email {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.profile-page__email:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.profile-page__email:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.profile-page__lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.55;
  color: #d4d4d8;
}

.profile-page__content {
  scroll-margin-top: 88px;
  border-bottom: none;
}

.profile-page__prose {
  max-width: 40rem;
}

.profile-page__message-start {
  scroll-margin-top: 96px;
}

.profile-page__prose > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.65;
}

.profile-page__prose > p + p {
  margin-top: 0.85rem;
}

.profile-page__h2 {
  margin: clamp(1.75rem, 3vw, 2.15rem) 0 0.55rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.profile-page__h2 + p {
  margin-top: 0;
}

.profile-page__h2--pull {
  margin-top: clamp(1.85rem, 3vw, 2.35rem);
  color: var(--accent);
}

.profile-page__closing {
  margin-top: 1.35rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}

.profile-page__back {
  margin-top: 2rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.profile-page__back a {
  font-weight: 600;
}

.who-we-are__name-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.who-we-are__name-link:hover {
  color: var(--accent);
}

.who-we-are__profile-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.site-footer p {
  margin: 0;
}
