/* Mobile Figma shell — Mobile ver1 (7109:11824).
   Header menu 7287:22322; footer Component 2 / Frame 1000002858.
   Page-specific geometry stays in page CSS or later *-mobile.css overlays. */
@media (max-width: 992px) {
  .v2 {
    --v2-header-h: 53px;
    --v2-gutter: 16px;
  }

  /* Kill document-level horizontal scroll (carousels stay scrollable inside) */
  html,
  body.v2 {
    overflow-x: clip;
    max-width: 100%;
  }

  /*
    Pre-reveal translateX(±40px) pushes media past the viewport and creates
    page-level horizontal scroll until IntersectionObserver fires. On mobile,
    only animate vertically. Must beat `.is-revealed` specificity so the
    residual translateY(28px) does not leave gaps/overlaps after reveal.
  */
  .v2 [data-reveal="left"],
  .v2 [data-reveal="right"] {
    transform: translate3d(0, 28px, 0);
  }

  .v2 [data-reveal="left"].is-revealed,
  .v2 [data-reveal="right"].is-revealed {
    transform: none;
  }

  /* —— Header (Figma: 390×53, #f8fafc, pad 15/17, logo 122×19) —— */
  .v2 .v2-header {
    background: #f8fafc;
    border-bottom: 0;
  }

  .v2 .v2-header__bar {
    height: var(--v2-header-h);
    padding: 0 15px;
    gap: 16px;
  }

  .v2 .v2-header__left,
  .v2 .v2-header__right {
    gap: 0;
  }

  .v2 .v2-logo img {
    width: 122px;
    height: 19px;
  }

  .v2 .v2-header__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Visual icon ~21×14; hit area ≥44×44 (ChatGPT / touch QA) */
    width: 44px;
    height: 44px;
    margin-right: -11px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-image: url("/img/v2/icons/menu.svg?v=1");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 21px 14px;
    color: transparent;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
  }

  .v2 .v2-header__toggle[aria-expanded="true"] {
    background-image: url("/img/v2/icons/close.svg?v=1");
    background-size: 16px 16px;
  }

  .v2 .v2-mob {
    padding: 8px 15px 24px;
    background: #f8fafc;
  }

  .v2 .v2-mob-actions .v2-btn--primary {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .v2 .v2-mob details {
    border-bottom: 1px solid var(--v2-gray-200);
    padding: 0;
  }

  .v2 .v2-mob summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px 0;
    font: 500 16px/1.2 var(--v2-font);
    color: var(--v2-gray-800);
    list-style: none;
    cursor: pointer;
  }

  .v2 .v2-mob summary::-webkit-details-marker,
  .v2 .v2-mob summary::marker {
    display: none;
    content: "";
  }

  /* Desktop-nav chevron; rotates on open */
  .v2 .v2-mob summary::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: url("/img/v2/icons/chevron-down.svg") center / 16px 16px no-repeat;
    transition: transform 0.3s ease;
  }

  .v2 .v2-mob details.is-open summary::after {
    transform: rotate(180deg);
  }

  /* Height animation (grid 0fr → 1fr); JS toggles .is-open */
  .v2 .v2-mob__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
  }

  .v2 .v2-mob details.is-open .v2-mob__panel {
    grid-template-rows: 1fr;
  }

  .v2 .v2-mob__panel-inner {
    overflow: hidden;
    min-height: 0;
  }

  /* Flatten desktop dropdown card so expanded groups share the drawer surface */
  .v2 .v2-mob .v2-dropdown {
    gap: 8px;
    padding: 0 0 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .v2 .v2-mob .v2-dropdown a {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 24px;
    font: 400 14px/1.2 var(--v2-font);
  }

  .v2 .v2-mob > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 0;
    font: 500 16px/1.2 var(--v2-font);
    color: var(--v2-gray-800);
    border-bottom: 1px solid var(--v2-gray-200);
  }

  /* —— Footer accordion (Figma: #091922, pad 64/16, titles 16 Medium) —— */
  .v2 .v2-footer {
    background-color: #091922;
    padding: 64px 0;
  }

  /* Figma Component 2: 46px only between accordion and brand block —
     not also between Privacy and Line 6 (that gap is 20). */
  .v2 .v2-footer > .v2-container {
    gap: 0;
    padding-left: 16px;
    padding-right: 16px;
  }

  .v2 .v2-footer__grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 46px;
  }

  .v2 .v2-footer__col {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-bottom: 0;
  }

  /* Figma Component 2: title 16 Medium UPPER, 20px to Line 5, 24px between rows */
  .v2 .v2-footer__col h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    min-height: 0;
    padding: 24px 0 20px;
    /* Figma Line 5 sits under the title row and stays when expanded */
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font: 500 16px/1 var(--v2-font);
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
    cursor: pointer;
    user-select: none;
  }

  .v2 .v2-footer__col:first-child h3 {
    padding-top: 0;
  }

  /* Figma Mobile ver1: plus → minus (not chevron / arrow-down) */
  .v2 .v2-footer__col h3::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    -webkit-mask: url("/img/v2/icons/plus.svg") center / 16px 16px no-repeat;
    mask: url("/img/v2/icons/plus.svg") center / 16px 16px no-repeat;
    transition: opacity 0.15s ease;
  }

  .v2 .v2-footer__col.is-open h3::after {
    -webkit-mask-image: url("/img/v2/icons/minus.svg");
    mask-image: url("/img/v2/icons/minus.svg");
  }

  .v2 .v2-footer__col-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
  }

  .v2 .v2-footer__col.is-open .v2-footer__col-panel {
    grid-template-rows: 1fr;
  }

  .v2 .v2-footer__col-panel-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .v2 .v2-footer__col.is-open .v2-footer__col-panel-inner {
    opacity: 1;
  }

  .v2 .v2-footer__col-panel-inner > a {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 0;
    font: 400 14px/1.2 var(--v2-font);
  }

  .v2 .v2-footer__col.is-open .v2-footer__col-panel-inner {
    padding: 12px 0 16px;
  }

  @media (prefers-reduced-motion: reduce) {
    .v2 .v2-mob summary::after,
    .v2 .v2-mob__panel,
    .v2 .v2-footer__col h3::after,
    .v2 .v2-footer__col-panel,
    .v2 .v2-footer__col-panel-inner {
      transition: none;
    }
  }

  /* HTML rule sits above mid; Figma Line 6 is above copyright — use bottom edge instead */
  .v2 .v2-footer__rule {
    display: none;
  }

  /* Mobile ver1 Component 2: logo→social 24, then phone→privacy 16, Line 6, © */
  .v2 .v2-footer__mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
  }

  .v2 .v2-footer__mid .v2-logo {
    display: block;
    width: 120px;
    height: 19px;
    margin-bottom: 24px;
  }

  .v2 .v2-footer__mid .v2-logo img {
    width: 120px;
    height: 19px;
    object-fit: contain;
  }

  .v2 .v2-footer__social {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
  }

  .v2 .v2-footer__social a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
  }

  .v2 .v2-footer__social img {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  .v2 .v2-footer__phone {
    margin: 0 0 16px;
    font: 400 12px/1.2 var(--v2-font);
    color: var(--v2-gray-50);
  }

  /* Figma mobile: Privacy above Line 6; desktop row Privacy stays in bottom */
  .v2 .v2-footer__privacy--stack {
    display: block;
    margin: 0;
    font: 400 12px/1.2 var(--v2-font);
    color: var(--v2-gray-50);
    text-decoration: underline;
  }

  .v2 .v2-footer__privacy--row {
    display: none;
  }

  .v2 .v2-footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    font: 400 10px/1.2 var(--v2-font);
    border-top: 1px solid rgba(255, 255, 255, 0.62);
    margin-top: 20px; /* Figma Privacy → Line 6 */
    padding-top: 20px; /* Figma Line 6 → © */
  }

  .v2 .v2-footer__bottom p {
    margin: 0;
  }

  .v2 .v2-footer__ai {
    margin-top: 16px;
    font: 400 10px/1.2 var(--v2-font);
    opacity: 0.8;
  }
}
