/* =========================================================
   Support pages (FAQ · Warranty · Contact) – shared design layer
   Editorial layout: hairlines over boxes, restrained accent,
   imagery and motion for depth.
   ========================================================= */

.support-page {
  --s-ink: #f5f2ed;
  --s-dim: #a3a7b3;
  --s-faint: #6f7483;
  --s-hair: rgba(255, 255, 255, 0.075);
  --s-hair-2: rgba(255, 255, 255, 0.14);
  --s-glass: rgba(255, 255, 255, 0.035);
  --s-warm: rgba(255, 138, 76, 0.55);
  position: relative;
  padding-bottom: 120px;
  overflow-x: clip;
}

/* Film grain keeps the large dark surfaces from looking flat */
.support-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Micro typography ---------- */

.s-mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--s-faint);
}

.s-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--s-hair-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--s-dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
}

.s-kicker-icon {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  color: var(--amber);
}

/* ---------- Hero ---------- */

.support-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
  min-height: 560px;
  padding: 72px 0 56px;
}

.support-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 6.4vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff 30%, #a9adb9 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: s-rise 1s var(--ease-out) both;
}

.support-hero h1 + .support-lead,
.support-hero .support-lead {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--s-dim);
  font-size: 1.06rem;
  line-height: 1.85;
}

.support-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.support-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.support-hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--s-dim);
  font-size: 0.84rem;
}

.support-hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--amber);
}

@keyframes s-rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Hero product stage (pointer parallax via --px/--py from ui.js) */
.support-stage {
  position: relative;
  height: 480px;
  isolation: isolate;
}

.support-stage::before {
  content: '';
  position: absolute;
  inset: 8% 4% 0;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 122, 69, 0.28), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(84, 112, 255, 0.18), transparent 70%);
  filter: blur(30px);
  animation: s-breathe 7s ease-in-out infinite alternate;
}

.support-stage::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 22px;
  height: 40px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.85), transparent);
  filter: blur(6px);
}

@keyframes s-breathe {
  from { opacity: 0.75; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

.support-stage-img {
  position: absolute;
  left: 50%;
  bottom: 40px;
  width: auto;
  height: 88%;
  max-width: none;
  transform:
    translate3d(calc(-50% + var(--px, 0) * -18px), calc(var(--py, 0) * -12px), 0)
    rotateY(calc(var(--px, 0) * 6deg));
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.65));
  transition: transform 0.6s var(--ease-out);
  animation: s-float-in 1.2s var(--ease-out) 0.15s both;
}

@keyframes s-float-in {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: 0 0; }
}

/* Floating glass chips around the product */
.s-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 34, 48, 0.72), rgba(14, 16, 24, 0.72));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translate3d(calc(var(--px, 0) * var(--depth, 14px)), calc(var(--py, 0) * var(--depth, 14px)), 0);
  transition: transform 0.6s var(--ease-out);
  animation: s-bob 6s ease-in-out infinite alternate, s-fade-up 0.9s var(--ease-out) both;
  animation-delay: var(--bob-delay, 0s), var(--in-delay, 0.4s);
}

.s-chip small {
  display: block;
  color: var(--s-faint);
  font-size: 0.7rem;
  font-weight: 500;
}

.s-chip-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: var(--amber);
  background: rgba(255, 183, 102, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 183, 102, 0.18);
}

.s-chip-icon svg {
  width: 16px;
  height: 16px;
}

@keyframes s-bob {
  from { translate: 0 0; }
  to { translate: 0 -10px; }
}

@keyframes s-fade-up {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Section scaffolding ---------- */

.s-section {
  position: relative;
  padding: 96px 0 0;
  scroll-margin-top: calc(var(--header-height) + 64px);
}

.s-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 44px;
}

.s-section-head h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  scroll-margin-top: calc(var(--header-height) + 72px);
}

.s-section-head > p {
  margin: 0;
  color: var(--s-dim);
  line-height: 1.85;
}

.s-index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.s-index::after {
  content: '';
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--s-warm), transparent);
}

/* ---------- Accordion (FAQ + warranty FAQ) ---------- */

