/* Homepage-only responsive refinements. Desktop choreography stays untouched. */
@media (max-width: 980px) {
  .scroll-story .site-header {
    padding-top: max(14px, env(safe-area-inset-top));
  }

  .scroll-story .nav.open .nav-links {
    top: calc(100% + 12px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .scroll-story .hero {
    min-height: auto;
    padding: 124px 0 76px;
    overflow-x: clip;
  }

  .scroll-story .hero-grid {
    gap: 42px;
  }

  .scroll-story .hero-copy-block {
    max-width: 760px;
  }

  .scroll-story .hero h1 {
    max-width: 760px;
    font-size: clamp(58px, 9.8vw, 78px);
  }

  .scroll-story .hero-copy {
    max-width: 660px;
  }

  .scroll-story .hero-visual-slot {
    margin-top: 2px;
  }

  #work > .container {
    width: 100%;
    padding-inline: 24px;
    box-sizing: border-box;
  }

  #work .work-story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #work .work-hook {
    grid-row: 1;
  }

  #work .work-hook-inner {
    padding-bottom: 48px;
  }

  #work .work-list {
    grid-row: 2;
    min-width: 0;
  }

  #work .work-card {
    max-width: 100%;
  }

  #why .why-story-inner {
    width: min(calc(100% - 48px), var(--max));
  }

  #why .why-story-copy {
    max-width: 720px;
  }

  #contact.section {
    padding: 96px 0 82px;
  }

  #contact .portal-cta-wrap {
    padding: clamp(38px, 6vw, 52px);
    border-radius: 28px;
  }
}

