/* Mobile home, sharing the desktop content and section colors. */
.media-tabs,
.mobile-menu-social,
.mobile-menu-footer,
.mobile-menu-link-suffix,
.mobile-menu-section-mark {
  display: none;
}
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 839px) {
  body.home-page {
    --home-ink: #ffffff;
    --home-soft: #d4d4e9;
    --home-line: rgba(255, 255, 255, 0.28);
    --mobile-side: max(20px, calc((100vw - 620px) / 2));
    --home-header-offset: calc(65px + env(safe-area-inset-top, 0px));
    background: #191970;
    color: var(--home-ink);
  }

  body.home-page::before {
    content: none;
    animation: none;
  }

  body.home-page > .page-loader {
    background: #191970;
  }

  .desktop-only {
    display: block;
  }

  body.home-page > #site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    background: #ffffff;
    border-bottom: 1px solid #171790;
  }

  body.home-page .nav {
    position: relative;
    width: 100%;
    min-height: calc(64px + env(safe-area-inset-top, 0px));
    margin: 0;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 20px 10px;
    gap: 16px;
  }

  body.home-page .logo-img {
    width: 100px;
    height: auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 104px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid #d5d5e6;
    border-radius: 8px;
    background: #ffffff;
    color: #191970;
    font-size: 12px;
    line-height: 20px;
    font-weight: 600;
    cursor: pointer;
  }

  .mobile-menu-toggle__icon {
    position: relative;
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  .mobile-menu-toggle__icon::before,
  .mobile-menu-toggle__icon::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 2px;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .mobile-menu-toggle__icon::before { transform: translateY(-5px); }
  .mobile-menu-toggle__icon::after { transform: translateY(5px); }
  .mobile-menu-toggle__icon > span {
    position: absolute;
    top: 9px;
    left: 2px;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon > span { opacity: 0; }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon::before { transform: rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle__icon::after { transform: rotate(-45deg); }

  .mobile-menu-toggle [data-mobile-menu-label] {
    display: block;
    line-height: 20px;
  }

  html.has-mobile-menu,
  html.has-mobile-menu body.home-page {
    overflow: hidden;
  }

  .home-section-nav {
    position: fixed;
    inset: var(--home-header-offset) 0 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    height: calc(100dvh - var(--home-header-offset));
    padding: 16px max(20px, calc((100vw - 520px) / 2)) calc(24px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
    background: var(--home-deep);
    color: #ffffff;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.4s;
  }

  #site-header.is-menu-open .home-section-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .mobile-menu-section-mark {
    display: block;
    flex: 0 0 32.4px;
    width: 32.4px;
    height: 32.4px;
    object-fit: contain;
  }

  .home-section-nav > a {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    flex-shrink: 0;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #ffffff;
    font-size: clamp(16px, 4.6vw, 22px);
    line-height: 1.5;
    font-weight: 600;
  }

  .home-section-nav > a[aria-current="location"] {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  .mobile-menu-link-suffix { display: inline; }

  .mobile-menu-social {
    display: block;
    flex-shrink: 0;
    margin-top: 24px;
  }

  .mobile-menu-social__title {
    margin: 0 0 16px;
    color: #d4d4f4;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-align: center;
  }

  .mobile-menu-x-accounts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-menu-x-accounts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 4px 0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
  }

  .mobile-menu-social__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: #ffffff;
  }

  .mobile-menu-social__icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .mobile-menu-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
  }

  .mobile-menu-platforms a {
    display: grid;
    place-items: center;
    min-height: 56px;
    padding: 10px 8px;
    border: 1px solid #dedfea;
    border-radius: 10px;
    background: #fafafe;
  }

  .mobile-menu-platforms img {
    display: block;
    width: 96px;
    max-width: 100%;
    height: auto;
  }

  .mobile-menu-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #d4d4e9;
    font-size: 10px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .home-content {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  #one,
  #two,
  #three {
    scroll-margin-top: var(--home-header-offset);
    outline: none;
  }

  .home-hero.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: calc(var(--home-header-offset) + 24px) var(--mobile-side) 32px;
  }

  .home-about {
    display: contents;
  }

  .home-eyebrow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 24px;
    color: var(--home-soft);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.13em;
  }

  .section-number-logo {
    width: 32.4px;
    height: 30.6px;
  }

  .home-eyebrow > span {
    color: var(--home-ink);
    font-size: 13px;
  }

  .home-about > .home-eyebrow { grid-row: 1; }

  .home-about .hero-title {
    grid-row: 2;
    min-width: 0;
    margin: 0 0 24px;
    color: #ffffff;
    font-size: clamp(22px, 6.4vw, 32px);
    font-weight: 700;
    line-height: 1.65;
    letter-spacing: 0.025em;
  }

  .home-about .hero-title br { display: none; }
  .home-about .hero-title br:first-of-type { display: inline; }

  .home-about .highlight {
    background: none;
    color: inherit;
  }

  .home-about .lead {
    grid-row: 3;
    max-width: none;
    margin: 0 0 24px;
    color: var(--home-soft);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.95;
    letter-spacing: 0.025em;
  }

  .hero-gallery {
    grid-row: 4;
    min-width: 0;
    width: 100%;
    margin: 0 0 20px;
    touch-action: pan-y pinch-zoom;
  }

  .hero-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .hero-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .hero-slide.is-active {
    opacity: 1;
    visibility: visible;
  }

  .hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .home-actions {
    grid-row: 6;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
  }

  .home-actions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 60px;
    padding: 10px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.04);
  }

  .home-actions a > span:last-child {
    flex-shrink: 0;
    font-size: 18px;
  }

  .home-about .social-links {
    grid-row: 5;
    margin: 0 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 6px;
    width: 100%;
    max-width: none;
  }

  .home-about .social-links .btn {
    min-width: 0;
    min-height: 44px;
    padding: 6px;
    border: 1px solid var(--home-line);
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    font-size: 11px;
    line-height: 1.5;
    font-weight: 500;
  }

  .home-scroll { display: none; }

  .agalingo-section {
    --home-ink: #191970;
    --home-soft: #4d5d43;
    --home-line: rgba(25, 25, 112, 0.2);
    display: flex;
    flex-direction: column;
    padding: 52px var(--mobile-side) 56px;
    background: #e6ebd9;
    color: var(--home-ink);
  }

  .agalingo-intro { display: contents; }
  .agalingo-intro .home-eyebrow { order: 1; }

  .agalingo-intro h2 {
    order: 2;
    margin: 0 0 20px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.08em;
  }

  .agalingo-intro > p:not(.home-eyebrow) {
    order: 3;
    margin: 0 0 24px;
    color: var(--home-soft);
    font-size: 15px;
    line-height: 1.95;
  }

  .agalingo-feature-block {
    order: 4;
    min-width: 0;
    margin: 0 0 28px;
  }

  .agalingo-feature__kicker,
  .agalingo-feature__text,
  .agalingo-feature__button { display: none; }

  .agalingo-feature {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .agalingo-feature__content,
  .agalingo-feature__visual {
    display: block;
    width: 100%;
  }

  .agalingo-feature__icon {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
  }

  .agalingo-play-button {
    order: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    min-height: 60px;
    padding: 14px 20px;
    border: 2px solid #287a32;
    border-radius: 14px;
    background: #b7eb55;
    color: #183f20;
    box-shadow: 0 5px 0 #287a32;
    font-size: 17px;
    font-weight: 800;
  }

  .agalingo-play-button__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ffffff;
    font-size: 14px;
  }

  .agalingo-play-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #287a32;
  }

  .media-section {
    --home-ink: #191970;
    --home-soft: #535d70;
    --home-line: rgba(25, 25, 112, 0.2);
    display: block;
    padding: 52px var(--mobile-side) 60px;
    background: #ffffff;
    color: var(--home-ink);
  }

  .media-section__intro { margin-bottom: 24px; }

  .media-tabs[role="tablist"] {
    touch-action: pan-x pinch-zoom;
    position: sticky;
    top: var(--home-header-offset);
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 8px;
    padding-top: 8px;
    border-bottom: 1px solid var(--home-line);
    background: #ffffff;
  }

  .media-tabs button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 64px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
    cursor: pointer;
  }

  .media-tabs button[aria-selected="true"] {
    border-bottom-color: #191970;
    background: #f4f5fa;
  }

  .media-tabs img {
    display: block;
    width: 110px;
    max-width: 100%;
    height: auto;
  }

  .has-media-tabs .section-header .section-kicker {
    display: none;
  }

  .has-media-tabs .section-header {
    align-items: center;
    min-height: 60px;
    padding: 8px 0 12px;
  }

  .has-media-tabs .home-section[hidden] {
    display: none;
  }

  body.home-page .media-tabs button:focus-visible,
  .has-media-tabs [role="tabpanel"]:focus-visible {
    outline: 2px solid #191970;
    outline-offset: -3px;
  }

  .media-columns {
    display: flex;
    flex-direction: column;
    gap: 44px;
  }

  .home-section {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .home-section .section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--home-line);
  }

  .home-section .section-kicker {
    display: flex;
    align-items: center;
    height: 48px;
    margin: 0 0 8px;
  }

  .mobile-brand-name { display: none; }
  .media-brand--note { width: 130px; height: auto; margin-left: -14px; }
  .media-brand--youtube { width: 132px; height: auto; }

  .home-section .section-title {
    color: var(--home-soft);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.06em;
  }

  .home-section .section-link {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 44px;
    color: var(--home-ink);
    font-size: 12px;
    font-weight: 500;
    text-align: right;
  }

  .home-section .note-grid,
  .home-section .youtube-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .home-section .note-card,
  .home-section .youtube-card {
    min-width: 0;
    min-height: 0;
    padding: 20px 0;
    border: 0;
    border-bottom: 1px solid var(--home-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .home-section .note-date,
  .home-section .youtube-date {
    margin: 0 0 8px;
    color: var(--home-soft);
    font-size: 12px;
    font-weight: 400;
  }

  .home-section .note-title,
  .home-section .youtube-title {
    margin: 0;
    color: var(--home-ink);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.8;
    overflow-wrap: anywhere;
  }

  .home-section .note-read-more {
    padding-top: 12px;
    color: var(--home-soft);
    font-size: 12px;
    font-weight: 400;
  }

  .home-section .youtube-card {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .home-section .youtube-thumb-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
  }

  .home-section .youtube-card-body {
    min-width: 0;
    padding: 0;
  }

  .home-section .youtube-thumb-wrap.has-thumbnail-error {
    background: #13135a url("/images/brands/youtube-logo-white.png") center / 68% auto no-repeat;
  }

  .home-section .has-thumbnail-error .youtube-thumb { visibility: hidden; }

  .home-section .content-empty,
  .home-section .content-loading {
    margin-top: 20px;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: transparent;
    color: var(--home-soft);
    font-size: 14px;
    backdrop-filter: none;
  }

  .home-section .media-load-more {
    min-height: 48px;
    margin-top: 20px;
    border: 1px solid #191970;
    border-radius: 8px;
    background: #ffffff;
    color: #191970;
    font-size: 14px;
  }

  body.home-page .footer {
    width: 100%;
    margin: 0;
    padding: 28px var(--mobile-side) calc(28px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
    color: #d4d4e9;
    font-size: 11px;
    font-weight: 400;
  }

  body.home-page a:focus-visible,
  body.home-page button:focus-visible,
  .hero-gallery:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
  }

  body.home-page .nav a:focus-visible,
  body.home-page .nav button:focus-visible,
  .agalingo-section a:focus-visible,
  .media-section a:focus-visible {
    outline-color: #191970;
  }

  body.home-page #site-header.is-menu-open .home-section-nav a:focus-visible,
  body.home-page #site-header.is-menu-open .mobile-menu-toggle:focus-visible {
    outline-color: #ffffff;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .home-section-nav { transition: none; }
  }
}