.support-page {
  counter-reset: faq;
}

.faq-list {
  border-top: 1px solid var(--s-hair-2);
}

.faq-group details {
  position: relative;
  counter-increment: faq;
  border-bottom: 1px solid var(--s-hair);
  transition: background-color 0.4s ease;
}

.faq-group details::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--orange), var(--amber) 60%, transparent);
  transition: width 0.7s var(--ease-out);
}

.faq-group details:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.022), transparent 80%);
}

.faq-group details[open]:not(.is-closing) {
  background: linear-gradient(90deg, rgba(255, 122, 69, 0.055), transparent 75%);
}

.faq-group details[open]:not(.is-closing)::before {
  width: 100%;
}

.faq-group summary {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 16px;
  padding: 26px 8px 26px 4px;
  color: var(--s-ink);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.faq-group summary::-webkit-details-marker {
  display: none;
}

.faq-group summary::before {
  content: counter(faq, decimal-leading-zero);
  color: var(--s-faint);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.3s ease;
}

/* Toggle: ring with a plus that turns into a minus */
.faq-group summary::after {
  content: '';
  grid-column: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  box-shadow: inset 0 0 0 1px var(--s-hair-2);
  color: var(--s-dim);
  transition: transform 0.5s var(--ease-out), background-size 0.4s var(--ease-out), box-shadow 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.faq-group summary:hover::before,
.faq-group details[open]:not(.is-closing) summary::before {
  color: var(--orange);
}

.faq-group summary:hover::after {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 138, 76, 0.55);
}

.faq-group details[open]:not(.is-closing) summary::after {
  transform: rotate(180deg);
  color: #fff;
  background-color: var(--orange);
  background-size: 12px 1.5px, 1.5px 0;
  box-shadow: 0 10px 24px -10px rgba(255, 86, 56, 0.9);
}

.faq-group summary:focus-visible {
  outline: 2px solid #ffb48a;
  outline-offset: 2px;
  border-radius: 10px;
}

.faq-answer {
  padding: 0 58px 30px 64px;
  color: var(--s-dim);
  font-size: 0.97rem;
  line-height: 1.95;
}

.faq-answer p {
  max-width: 640px;
  margin: 0;
}

.faq-answer .inline-link {
  margin-top: 16px;
  font-size: 0.9rem;
}

/* ---------- Photo link tiles ---------- */

.s-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.s-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 26px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.6s var(--ease-out), box-shadow 0.4s ease;
}

.s-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.8);
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out), filter 0.6s ease;
}

.s-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 7, 11, 0.05) 0%, rgba(6, 7, 11, 0.55) 55%, rgba(6, 7, 11, 0.94) 100%),
    radial-gradient(240px circle at var(--mx, 50%) var(--my, 100%), rgba(255, 122, 69, 0.22), transparent 70%);
}

.s-tile .s-mono {
  color: rgba(255, 255, 255, 0.6);
}

.s-tile h3 {
  margin: 10px 0 6px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.s-tile p {
  margin: 0;
  max-width: 300px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  line-height: 1.7;
}

.s-tile-arrow {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 12, 18, 0.35);
  backdrop-filter: blur(10px);
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.5s var(--ease-out);
}

.s-tile-arrow svg {
  width: 16px;
  height: 16px;
  transform: rotate(-45deg);
  transition: transform 0.5s var(--ease-out);
}

.s-tile:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 76, 0.35), 0 40px 70px -40px rgba(0, 0, 0, 0.9);
}

.s-tile:hover img {
  transform: scale(1.1);
  filter: saturate(1) brightness(0.9);
}

.s-tile:hover .s-tile-arrow {
  border-color: transparent;
  background: var(--accent-gradient);
}

.s-tile:hover .s-tile-arrow svg {
  transform: rotate(0deg);
}

.s-tile:focus-visible {
  outline: 2px solid #ffb48a;
  outline-offset: 3px;
}

.s-credit {
  margin: 14px 0 0;
  color: var(--s-faint);
  font-size: 0.72rem;
  text-align: right;
}

.s-credit a:hover {
  color: var(--s-dim);
}