@media (max-width: 650px) {
  .scroll-story .site-header {
    padding: max(11px, env(safe-area-inset-top)) 0 11px;
  }

  .scroll-story .brand {
    gap: 10px;
  }

  .scroll-story .brand img {
    width: 32px;
    height: 32px;
  }

  .scroll-story .brand-text strong {
    letter-spacing: .15em;
  }

  .scroll-story .menu-btn {
    min-width: 42px;
    min-height: 42px;
    display: grid;
    place-items: center;
    margin-right: -8px;
  }

  .scroll-story .nav.open .nav-links {
    left: 14px;
    right: 14px;
    padding: 10px;
    border-radius: 17px;
  }

  .scroll-story .nav.open .nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 10px;
  }

  .scroll-story .hero {
    padding: 104px 0 50px;
  }

  .scroll-story .hero-grid {
    gap: 24px;
  }

  .scroll-story .kicker {
    gap: 9px;
    font-size: 9px;
    letter-spacing: .19em;
  }

  .scroll-story .kicker::before {
    width: 21px;
  }

  .scroll-story .hero h1 {
    margin: 20px 0 22px;
    max-width: 100%;
    font-size: clamp(46px, 13.5vw, 54px);
    line-height: .92;
    letter-spacing: -.06em;
  }

  .scroll-story .hero-copy {
    font-size: 15px;
    line-height: 1.68;
  }

  .scroll-story .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    margin-top: 28px;
  }

  .scroll-story .hero-actions .btn {
    min-width: 0;
    min-height: 50px;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .scroll-story .micro-proof {
    gap: 10px 16px;
    margin-top: 28px;
    font-size: 9px;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: 350px;
  }

  #work.section {
    padding: 76px 0 96px;
  }

  #work > .container {
    padding-inline: 14px;
  }

  #work .work-hook-inner {
    padding: 0 5px 36px;
  }

  #work .work-hook .section-index {
    margin-bottom: 20px;
  }

  #work .work-hook .section-title {
    font-size: clamp(40px, 12vw, 48px);
    line-height: .97;
  }

  #work .work-card,
  #work .work-card:nth-child(2),
  #work .work-card:nth-child(3),
  #work .work-card:nth-child(4),
  #work .work-card:nth-child(5) {
    height: clamp(560px, 75svh, 610px);
    min-height: 560px;
    border-radius: 22px;
  }

  #work .work-info,
  #work .work-card:nth-child(even) .work-info {
    padding: 26px 22px 23px;
  }

  #work .work-num {
    top: 23px;
    left: 22px;
    max-width: calc(100% - 44px);
    line-height: 1.45;
  }

  #work .work-info h3 {
    margin-bottom: 11px;
    font-size: clamp(44px, 14vw, 54px);
  }

  #work .work-info p {
    max-width: 100%;
    font-size: 12.5px;
  }

  #work .tags,
  #work .work-card:nth-child(even) .tags {
    margin-top: 14px;
  }

  #work .text-link {
    min-height: 44px;
    margin-top: 17px;
  }

  #why.why-story {
    padding: 82px 0 !important;
  }

  #why .why-story-inner {
    width: min(calc(100% - 28px), var(--max));
  }

  #why .section-title {
    font-size: clamp(38px, 11vw, 43px);
    line-height: .98;
  }

  #why .section-subtitle {
    font-size: 15px;
    line-height: 1.65;
  }

  #why .why-mobile-list {
    gap: 9px;
    margin-top: 38px;
  }

  #why .why-mobile-item {
    border-radius: 16px;
  }

  #why .why-mobile-item button {
    min-height: 58px;
    padding-inline: 16px;
  }

  #why .why-mobile-item p {
    padding: 0 16px 18px;
    font-size: 13.5px;
  }

  #process .process-shell {
    width: calc(100% - 28px);
    padding: 82px 0 72px;
  }

  #process .process-heading {
    margin-bottom: 54px;
  }

  #process .process-intro {
    margin-top: 29px;
  }

  #process .process-intro h2 {
    font-size: clamp(36px, 10.7vw, 44px);
    line-height: .96;
  }

  #process .process-intro > p {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.62;
  }

  #process .process-track-heading {
    gap: 18px;
    line-height: 1.35;
  }

  #process .process-track {
    gap: 20px;
    padding: 32px 0 36px;
  }

  #process .process-card {
    min-height: 330px;
    padding-right: 14px;
  }

  #process .process-card-top {
    margin-bottom: 54px;
  }

  #process .process-phase {
    font-size: clamp(36px, 11vw, 42px);
  }

  #process .process-card h3 {
    font-size: 19px;
  }

  #process .process-card p {
    font-size: 14px;
    line-height: 1.58;
  }

  #process .process-controls {
    gap: 16px 20px;
  }

  #contact.section {
    padding: 76px 0 64px;
  }

  #contact > .container {
    width: min(calc(100% - 28px), var(--max));
  }

  #contact .portal-cta-wrap {
    gap: 28px;
    padding: 30px 26px;
    border-radius: 25px;
  }

  #contact .portal-cta-wrap h2 {
    margin-top: 3px;
    max-width: 100%;
    font-size: clamp(40px, 11.5vw, 46px);
    line-height: .94;
  }

  #contact .portal-cta-wrap p {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.65;
  }

  #contact .portal-cta-btn {
    min-height: 54px;
  }

  .scroll-story .site-footer {
    padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  }

  .scroll-story .footer-grid {
    gap: 18px;
  }

  .scroll-story .footer-meta {
    font-size: 10px;
    line-height: 1.65;
  }
}

