/* home — page-specific styles */
/* ===================================================================
   MOBILE NAV + REFINEMENTS
   =================================================================== */
.m-toggle { display: none; }
.m-nav { display: none; }
/* Hamburger drawer takes over for tablet + phone (desktop nav cannot fit below ~1180px) */
@media (max-width: 1180px) {
  .nav { display: none; }
  .header-actions .header-cta,
  .header-actions .header-catalog { display: none; }
  .m-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; margin-left: 4px;
  }
  .m-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
  .m-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .m-toggle.is-open span:nth-child(2) { opacity: 0; }
  .m-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .m-nav {
    display: flex; flex-direction: column;
    position: fixed; top: 104px; left: 0; right: 0; bottom: 0;
    background: var(--ink); color: var(--paper);
    padding: 14px var(--gutter) 36px; z-index: 59; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .26s ease, transform .26s ease, visibility 0s linear .26s;
  }
  body.m-open { overflow: hidden; }
  body.m-open .m-nav { opacity: 1; visibility: visible; transform: none; transition: opacity .26s ease, transform .26s ease, visibility 0s; }
  .m-nav a {
    font-family: var(--display); font-weight: 500; font-size: 27px; letter-spacing: -0.02em; color: var(--paper);
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.14); display: flex; align-items: center; justify-content: space-between;
  }
  .m-nav a .arr { color: var(--amber); font-size: 19px; }
  .m-nav a.m-cta { margin-top: 22px; border: 1px solid rgba(255,255,255,0.28); padding: 17px 20px; font-size: 17px; }
  .m-nav .m-meta { margin-top: 24px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-2); line-height: 1.9; }
}
/* Phone-only refinements */
@media (max-width: 720px) {
  :root { --section-pad: 78px; }
  .m-nav a { font-size: 26px; }
  footer .bottom { flex-wrap: wrap; gap: 14px; }
  .cap-hero .banner .meta-strip .cell { min-width: 150px; }
  footer .grid { grid-template-columns: 1fr; }
  /* contain wide tables so they scroll inside their section, not the page */
  .compare .inner, .params .inner { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare .tbl, .params .ptbl { display: table; width: auto; min-width: 560px; white-space: nowrap; }
  .cat-index .idx-row { grid-template-columns: 1fr; gap: 10px; align-items: start; }
  .cat-index .idx-row .ix-num { display: none; }
  .cat-index .idx-row .ix-name { font-size: 22px; }
  .cat-index .idx-row .ix-go { font-size: 12px; white-space: nowrap; justify-self: start; }

  /* Home — contact block */
  .contact-inner { gap: 28px; padding-top: 64px; }
  .contact-head {
    font-size: clamp(32px, 8.5vw, 44px);
    line-height: 1.06;
    padding-bottom: 24px;
  }
  .contact-head em {
    white-space: normal;
    display: inline-block;
    max-width: 100%;
  }
  .contact .body-text p {
    max-width: 100%;
    font-size: clamp(16px, 4.2vw, 19px);
    line-height: 1.5;
  }
  .contact { padding-bottom: 80px; }
}

/* ===================================================================
   "WHAT WE BUILD" — interactive index -> stage showcase
   Default (no-JS / mobile): stacked cards.
   Enhanced (JS, >=961px): a numbered tab index drives a large image stage.
   =================================================================== */
.wb { max-width: var(--col-max); margin: 0 auto; padding: 0 var(--gutter) var(--section-pad); }

/* shared panel pieces (both layouts) */
.wb-photo {
  position: relative;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1a1a;
  aspect-ratio: 16 / 10;
  min-height: clamp(200px, 42vw, 320px);
}
.wb-num, .wb-cat {
  position: absolute; top: 20px;
  font-family: var(--display); font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(250,250,247,0.92); background: rgba(10,10,10,0.5);
  padding: 6px 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.wb-num { left: 20px; }
.wb-cat { right: 20px; }
.wb-body { padding: 44px 0 10px; }
.wb-kicker {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--display); font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 22px;
}
.wb-kicker::before { content: ""; width: 28px; height: 1px; background: var(--amber); }
.wb-title {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08;
  font-size: clamp(26px, 3vw, 40px); color: var(--ink); margin: 0 0 22px; max-width: 18ch;
}
.wb-desc { font-size: 16px; line-height: 1.72; color: var(--ink-4); max-width: 62ch; margin: 0 0 28px; }
.wb-specs {
  display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px;
  font-family: var(--display); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--grey); margin: 0 0 32px;
}
.wb-specs span { position: relative; padding: 0 16px; }
.wb-specs span:first-child { padding-left: 0; }
.wb-specs span:not(:last-child)::after {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 11px; background: var(--rule);
}
.wb-more {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--ink);
  border-bottom: 1px solid var(--ink); padding-bottom: 4px; transition: gap .25s ease;
}
.wb-more span { color: var(--amber); }
.wb-more:hover { gap: 16px; }