/* ---------- Closing CTA band ---------- */

.s-cta {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  margin-top: 96px;
  padding: 56px 56px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(255, 122, 69, 0.24), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(84, 112, 255, 0.12), transparent 60%),
    linear-gradient(135deg, #12151f, #0a0c12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-lg);
}

/* Blueprint lines inside the band */
.s-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 90% at 85% 20%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 85% 20%, #000, transparent 75%);
}

/* Slow light sweep */
.s-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  z-index: -1;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: s-sweep 7s ease-in-out infinite;
}

@keyframes s-sweep {
  0%, 30% { transform: translateX(0); }
  70%, 100% { transform: translateX(380%); }
}

.s-cta h2 {
  margin: 12px 0 10px;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  letter-spacing: -0.03em;
}

.s-cta p {
  max-width: 520px;
  margin: 0;
  color: var(--s-dim);
  line-height: 1.8;
}

.s-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.s-cta .primary-btn,
.s-cta .ghost-btn {
  min-height: 50px;
  padding-inline: 1.5rem;
}

/* ---------- Shared icon tile ---------- */

.s-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--amber);
  background: linear-gradient(145deg, rgba(255, 183, 102, 0.14), rgba(255, 79, 58, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 183, 102, 0.16);
  transition: color 0.3s ease, background 0.3s ease, transform 0.5s var(--ease-spring), box-shadow 0.3s ease;
}

.s-icon svg {
  width: 20px;
  height: 20px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .support-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    padding: 56px 0 32px;
  }

  .support-stage {
    height: 400px;
  }

  .s-section {
    padding-top: 72px;
  }

  .s-section-head {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 32px;
  }

  .s-tiles {
    grid-template-columns: 1fr 1fr;
  }

  .s-tiles > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .s-cta {
    grid-template-columns: 1fr;
    padding: 40px 32px;
  }
}

@media (max-width: 600px) {
  .support-page {
    padding-bottom: 80px;
  }

  .support-hero {
    padding-top: 40px;
  }

  .support-hero h1 {
    font-size: clamp(2.5rem, 13vw, 3.2rem);
  }

  .support-stage {
    height: 330px;
  }

  .s-chip {
    padding: 7px 12px 7px 7px;
    font-size: 0.74rem;
  }

  .s-chip small {
    display: none;
  }

  .s-chip-icon {
    width: 26px;
    height: 26px;
  }

  .s-section {
    padding-top: 60px;
  }

  .s-tiles {
    grid-template-columns: 1fr;
  }

  .s-tile {
    min-height: 230px;
  }

  .faq-group summary {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 10px;
    padding: 22px 0;
    font-size: 0.98rem;
  }

  .faq-group summary::after {
    width: 30px;
    height: 30px;
  }

  .faq-answer {
    padding: 0 0 24px 40px;
  }

  .s-cta {
    margin-top: 72px;
    padding: 32px 22px;
    border-radius: 22px;
  }

  .s-cta-actions > * {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-hero h1,
  .contact-title,
  .support-stage-img,
  .s-chip,
  .support-stage::before,
  .s-cta::after {
    animation: none;
  }
}

/* ---------- Sticky in-page sub navigation ---------- */

.s-subnav {
  position: relative;
  z-index: 30;
  margin-top: 8px;
}

.s-subnav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--s-hair);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9);
  overflow-x: auto;
  scrollbar-width: none;
}

.s-subnav-inner::-webkit-scrollbar {
  display: none;
}

.s-subnav a {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--s-dim);
  font-size: 0.86rem;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.s-subnav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.s-subnav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.s-subnav a:focus-visible {
  outline: 2px solid #ffb48a;
  outline-offset: 1px;
}

.s-subnav .s-subnav-cta {
  margin-left: auto;
  color: var(--orange);
  font-weight: 600;
}

.s-subnav .s-subnav-cta:hover {
  color: #fff;
  background: var(--accent-gradient);
}

@media (min-width: 1101px) {
  .s-subnav {
    position: sticky;
    top: calc(var(--header-height) + 10px);
  }
}