@media (max-width: 370px) {
  .scroll-story .brand-text strong {
    font-size: 10px;
    letter-spacing: .13em;
  }

  .scroll-story .hero h1 {
    font-size: clamp(43px, 13.4vw, 49px);
  }

  .scroll-story .hero-actions .btn {
    font-size: 11px;
  }

  #contact .portal-cta-wrap {
    padding: 28px 22px;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 980px) {
  .scroll-story .nav.open .nav-links {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.mobile-card-snap {
  display: none;
}

/* Full-screen chapter snapping for touch and tablet layouts. */
@media (max-width: 980px) {
  html {
    scroll-snap-type: none;
    scroll-padding-top: 0;
  }

  body.scroll-story {
    overflow-x: hidden;
    --mobile-chapter-surface: var(--story-dark);
    --mobile-chapter-ink: #f5f6f7;
  }

  body.scroll-story.story-light {
    --mobile-chapter-surface: var(--story-light);
    --mobile-chapter-ink: var(--story-ink);
  }

  body.scroll-story.story-ready {
    touch-action: none;
    overscroll-behavior-y: none;
  }

  .scroll-story .site-header.story-hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
  }

  .scroll-story .hero,
  #why,
  #process,
  #contact,
  #work .work-hook,
  #work .mobile-card-snap {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  #work .mobile-card-snap {
    display: block;
    position: absolute;
    left: 0;
    height: 1px;
    width: 1px;
    pointer-events: none;
  }

  .scroll-story .hero {
    height: 100svh;
    min-height: 100svh;
    overflow: clip;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: 330px;
  }

  #work,
  #contact {
    background: var(--story-dark);
  }

  #work,
  #why,
  #process {
    background-color: var(--mobile-chapter-surface) !important;
    color: var(--mobile-chapter-ink);
    transition: none !important;
  }

  .scroll-story.story-light #work,
  .scroll-story.story-light #why,
  .scroll-story.story-light #process {
    background: var(--story-light);
    color: var(--story-ink);
  }

  .scroll-story.story-contact-dark #why,
  .scroll-story.story-contact-dark #process {
    background: var(--story-dark);
    color: #f5f6f7;
  }

  #work .work-card {
    transition: opacity .24s var(--ease);
  }

  .scroll-story.story-light #work .work-card {
    background: #eae9e4;
    border-color: rgba(0, 0, 0, .14);
    color: var(--story-ink);
    box-shadow: 0 28px 84px rgba(42, 40, 34, .12), 0 1px 0 rgba(255, 255, 255, .72) inset;
  }

  .scroll-story.story-light #work .work-num,
  .scroll-story.story-light #work .work-info p {
    color: #65675f;
  }

  .scroll-story.story-light #work .tag {
    color: #555750;
    border-color: rgba(0, 0, 0, .14);
    background: rgba(255, 255, 255, .38);
  }

  .scroll-story.story-light #work .work-media {
    background: radial-gradient(circle at 50% 35%, rgba(188, 166, 125, .13), transparent 60%), linear-gradient(135deg, #e4e2dc, #cfcdc6);
  }

  #why {
    min-height: 100svh;
    overflow: clip;
  }

  #process.process-section {
    height: 100svh;
    min-height: 100svh;
    overflow: clip;
  }

  #process .process-shell {
    height: 100%;
    min-height: 0;
  }

  #contact.section {
    position: relative;
    z-index: 4;
    min-height: 100svh;
    display: grid;
    align-items: center;
    overflow: clip;
  }

  #work .work-list {
    padding-bottom: 82px !important;
  }

  #work .work-list::after {
    content: "";
    display: block;
    height: 11vh;
  }

  .scroll-story .site-footer {
    position: relative;
    z-index: 5;
    background: var(--story-dark);
    scroll-snap-align: end;
    scroll-snap-stop: always;
  }
}

