/* Responsive edition based on PCGen-Mobile landing/menu references.
   Shared HTML and URLs; the desktop layout is unchanged above this breakpoint. */
.mobile-only { display: none; }
body.menu-open { overflow: hidden; }

@media (max-width: 1024px) {
  body { background: #001a2c; }
  body[data-page] .container {
    width: calc(100% - 40px);
    max-width: none;
    margin-inline: 20px;
  }
  .site-header { padding: 28px 0 16px; }
  .header-inner { min-height: 58px; justify-content: space-between; }
  .brand > img, .support-downloads { display: none; }
  .mobile-brand { display: grid; gap: 6px; width: 86px; }
  .brand .mobile-brand img { width: 76px; height: 39px; margin-inline: auto; }
  .mobile-brand > span {
    display: block;
    width: 86px;
    height: 17px;
    background: url('brand/logo.png') right center / 127px auto no-repeat;
  }
  .menu-toggle { width: 44px; height: 44px; border-radius: 4px; margin-left: auto; }
  .menu-toggle span { width: 28px; height: 2px; }
  .site-header.is-scrolled { background: rgba(0, 26, 44, .94); padding: 12px 0; }
  body.menu-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .main-nav.is-open {
    width: 100%;
    height: 100dvh;
    padding: max(32px, env(safe-area-inset-top)) 8% max(24px, env(safe-area-inset-bottom));
    border: 0;
    border-bottom: 14px solid #2eb7a0;
    background: #001a2c;
    backdrop-filter: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  body.menu-open .menu-toggle {
    top: max(32px, env(safe-area-inset-top));
    right: 6.5%;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: #001a2c;
  }
  .main-nav-top, .main-nav-footer > .socials { display: none; }
  .mobile-menu-socials { display: block; padding-right: 65px; }
  .mobile-menu-socials .socials { display: flex; gap: clamp(16px, 6vw, 38px); margin: 0; }
  .main-nav.is-open .mobile-menu-socials a,
  .mobile-footer .socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #7b919e;
    border-radius: 8px;
    padding: 0;
    color: white;
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    text-transform: none;
    opacity: 1;
  }
  .main-nav.is-open .mobile-menu-socials a[aria-label="Instagram"],
  .mobile-footer .socials a[aria-label="Instagram"] { color: #2eb7a0; border-color: #168b89; }
  .main-nav-links {
    width: 100%;
    padding: clamp(58px, 8vh, 100px) 0 clamp(40px, 7vh, 70px);
    gap: clamp(18px, 3.2vh, 36px);
    flex-shrink: 0;
  }
  .main-nav.is-open .main-nav-links a {
    font-size: clamp(32px, 9.8vw, 68px);
    line-height: 1.1;
    letter-spacing: -.025em;
    min-height: 44px;
  }
  .main-nav.is-open .main-nav-links a:is(:hover, :focus-visible, .is-active) { color: #2eb7a0; }
  .main-nav.is-open .main-nav-access a { font-size: 16px; letter-spacing: 0; }
  .main-nav-access { gap: 12px 28px; margin-top: 4px; }
  .main-nav-footer {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding: 30px 0 22px;
    min-height: 285px;
    text-align: right;
  }
  .main-nav-footer::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 -15% -60px -25%;
    transform: translate(-20px, -100px);
    background: #ff9000;
    mask: url('brand/pcgen-outline-icon.svg') 10% top / auto 140% no-repeat;
    -webkit-mask: url('brand/pcgen-outline-icon.svg') 10% top / auto 140% no-repeat;
  }
  .main-nav-footer .mobile-menu-contact-title { display: block; font-size: clamp(14.4px, 3.6vw, 22.4px); line-height: 1.395; text-transform: none; }
  .main-nav.is-open .main-nav-footer > a { display: block; font-size: clamp(12.8px, 3.28vw, 19.2px); line-height: 1.395; font-weight: 600; }
  .main-nav.is-open .mobile-menu-socials a { font-size: 27.9px; }
  .main-nav-footer .mobile-menu-mark { display: block; width: 78px; height: auto; margin: 48px 0 0; }

  /* Landing: statement, outlined brand mark, six partners and two actions. */
  body[data-page="home"] .home-hero {
    min-height: 0;
    height: auto;
    overflow: hidden;
    background: #001a2c;
  }
  body[data-page="home"] .home-hero::before {
    inset: 0 0 auto;
    height: clamp(565px, 142vw, 880px);
    transform: none;
    background-position: 57% center;
    opacity: .9;
  }
  .home-hero-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    height: auto;
    padding: clamp(160px, 35vw, 220px) 0 0;
    gap: 0;
  }
  .home-hero-copy { display: block; min-height: 0; max-width: none; padding: 0; }
  .home-hero-copy h1 {
    max-width: none;
    margin: 0;
    font-size: clamp(33px, 11.5vw, 98px);
    line-height: 1.1;
    letter-spacing: -.025em;
  }
  .home-hero-copy h1 > span { width: 100%; padding: 0 0 5px; border-bottom: 2px solid #1da5a0; }
  .home-hero-copy h1 > span + span { margin-top: 4px; border: 0; padding: 0; }
  .home-hero-copy h1 .title-accent-dot { width: .18em; height: .18em; margin-left: .08em; }
  .home-hero-kicker {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 20px 0 0;
    padding: 10px 12px;
    border-color: #ffffff;
    border-radius: 10px;
    color: #1da5a0;
    font-size: clamp(2.7px, .795vw, 4.8px);
    line-height: 1.25;
    font-weight: 500;
  }
  .home-hero-copy::after {
    content: '';
    display: block;
    height: clamp(230px, 60vw, 380px);
    width: calc(100% + 20px);
    margin: 36px -20px 0 0;
    background: #ff9000;
    mask: url('brand/pcgen-outline-icon.svg') left 60px center / auto 100% no-repeat;
    -webkit-mask: url('brand/pcgen-outline-icon.svg') left 60px center / auto 100% no-repeat;
  }
  .home-hero-logos {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    margin: 24px 0 46px;
    gap: 24px 18px;
  }
  .home-hero-logos .logo-tile { width: 100%; min-width: 0; height: 30px; min-height: 30px; justify-content: center; }
  .home-hero-logos .logo-tile:nth-child(n) img {
    width: 100%;
    max-width: 100%;
    height: 28px;
    max-height: 28px;
    object-fit: contain;
  }
  .home-hero-logos .logo-tile:nth-child(6) { order: 4; }
  .home-hero-logos .logo-tile:nth-child(4) { order: 5; }
  .home-hero-logos .logo-tile:nth-child(5) { order: 6; }
  .home-hero-actions {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: calc(100% + 40px);
    margin: 0 -20px;
    gap: 0;
  }
  .home-hero-actions::after { content: ''; position: absolute; top: -28px; bottom: -30px; left: 50%; width: 1px; background: #ff9000; }
  .home-action-tile, .home-action-tile.secondary { min-height: clamp(165px, 40vw, 240px); padding: 16px 20px 30px; border-radius: 0; backdrop-filter: none; }
  .home-action-tile { background: #198c8b; }
  .home-action-tile.secondary { background: #0b213a; }
  .home-action-tile strong { font-size: clamp(26px, 7.6vw, 46px); line-height: 1.2; }
  .home-action-tile span { font-size: 30px; }
  .home-action-tile:hover, .home-hero-actions:has(.home-action-tile.secondary:hover) .home-action-tile:first-child { transform: none; }

  body[data-page="home"] .home-proof-section { padding: 44px 0 24px; background: #001a2c; }
  .home-proof-grid { display: grid; grid-template-columns: 1fr; gap: 34px; }
  .home-proof-copy { max-width: 760px; width: 100%; justify-items: center; justify-self: center; gap: 0; }
  .home-proof-copy h2 { max-width: 700px; font-size: clamp(30px, 8.5vw, 54px); font-weight: 800; line-height: 1.18; text-align: center; margin: 0; }
  .home-proof-copy h2::after { content: ''; display: block; width: 1px; height: 32px; background: #ff9000; margin: 22px auto 10px; }
  .home-proof-copy h2 { padding-bottom: 0; }
  .home-proof-copy p { max-width: 650px; font-size: clamp(14px, 3.3vw, 18px); font-weight: 500; line-height: 1.25; text-align: center; color: #eee; margin: 0 15px; }
  .mobile-proof-break { display: block; height: 20px; }
  .home-proof-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 740px; justify-self: center; margin: 0; text-align: center; }
  .home-proof-metrics article, .home-proof-metrics article:first-child { width: 100%; max-width: none; padding: 6px 5px 10px; border: 1px solid #6b8190; border-radius: 8px; min-height: 80px; }
  .home-proof-metrics article::after { display: none; }
  .home-proof-metrics strong { font-size: clamp(26px, 6.4vw, 42px); line-height: 1.1; }
  .home-proof-metrics span { max-width: 100%; margin-inline: auto; font-size: clamp(12px, 3.3vw, 18px); line-height: 1.25; color: #eee; }
  body[data-page="home"] .home-client-section { background: #001a2c; padding: 0 0 20px; }
  .home-client-section::before, .home-client-section::after { content: ''; display: block; margin: 0 auto 24px; width: 1px; height: 32px; background: #ff9000; }
  .home-client-section::after { margin: 24px auto 0; }
  .home-client-section .logo-showcase { margin: 0; padding: 0; }
  .home-client-section .logo-showcase-set { gap: 26px; padding-right: 26px; }
  .home-client-section .logo-showcase .logo-tile { width: clamp(92px, 24vw, 140px); flex-basis: clamp(92px, 24vw, 140px); min-width: 0; height: 88px; }
  .home-client-section .logo-showcase .logo-tile img { width: 100%; max-height: 88px; object-fit: contain; }
  body[data-page="home"] .why-section { background: #001a2c; padding: 20px 0 48px; min-height: 240px; }
  .why-section .why-section-intro { margin: 0; }
  .why-section .section-title { font-size: clamp(27px, 7.5vw, 48px); line-height: 1.25; text-align: center; letter-spacing: -.02em; }
  .why-section .section-title span { display: inline; }
  .why-section .section-title span + span::before { content: ' '; }
  .why-section-intro::after { content: ''; display: block; width: 1px; height: 78px; margin: 20px auto 0; background: #ff9000; }
  .why-section .section-copy, .why-section .why-grid, .why-section .home-services-row, .why-section .home-services-pills,
  body[data-page="home"] .newsletter-section { display: none; }

  /* Compact shared footer. All navigation remains available in the main menu. */
  .site-footer { background: #0d2a42; padding: 26px 0 0; }
  .site-footer .footer-grid { display: none; }
  .mobile-footer { display: block; }
  .footer-access-links { justify-content: center; margin: 0 0 14px; }
  .mobile-footer-brand { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
  .mobile-footer-brand > a img { width: 100px; height: auto; }
  .mobile-footer .socials { display: flex; gap: clamp(14px, 5vw, 28px); margin: 0; }
  .mobile-footer-contact { display: flex; justify-content: space-between; margin: 25px 0 20px; gap: 0; }
  .mobile-footer-contact a { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; padding: 8px 6px; font-size: clamp(9px, 2.35vw, 14px); color: #fff; font-weight: 600; min-height: 44px; }
  .mobile-footer-contact a:first-child { padding-left: 0; }
  .mobile-footer-contact a + a { border-left: 1px solid #ff9000; }
  .copyright { display: flex; width: calc(100% + 40px); margin: 0 -20px; padding: 14px 20px; border-color: #188d8c; gap: 12px; flex-wrap: nowrap; align-items: center; font-size: clamp(9px, 2.3vw, 13px); color: #fff; }
  .copyright > a { order: -1; flex-shrink: 0; }
  .copyright > span { text-align: right; }
  .site-footer a:focus-visible, .main-nav a:focus-visible { outline: 2px solid #ff9000; outline-offset: 4px; }
  .scroll-top-toggle { background: #001a2c; }
  .cookie { max-height: 45dvh; overflow-y: auto; }

  /* Tablet layouts also stack the existing inner pages without new URLs. */
  body[data-page="services"] .service-explorer { grid-template-columns: 1fr; }
  .service-explorer-list { max-height: 300px; overflow-y: auto; }
  .service-contact-dialog { max-height: 100%; }
  .about-hero-stage, .about-hero-body, .about-founder-grid,
  body[data-page="team"] .team-hero-stage, body[data-page="contact"] .contact-hero-grid { grid-template-columns: 1fr; }
  .about-hero-title h1, .team-hero-copy h1 { font-size: clamp(40px, 9vw, 90px); }
  .about-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-title { overflow-wrap: break-word; }
  @media (min-width: 700px) {
    .home-hero-copy { max-width: 860px; width: 100%; margin-inline: auto; }
    .home-hero-copy h1 { font-size: clamp(72px, 10vw, 108px); }
    .home-hero-logos { max-width: 760px; justify-self: center; gap: 32px; margin-block: 32px 54px; }
    .home-hero-logos .logo-tile:nth-child(n) img { max-width: 160px; height: 36px; max-height: 36px; }
    .home-action-tile { padding-inline: 8%; }
    .home-proof-section .home-proof-grid { gap: 42px; }
    .mobile-footer { max-width: 850px; margin-inline: auto; }
    .mobile-footer-contact { justify-content: center; }
    .mobile-footer-contact a { padding-inline: 24px; }
    .main-nav.is-open { padding-inline: 10%; }
    .main-nav-footer { min-height: 340px; }
  }
  @media (max-width: 360px) {
    .home-hero-copy h1 { font-size: 10.9vw; }
    .mobile-footer .socials { gap: 10px; }
    .mobile-footer-brand > a img { width: 80px; }
    .mobile-footer-contact { flex-wrap: wrap; justify-content: center; }
    .mobile-footer-contact a { font-size: 10px; }
    .copyright { flex-wrap: wrap; justify-content: center; }
  }
  /* One fluid row of six logos, retaining the reduced mobile logo height. */
  .logos.home-hero-logos {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: min(450px, 100%);
    max-width: 450px;
    gap: 12px;
  }
  .logos.home-hero-logos .logo-tile {
    height: 11.4px;
    min-height: 11.4px;
  }
  .logos.home-hero-logos .logo-tile:nth-child(n) img {
    height: 11.4px;
    max-height: 11.4px;
  }
  @media (prefers-reduced-motion: reduce) {
    .main-nav.is-open { animation: none; }
    .menu-toggle span, .site-header { transition: none; }
    .logo-showcase-track { animation: none; }
    .logo-showcase-viewport { overflow-x: auto; }
  }
}
