/* v10: retain the desktop design; resolve constrained text and phone navigation. */
[hidden] { display: none !important; }
.menu-toggle, .thanks-links { display:none; }
:where(a, button, input, select, textarea):focus-visible { outline:2px solid currentColor; outline-offset:5px; }
html { scroll-padding-top:88px; }

@media (max-width:760px) {
  /* Let grid children shrink to the available width instead of clipping text. */
  :where(header, section, main, article, footer) :where(div, aside, h1, h2, h3, p, strong, figure) { min-width:0; }
  body :is(h1,h2,h3,p,strong,.eyebrow,.kicker,.tag) { overflow-wrap:anywhere; word-break:normal; }
  body :is(h1,h2,h3) { max-width:100% !important; line-height:1.02 !important; }
  body h1 { font-size:clamp(48px,14vw,94px) !important; }
  body h2 { font-size:clamp(36px,10.5vw,68px) !important; }
  body h3 { font-size:clamp(29px,8vw,48px) !important; }
  .eyebrow,.kicker,.pill,.tag { max-width:100%; white-space:normal; }
  .gallery-statement span { white-space:normal !important; }
  .value-block { grid-template-columns:minmax(0,1fr); gap:22px; }
  .value-block .copy { grid-column:1; }
  .future-row { grid-template-columns:36px minmax(0,1fr); gap:18px; }
  .home-intro h2 { line-height:1.08 !important; }
  .home-feature-grid,.form { grid-template-columns:minmax(0,1fr); }
  .field, input, select, textarea { min-width:0; max-width:100%; }
  input,select,textarea { font-size:16px; }
  .submit,.home-more,.back { max-width:100%; white-space:normal; }
  footer { flex-direction:column; gap:20px; }

  /* Closed header stays compact; the dropdown uses the existing blue/cream palette. */
  .nav,.nav.scrolled,.thanks-nav { height:64px; gap:16px; }
  .thanks-nav { position:relative; z-index:60; }
  .menu-ready .menu-toggle:not([hidden]) {
    display:inline-flex; align-items:center; justify-content:center; gap:12px;
    min-height:44px; padding:8px 14px; border:1px solid currentColor;
    border-radius:999px; background:transparent; color:inherit;
    font:600 14px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
    cursor:pointer;
  }
  .menu-toggle span { font-size:22px; font-weight:400; }
  .menu-ready .links {
    position:absolute; top:100%; left:0; right:0; padding:16px 5vw 24px;
    display:flex; flex-direction:column; align-items:stretch; gap:0;
    max-height:calc(100svh - 64px); overflow-y:auto; overscroll-behavior:contain;
    background:#f8f7f4; color:#002eff; border-bottom:1px solid rgba(0,46,255,.2);
    box-shadow:0 18px 30px rgba(0,0,0,.12);
  }
  .menu-ready .links a:not(.cta) {
    display:block; padding:14px 0; min-height:48px; font-size:18px;
    border-bottom:1px solid rgba(0,46,255,.16);
  }
  .menu-ready .links .cta { display:block; margin-top:16px; padding:14px 18px; background:#002eff; color:#f8f7f4; text-align:center; }
  .menu-open,.nav.menu-open { color:#002eff; background:#f8f7f4; }
  /* Navigation remains usable if scripting is unavailable. */
  nav:not(.menu-ready) > .links { display:flex; flex-wrap:wrap; gap:10px; }
  nav:not(.menu-ready) > .links a:not(.cta) { display:block; }
  .nav:not(.menu-ready),.thanks-nav:not(.menu-ready) { position:relative; height:auto; padding-top:14px; padding-bottom:14px; flex-wrap:wrap; }
  [data-page="index"] .nav:not(.menu-ready) { color:#002eff; background:#f8f7f4; }

  /* The entire home title and subtitle fit in the initial viewport, without waiting for animation. */
  [data-page="index"] .hero {
    height:auto; min-height:0; padding:104px 5vw 36px;
    display:flex; align-items:center;
  }
  [data-page="index"] .hero-content { padding:0; }
  [data-page="index"] .hero-title { font-size:clamp(58px,18vw,120px) !important; line-height:.9 !important; margin:24px 0; gap:.08em; }
  [data-page="index"] .hero-word { width:auto; max-width:100%; animation:none; }
  [data-page="index"] .hero-word-studios { margin-left:5vw; }
  [data-page="index"] .hero-copy { font-size:clamp(17px,4.6vw,22px); line-height:1.35; max-width:34ch; }
  [data-page="index"] .hero-bottom { display:block; }
  [data-page="index"] .hero .kicker { font-size:10px; line-height:1.4; }
  [data-page="index"] .hero-shade { background:linear-gradient(180deg,rgba(0,0,0,.24),rgba(0,0,0,.65)); }
  [data-page="thanks"] main { padding-top:64px; }
}
@media (max-width:760px) and (max-height:500px) and (orientation:landscape) {
  [data-page="index"] .hero { padding-top:86px; padding-bottom:24px; }
  [data-page="index"] .hero-title { flex-direction:row; gap:.18em; font-size:clamp(40px,9vw,64px) !important; margin:16px 0; }
  [data-page="index"] .hero-word-studios { margin-left:0; }
  [data-page="index"] .hero-copy { max-width:50ch; font-size:17px; }
}
/* Short phone screens in landscape also show the complete home introduction. */
@media (max-width:950px) and (max-height:500px) and (orientation:landscape) {
  [data-page="index"] .hero { height:auto; min-height:0; padding:96px 5vw 28px; }
  [data-page="index"] .hero-content { padding:0; }
  [data-page="index"] .hero-title { flex-direction:row; gap:.18em; font-size:clamp(40px,9vw,72px) !important; line-height:.95 !important; margin:16px 0 22px; }
  [data-page="index"] .hero-word { width:auto; animation:none; }
  [data-page="index"] .hero-word-studios { margin-left:0; }
  [data-page="index"] .hero-copy { max-width:50ch; font-size:17px; line-height:1.35; }
  [data-page="index"] .hero-bottom { display:block; }
  [data-page="index"] .arrow { display:none; }
}
@media (max-width:760px) {
  .menu-ready .menu-toggle:not([hidden]) { width:44px; height:44px; padding:10px; border:0; border-radius:50%; }
  .menu-icon { display:flex; flex-direction:column; justify-content:space-between; width:24px; height:18px; }
  .menu-icon i { display:block; width:24px; height:2px; background:currentColor; border-radius:2px; transition:transform .2s ease,opacity .2s ease; }
  [aria-expanded="true"] .menu-icon i:nth-child(1) { transform:translateY(8px) rotate(45deg); }
  [aria-expanded="true"] .menu-icon i:nth-child(2) { opacity:0; }
  [aria-expanded="true"] .menu-icon i:nth-child(3) { transform:translateY(-8px) rotate(-45deg); }
}
@media (prefers-reduced-motion:reduce) { .menu-icon i { transition:none; } }
/* Shared footer navigation, including the confirmation page. */
footer { flex-wrap:wrap; gap:18px 32px; align-items:center; }
footer .footer-links {
  display:flex; flex-wrap:wrap; align-items:center; gap:0 24px;
  position:static; height:auto; padding:0; border:0;
  font-size:13px; font-weight:600; color:inherit;
}
.footer-links a { display:inline-flex; align-items:center; min-height:44px; color:inherit; text-decoration:none; }
.footer-links a:hover { text-decoration:underline; text-underline-offset:4px; }
.footer-links a[aria-current="page"] { text-decoration:underline; text-underline-offset:4px; }
[data-page="thanks"] footer { display:flex; justify-content:space-between; padding:24px 4vw 32px; border-top:1px solid rgba(248,247,244,.18); color:rgba(248,247,244,.75); font-size:13px; }
@media (max-width:760px) {
  footer { align-items:flex-start; gap:12px; }
  footer .footer-links { gap:0 22px; width:100%; }
  [data-page="thanks"] footer { padding-left:5vw; padding-right:5vw; }
}
/* Shared footer navigation. */
.keep-word { white-space: nowrap; }
footer { flex-wrap:wrap; gap:18px 32px; align-items:center; }
footer .footer-links { display:flex; flex-wrap:wrap; align-items:center; gap:0 24px; position:static; height:auto; padding:0; border:0; font-size:13px; font-weight:600; color:inherit; }
.footer-links a { display:inline-flex; align-items:center; min-height:44px; color:inherit; text-decoration:none; }
.footer-links a:hover,.footer-links a[aria-current="page"] { text-decoration:underline; text-underline-offset:4px; }
[data-page="thanks"] footer { display:flex; justify-content:space-between; padding:24px 4vw 32px; border-top:1px solid rgba(248,247,244,.18); color:rgba(248,247,244,.75); font-size:13px; }
[data-page="start-a-project"] .contact { padding-top:150px !important; min-height:calc(100svh - 110px); }
.project-title { font-size:clamp(60px,10vw,150px); line-height:.95; letter-spacing:-.065em; margin:0 0 64px; }
@media(max-width:760px) {
  footer { align-items:flex-start; gap:12px; }
  footer .footer-links { gap:0 22px; width:100%; }
  [data-page="thanks"] footer { padding-left:5vw; padding-right:5vw; }
  [data-page="start-a-project"] .contact { padding-top:112px !important; }
  .project-title { margin-bottom:42px; }
}
/* Fit the existing Services typography inside its desktop grid columns. */
@media(min-width:1001px) {
  [data-page="services"] .hero-main,
  [data-page="services"] .chapter-label { container-type:inline-size; }
  [data-page="services"] .hero-main h1 { font-size:min(17vw,24cqw); }
  [data-page="services"] .chapter-label h2 { font-size:min(9vw,28cqw); line-height:.94; }
}
@media(min-width:1101px) {
  [data-page="services"] .service-row > h3 { font-size:clamp(32px,3.8vw,54px); }
}