/* default: stacked cards (no JS, and all small screens) */
.wb-index { display: none; }
.wb-panel { display: block; border-top: 1px solid var(--rule); }
.wb-panel:last-child { border-bottom: 1px solid var(--rule); }
.wb-panel .wb-body { padding-bottom: 4px; }
.wb-mob { display: none; }

@media (max-width: 960px) {
  .wb-desk { display: none !important; }
  .wb-cat.wb-mob {
    display: inline-block;
    max-width: calc(100% - 88px);
    font-size: 10px;
    letter-spacing: 0.12em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .wb-kicker.wb-mob { display: inline-flex; font-size: 10.5px; margin-bottom: 16px; }
  .wb-title.wb-mob { display: block; font-size: clamp(22px, 6vw, 28px); max-width: none; margin-bottom: 16px; }
  .wb-desc.wb-mob { display: block; font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; }
  .wb-more.wb-mob { display: inline-flex; font-size: 13px; }
  .wb-specs { font-size: 10.5px; margin-bottom: 24px; }
  .wb-specs span { padding: 0 10px; }
  .wb-body { padding: 32px 0 8px; }
}

/* enhanced: two-column index | stage */
@media (min-width: 961px) {
  .wb.is-enhanced { display: grid; grid-template-columns: minmax(300px, 0.82fr) 1.55fr; align-items: stretch; }
  .wb.is-enhanced .wb-index {
    display: flex; flex-direction: column;
    border-top: 1px solid var(--rule); border-right: 1px solid var(--rule);
  }
  .wb.is-enhanced .wb-tablist { display: flex; flex-direction: column; }
  .wb.is-enhanced .wb-index-foot {
    margin-top: auto;
    border-top: 1px solid var(--rule);
    padding: 28px 26px 30px 28px;
  }
  .wb-index-foot p {
    font-size: 13px; line-height: 1.55; color: var(--ink-4);
    margin: 0 0 18px; max-width: 32ch;
  }
  .wb-index-cta {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--display); font-weight: 500; font-size: 13px;
    letter-spacing: 0.02em; color: var(--ink);
    border-bottom: 1px solid var(--ink); padding-bottom: 3px;
    transition: gap .25s ease;
  }
  .wb-index-cta span { color: var(--amber); }
  .wb-index-cta:hover { gap: 16px; }
  .wb.is-enhanced .wb-tab {
    position: relative; cursor: pointer; text-align: left; background: transparent; border: 0;
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
    border-bottom: 1px solid var(--rule-soft); padding: 26px 26px 26px 28px;
    transition: background .25s ease;
  }
  .wb.is-enhanced .wb-tab:last-child { border-bottom: 0; }
  .wb.is-enhanced .wb-tab::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber);
    transform: scaleY(0); transform-origin: top; transition: transform .3s ease;
  }
  .wb.is-enhanced .wb-tab:hover,
  .wb.is-enhanced .wb-tab.is-active { background: var(--paper-2); }
  .wb.is-enhanced .wb-tab.is-active::before { transform: scaleY(1); }
  .wb-tnum { font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: 0.12em; color: var(--grey-2); }
  .wb-tab.is-active .wb-tnum { color: var(--amber); }
  .wb-tlabel { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .wb-tk { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--ink-3); transition: color .2s ease; }
  .wb-tab.is-active .wb-tk { color: var(--ink); }
  .wb-tt { font-size: 12.5px; color: var(--grey); }
  .wb-tarr { display: none; }

  .wb.is-enhanced .wb-stage { position: relative; padding-left: 56px; min-width: 0; border-top: 1px solid var(--rule); }
  .wb.is-enhanced .wb-panel { display: block; border: 0; }
  .wb.is-enhanced .wb-panel[hidden] { display: none; }
  .wb.is-enhanced .wb-panel.is-active { animation: wbFade .5s ease both; }
  .wb.is-enhanced .wb-photo {
    aspect-ratio: auto;
    min-height: clamp(360px, 38vw, 520px);
  }
  .wb.is-enhanced .wb-body { padding: 40px 0 8px; max-width: 880px; }
}
@keyframes wbFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .wb.is-enhanced .wb-panel.is-active { animation: none; }
  .wb-more, .wb-tab, .wb-tarr, .wb-tab::before { transition: none; }
}