@media (max-width: 650px) {
  html {
    scroll-snap-type: none;
  }

  .scroll-story .hero {
    min-height: 100svh;
    padding: 94px 0 18px;
  }

  .scroll-story .hero-grid {
    gap: 4px;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: 240px;
  }

  #work .work-list {
    display: block;
    padding-bottom: 76px !important;
  }

  #work .work-list::after {
    height: 14svh;
  }

  #work.section {
    overflow: visible;
  }

  #work .work-card,
  #work .work-card:nth-child(2),
  #work .work-card:nth-child(3),
  #work .work-card:nth-child(4),
  #work .work-card:nth-child(5) {
    position: sticky;
    height: calc(100svh - 96px);
    min-height: 560px;
    max-height: 720px;
    margin-bottom: 14svh;
    transform-origin: 50% 0;
    box-shadow: 0 28px 84px rgba(0, 0, 0, .52), 0 1px 0 rgba(255, 255, 255, .035) inset;
  }

  #work .work-card:nth-child(1) { top: 76px; z-index: 1; }
  #work .work-card:nth-child(2) { top: 82px; z-index: 2; }
  #work .work-card:nth-child(3) { top: 88px; z-index: 3; }
  #work .work-card:nth-child(4) { top: 94px; z-index: 4; }
  #work .work-card:nth-child(5) { top: 100px; z-index: 5; margin-bottom: 0; }

  #why.why-story {
    min-height: 100svh;
    padding: 76px 0 24px !important;
    display: flex;
    align-items: center;
  }

  #why .why-mobile-list {
    gap: 7px;
    margin-top: 26px;
  }

  #why .why-mobile-item button {
    min-height: 54px;
  }

  #process .process-shell {
    width: calc(100% - 28px);
    padding: 78px 0 18px;
    justify-content: flex-start;
  }

  #process .process-heading {
    margin-bottom: 20px;
  }

  #process .process-intro {
    margin-top: 16px;
  }

  #process .process-intro h2 {
    font-size: clamp(34px, 10vw, 40px);
  }

  #process .process-intro > p {
    max-width: 330px;
    margin-top: 11px;
    font-size: 13px;
    line-height: 1.48;
  }

  #process .process-track-heading {
    padding-bottom: 12px;
    font-size: 8px;
  }

  #process .process-track {
    flex: 1 1 auto;
    min-height: 0;
    gap: 20px;
    padding: 17px 0 16px;
    align-items: stretch;
  }

  #process .process-card {
    height: 100%;
    min-height: 0;
    padding-right: 12px;
  }

  #process .process-card-top {
    margin-bottom: 28px;
  }

  #process .process-phase {
    font-size: clamp(34px, 10.5vw, 39px);
  }

  #process .process-phase::after {
    margin-top: 13px;
  }

  #process .process-card h3 {
    margin-bottom: 9px;
    font-size: 17px;
  }

  #process .process-card p {
    font-size: 13px;
    line-height: 1.5;
  }

  #process .process-controls {
    gap: 5px 14px;
    padding-top: 10px;
  }

  #process .process-range {
    height: 28px;
  }

  #process .process-arrow {
    width: 40px;
    height: 40px;
  }

  #contact.section {
    padding: 74px 0 32px;
  }
}

@media (max-width: 370px) {
  .scroll-story .hero {
    padding-top: 86px;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: 205px;
  }

  #why.why-story {
    padding-top: 70px !important;
    padding-bottom: 18px !important;
  }

  #why .section-subtitle {
    font-size: 13.5px;
  }

  #why .why-mobile-list {
    margin-top: 20px;
  }

  #why .why-mobile-item button {
    min-height: 50px;
  }

  #process .process-shell {
    padding-top: 70px;
  }

  #process .process-heading {
    margin-bottom: 15px;
  }

  #process .process-intro h2 {
    font-size: 33px;
  }

  #process .process-intro > p {
    font-size: 12px;
  }
}


/* Short desktop viewport fit */
@media (min-width: 981px) and (max-height: 900px) {
  .scroll-story .hero {
    min-height: 100svh;
    padding: 94px 0 28px;
  }

  .scroll-story .hero-grid {
    gap: clamp(34px, 3.4vw, 52px);
  }

  .scroll-story .hero h1 {
    max-width: 760px;
    margin: 18px 0 18px;
    font-size: clamp(58px, 4.9vw, 80px);
    line-height: .9;
  }

  .scroll-story .hero-copy {
    max-width: 620px;
    font-size: clamp(14px, 1.05vw, 17px);
    line-height: 1.58;
  }

  .scroll-story .hero-actions {
    margin-top: 24px;
  }

  .scroll-story .micro-proof {
    margin-top: 24px;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: min(540px, 68svh);
  }
}

@media (min-width: 981px) and (max-height: 760px) {
  .scroll-story .hero {
    padding-top: 84px;
    padding-bottom: 22px;
  }

  .scroll-story .hero h1 {
    margin: 15px 0 15px;
    font-size: clamp(54px, 4.55vw, 72px);
  }

  .scroll-story .hero-copy {
    font-size: 14px;
    line-height: 1.5;
  }

  .scroll-story .hero-actions {
    margin-top: 20px;
  }

  .scroll-story .hero-visual-slot,
  .scroll-story .hero-visual {
    height: min(500px, 66svh);
  }
}
