/* Phone layouts use normal document flow so browser bars, short screens,
   and larger text cannot push the hero controls over its footer. */
.hero > picture { display: contents; }

@media (max-width: 768px) {
  html {
    scroll-padding-top: calc(80px + env(safe-area-inset-top));
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .container {
    width: auto;
    margin-left: max(20px, env(safe-area-inset-left));
    margin-right: max(20px, env(safe-area-inset-right));
  }

  .header {
    position: sticky;
    top: 0;
    height: calc(64px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  }
  .brand { width: 124px; height: 58px; }
  .brand img { width: 152px; height: 76px; margin-left: -14px; margin-top: -8px; }
  .header-status { display: none; }
  .menu-toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; border: 0; background: transparent; font-size: 13px; font-weight: 700; cursor: pointer; }
  .menu-lines { width: 19px; height: 12px; border-top: 1px solid; border-bottom: 1px solid; position: relative; }
  .menu-lines:after { content: ''; position: absolute; top: 5px; left: 0; right: 0; border-top: 1px solid; }
  .menu-toggle[aria-expanded=true] .menu-lines { transform: rotate(45deg); border-bottom: 0; height: 0; }
  .menu-toggle[aria-expanded=true] .menu-lines:after { transform: rotate(90deg); top: -1px; }
  .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    gap: 0;
    max-height: calc(100svh - 64px - env(safe-area-inset-top));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left));
    background: var(--paper);
    box-shadow: 0 14px 24px #0002;
  }
  .navigation.open { display: flex; flex-direction: column; align-items: stretch; }
  .navigation a { min-height: 56px; padding: 18px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }

  .hero {
    display: grid;
    grid-template-rows: 1fr auto;
    height: auto;
    min-height: min(760px, calc(100svh - 64px - env(safe-area-inset-top)));
    max-height: none;
    align-items: stretch;
  }
  .hero-content { align-self: center; padding: 34px 0 28px; min-width: 0; }
  .hero-image { object-position: 66% center; }
  .hero-shade { background: linear-gradient(90deg, #090b0ddc, #090b0d40), linear-gradient(0deg, #090b0deb, transparent 65%); }
  .hero .eyebrow { max-width: 350px; font-size: 10px; line-height: 1.6; letter-spacing: .075em; gap: 9px; }
  .hero h1 { font-size: clamp(46px, 15.2vw, 84px); line-height: .94; margin: 24px 0 20px; }
  .hero-description { font-size: 15px; line-height: 1.7; margin-bottom: 24px; }
  .hero .button { min-height: 52px; padding-inline: 19px; font-size: 12px; gap: 26px; }
  .hero-bottom { position: static; padding: 17px 0 20px; gap: 14px; align-items: center; }
  .hero-project { font-size: 11px; line-height: 1.4; letter-spacing: .07em; gap: 6px; }
  .tiny { font-size: 10px; line-height: 1.4; letter-spacing: .07em; }
  .scroll-link { min-width: 48px; min-height: 48px; justify-content: center; font-size: 0; }
  .scroll-link span { width: 44px; height: 44px; font-size: 20px; }
  .hero-side { display: none; }
  .rev-console { display: grid; grid-template-columns: auto minmax(0, 1fr); width: 100%; max-width: 355px; gap: 14px; margin-top: 22px; }
  .rev-button { min-height: 48px; font-size: 10px; padding: 0 12px; letter-spacing: .06em; touch-action: pan-y; }
  .rev-meter { width: auto; min-width: 0; }
  .rev-readout { font-size: 8px; gap: 6px; }
  .rev-value { font-size: 28px; min-width: 44px; }
  .rev-gear { font-size: 20px; }
  .rev-bars { height: 9px; gap: 3px; }

  .manifesto-strip { justify-content: space-around; gap: 12px; padding: 16px 20px; font-size: 16px; letter-spacing: .04em; }
  .manifesto-strip span:nth-of-type(n+3), .manifesto-strip i:nth-of-type(n+3) { display: none; }
  .section { padding: 56px 0; }
  .section-top { flex-wrap: wrap; gap: 12px; }
  .eyebrow { font-size: 11px; line-height: 1.6; letter-spacing: .09em; gap: 10px; }
  .pill { font-size: 11px; line-height: 1.4; padding: 8px 11px; }
  .display { font-size: clamp(49px, 15.3vw, 76px); line-height: .96; }
  .lead { font-size: 25px; line-height: 1.4; margin-bottom: 16px; }
  .game-heading, .studio-layout, .release-layout, .careers-heading, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .game-heading > *, .studio-layout > *, .release-layout > *, .careers-heading > *, .contact-layout > * { min-width: 0; }
  .game-heading { margin: 28px 0; }
  .game-intro, .studio-copy, .careers-heading > div { max-width: none; }
  .game-intro > p:not(.lead), .studio-copy > p:not(.lead), .careers-heading > div > p:not(.lead), .contact-copy > p:not(.lead):not(.copy-status) { font-size: 15px; line-height: 1.8; }
  .text-link { min-height: 48px; font-size: 13px; align-items: center; padding: 10px 0; }
  .game-art figcaption { font-size: 10px; letter-spacing: .025em; gap: 12px; padding: 14px 0; }
  .game-art figcaption span:nth-child(2) { display: none; }
  .game-features { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 12px; }
  .game-features article { border-right: 0; border-bottom: 1px solid var(--line); padding: 23px 0; gap: 18px; }
  .feature-number { font-size: 12px; }
  .game-features h3 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }
  .game-features p { font-size: 14px; line-height: 1.75; max-width: none; }
  .studio-title .display { margin-top: 28px; }
  .studio-signature { margin-top: 25px; font-size: 31px; }
  .studio-copy { padding-top: 0; }
  .principles { margin-top: 24px; }
  .principles > div { padding: 20px 0; }
  .principles span { font-size: 11px; }
  .principles h3 { font-size: 16px; line-height: 1.4; }
  .principles p { font-size: 14px; line-height: 1.7; }
  .principles > div:last-child { padding-bottom: 0; }
  .release .display { font-size: clamp(47px, 14.5vw, 74px); line-height: .96; margin-top: 28px; }
  .release-status { font-size: 10px; line-height: 1.7; letter-spacing: .025em; }
  .release-copy > p { font-size: 17px; line-height: 1.7; margin: 18px 0 22px; }
  .platforms { gap: 10px; }
  .platform { min-width: 0; flex: 1; padding: 14px 12px; font-size: 17px; gap: 10px; }
  .platform small { font-size: 11px; }
  .platform svg { flex-shrink: 0; width: 25px; }
  .release-copy .release-note { font-size: 12px; line-height: 1.7; }
  .career-tag { font-size: 10px; line-height: 1.6; letter-spacing: .05em; }
  .careers-heading { margin: 28px 0; }
  .career-note { font-size: 12px; line-height: 1.7; }
  .career-paths { grid-template-columns: minmax(0, 1fr); }
  .career-paths > a { padding: 24px; border-right: 0; border-bottom: 1px solid #ffffff25; }
  .path-number { font-size: 11px; }
  .career-paths h3 { margin-top: 26px; font-size: 38px; line-height: 1; }
  .career-paths p { font-size: 14px; line-height: 1.7; }
  .path-action { min-height: 48px; margin-top: 22px; padding-top: 16px; font-size: 13px; }
  .contact .display { margin-top: 28px; }
  .contact-email { max-width: 100%; width: 100%; font-size: clamp(13px, 4vw, 18px); line-height: 1.7; gap: 10px; padding: 14px 0; }
  .contact-email span { flex-shrink: 0; font-size: 22px; }
  .contact-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 22px; }
  .contact .button { min-height: 52px; font-size: 13px; padding-inline: 20px; }
  .copy-email { min-height: 48px; width: 100%; justify-content: center; font-size: 13px; border: 1px solid var(--line); padding: 12px; }
  .copy-status { font-size: 12px; line-height: 1.7; }
  .footer { padding: 36px 0 max(24px, env(safe-area-inset-bottom)); }
  .footer-top { flex-wrap: wrap; gap: 24px; padding-bottom: 26px; }
  .footer-top p { order: 3; width: 100%; font-size: 13px; margin: 0; }
  .back-top { min-height: 48px; font-size: 12px; gap: 14px; }
  .footer-bottom { display: flex; flex-direction: column; gap: 10px; font-size: 11px; line-height: 1.6; }
}

@media (max-width: 360px) {
  .container { margin-left: max(16px, env(safe-area-inset-left)); margin-right: max(16px, env(safe-area-inset-right)); }
  .header { padding-inline: 16px; }
  .hero .eyebrow { font-size: 9px; }
  .rev-console { gap: 10px; }
  .rev-button { padding-inline: 10px; font-size: 9px; }
  .career-paths > a { padding: 20px; }
  .contact-email { font-size: 13px; }
}

/* Touch feedback avoids a hover state that can remain stuck after a tap. */
@media (hover: none) and (pointer: coarse) {
  .button:hover { transform: none; }
  .button:hover:before { left: -45%; }
  .button:hover > span, .career-paths a:hover b { transform: none; }
  .button:active, .rev-button:active { filter: brightness(.9); }
  .hero-image { will-change: auto; }
}