/* ===================================================================
   HOME HERO — small phones (~425px)
   =================================================================== */
@media (max-width: 480px) {
  .hero:has(.hero-bottom) {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: max(640px, calc(100svh - var(--header-h)));
    height: auto;
  }

  .hero:has(.hero-bottom) .hero-img::after {
    background:
      linear-gradient(180deg, rgba(10,10,10,0.78) 0%, rgba(10,10,10,0.38) 20%, rgba(10,10,10,0.22) 48%, rgba(10,10,10,0.92) 100%),
      linear-gradient(80deg, rgba(10,10,10,0.48) 0%, rgba(10,10,10,0) 52%);
  }

  .hero:has(.hero-bottom) .hero-bottom {
    position: relative;
    margin-top: auto;
    padding: 28px var(--gutter) calc(86px + env(safe-area-inset-bottom, 0px));
    padding-right: var(--gutter);
  }

  .hero:has(.hero-bottom) .hero-eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.1em;
    gap: 10px;
    margin-bottom: 18px;
    align-items: flex-start;
    line-height: 1.45;
    max-width: 100%;
  }

  .hero:has(.hero-bottom) .hero-eyebrow::before {
    width: 22px;
    margin-top: 0.35em;
    flex-shrink: 0;
  }

  .hero:has(.hero-bottom) .hero-headline {
    font-size: clamp(34px, 9.8vw, 44px);
    margin-bottom: 20px;
    line-height: 1.04;
    letter-spacing: -0.02em;
  }

  .hero:has(.hero-bottom) .hero-meta {
    gap: 16px;
    padding-top: 16px;
  }

  .hero:has(.hero-bottom) .hero-meta .ident {
    font-size: 13.5px;
  }

  .hero:has(.hero-bottom) .hero-meta .ident b {
    font-size: 14.5px;
    margin-bottom: 8px;
    line-height: 1.4;
  }

  .hero:has(.hero-bottom) .hero-meta .ident span {
    font-size: 13px;
    line-height: 1.55;
  }

  .hero:has(.hero-bottom) .hero-next {
    width: 100%;
    justify-content: center;
    padding: 15px 18px;
    font-size: 12.5px;
    box-sizing: border-box;
  }

  .positioning .inner {
    gap: 24px;
  }

  .positioning .positioning-copy > p,
  .positioning .pos-body {
    font-size: 15px;
    line-height: 1.55;
  }

  .pos-facts .pos-highlights li {
    font-size: 14px;
    line-height: 1.5;
  }
}
