/* =================================================================
   HUYUN Laser — Homepage Styles
   Design: clean, generous whitespace, Western industrial aesthetic
   Palette: white + deep charcoal + brand maroon accent
   ================================================================= */

:root {
  --c-bg:        #ffffff;
  --c-bg-alt:    #f7f7f8;
  --c-bg-dark:   #0f0f10;
  --c-line:      #e6e6e8;
  --c-line-soft: #efefef;

  --c-ink:       #111214;
  --c-text:      #4a4d52;
  --c-muted:     #8a8d93;

  --c-accent:    #8e2a2a;        /* brand maroon, from logo */
  --c-accent-d:  #6f1f1f;
  --c-accent-l:  rgba(142, 42, 42, .08);

  --c-white:     #ffffff;

  --ff-sans: 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ff-disp: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius:      4px;
  --radius-lg:   8px;

  --shadow-sm:   0 1px 2px rgba(15,15,16,.04), 0 1px 1px rgba(15,15,16,.02);
  --shadow-md:   0 10px 30px -10px rgba(15,15,16,.18);

  --container:   1320px;

  --t-fast:      .2s ease;
  --t-base:      .35s cubic-bezier(.4,0,.2,1);
  --t-slow:      .7s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--ff-disp);
  color: var(--c-ink);
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container { padding: 0 22px; }
}

/* =====================================================
   Typography helpers
   ===================================================== */

.eyebrow {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 18px;
}
.eyebrow--dark { color: var(--c-accent); }
.eyebrow--light { color: #c39595; }

.section__title {
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--c-ink);
}

.section {
  padding: 120px 0;
}

@media (max-width: 900px) {
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .section { padding: 60px 0; }
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 70px;
}

@media (max-width: 768px) {
  .section__head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 40px;
  }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-ink);
  transition: gap var(--t-fast), color var(--t-fast);
}
.link-arrow span { transition: transform var(--t-fast); }
.link-arrow:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.link-arrow:hover span { transform: translateX(4px); }

/* =====================================================
   Buttons
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
  text-decoration: none;
}

.btn--accent {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn--accent:hover {
  background: var(--c-accent-d);
  border-color: var(--c-accent-d);
}

.btn--light {
  background: #fff;
  color: var(--c-ink);
}
.btn--light:hover {
  background: var(--c-ink);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.45);
}
.btn--ghost:hover {
  background: #fff;
  color: var(--c-ink);
  border-color: #fff;
}

.btn--lg {
  padding: 16px 32px;
  font-size: 15px;
}

/* Nav-scoped CTA — compact + elevated for 64px header */
.btn--nav {
  height: 38px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 4px;
  gap: 6px;
  box-shadow: 0 8px 20px -6px rgba(142, 42, 42, 0.45),
              0 1px 2px rgba(0, 0, 0, 0.15);
  transition: background .25s ease,
              transform .25s ease,
              box-shadow .25s ease;
}
.btn--nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -8px rgba(142, 42, 42, 0.6),
              0 1px 2px rgba(0, 0, 0, 0.15);
}
.btn__arrow {
  transition: transform .25s ease;
}
.btn--nav:hover .btn__arrow {
  transform: translateX(3px);
}

/* =====================================================
   Unified site header (overlays hero, glass on scroll)
   ===================================================== */

.site-header {
  --solid: 0;                           /* 0..1, set by JS based on scroll progress */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Background opacity scales linearly with scroll progress through hero */
  background: rgba(20, 22, 26, calc(0.94 * var(--solid)));
  /* Shadow also fades in gradually */
  box-shadow: 0 2px 24px rgba(0, 0, 0, calc(0.25 * var(--solid)));
  color: #fff;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Top darkening gradient — fades OUT as solid background fades IN */
  background: linear-gradient(180deg, rgba(15,15,16,.42), rgba(15,15,16,0));
  opacity: calc(1 - var(--solid));
  pointer-events: none;
  z-index: -1;
}
.site-header.is-solid {
  /* Binary effects (only beyond 60% progress): blur + saturation boost */
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* ----- Topbar (nested, transparent over hero) ----- */

.topbar {
  background: transparent;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
}
.topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}
.topbar__link svg { opacity: .7; transition: opacity .25s ease; }
.topbar__link:hover { color: #fff; }
.topbar__link:hover svg { opacity: 1; }

@media (max-width: 768px) {
  .topbar { display: none; }
}

/* =====================================================
   Header (inner main bar — layout only)
   ===================================================== */

.header {
  background: transparent;
  border-bottom: none;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo img {
  width: 34px;
  height: auto;
}
.logo__text {
  display: flex;
  align-items: center;
  line-height: 1;
}
.logo__text strong {
  font-family: var(--ff-disp);
  font-weight: 700;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.16em;
}

/* Header logo: always white (dark header in both transparent and solid states) */
.site-header .logo img { filter: brightness(0) invert(1); }

.nav__list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.nav__link {
  display: inline-block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.94);
  position: relative;
  transition: color .25s ease;
}
.nav__link.active,
.nav__link:hover { color: #fff; }

/* Hamburger always white on dark header */
.nav-toggle span { background: #fff !important; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 1.5px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.nav__link:hover { color: var(--c-accent); }
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }
.nav__link.active { color: var(--c-accent); }

/* =====================================================
   Mega menu backdrop (modal-style)
   ===================================================== */

.mega-backdrop {
  position: fixed;
  top: var(--header-h, 85px);   /* start BELOW the header so header area stays untouched */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 90;

  transition:
    opacity    .42s cubic-bezier(0, 0.49, 0.58, 1),
    visibility 0s   linear .42s;
}

.mega-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transition:
    opacity    .5s cubic-bezier(0, 0.49, 0.58, 1),
    visibility 0s   linear;
}

/* Nav chevron */
.nav__chev {
  display: inline-block;
  margin-left: 7px;
  vertical-align: 1px;
  opacity: .55;
  transition: transform .3s ease, opacity .3s ease;
}
.has-mega.is-open .nav__chev {
  transform: rotate(180deg);
  opacity: 1;
}

/* =====================================================
   Full-width product mega menu
   Position is from .site-header (fixed). DO NOT set
   position:relative on .has-mega.
   ===================================================== */

.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid rgba(15,15,16,.06);
  box-shadow: 0 30px 60px -10px rgba(0,0,0,.16);

  /* CLOSED — Bodor pattern: max-height:0 kills the bounding box entirely */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;

  /* Closing: same curve as open, slightly faster */
  transition:
    max-height .42s cubic-bezier(0, 0.49, 0.58, 1),
    opacity    .28s ease-out,
    visibility 0s   linear .42s;

  z-index: 1;
}
.has-mega.is-open .mega {
  /* OPEN — JS sets exact maxHeight from scrollHeight; 800 is fallback */
  max-height: 800px;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;

  /* Opening: Bodor's exact curve cubic-bezier(0, 0.49, 0.58, 1) */
  transition:
    max-height .5s cubic-bezier(0, 0.49, 0.58, 1),
    opacity    .38s ease-out,
    visibility 0s   linear;
}

.mega__layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  max-width: var(--container);
  margin: 0 auto;
  min-height: 480px;
}

/* Categories list (left rail) */
.mega__cats {
  list-style: none;
  margin: 0;
  padding: 24px 0;
  border-right: 1px solid var(--c-line-soft);
  background: linear-gradient(180deg, #fafafa 0%, #fff 80%);
}
.mega__cat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 28px 13px 30px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
  position: relative;
  transition: background .2s ease, color .2s ease, padding .2s ease;
}
.mega__cat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--c-accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.mega__cat:hover,
.mega__cat.is-active {
  background: #fff;
  color: var(--c-accent);
  padding-left: 36px;
}
.mega__cat.is-active::before { transform: scaleY(1); }
.mega__cat .num {
  font-family: var(--ff-disp);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: color .2s ease;
}
.mega__cat.is-active .num,
.mega__cat:hover .num { color: var(--c-accent); }
.mega__cat .name {
  flex: 1;
  white-space: nowrap;
}
.mega__cat .arrow {
  display: inline-flex;
  align-items: center;
  color: var(--c-accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease;
}
.mega__cat.is-active .arrow,
.mega__cat:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Panels container (right) */
.mega__panels {
  position: relative;
  padding: 32px 48px 40px;
}
.mega__panel {
  position: absolute;
  inset: 32px 48px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.mega__panel.is-active {
  position: relative;
  inset: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.mega__panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 18px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--c-line-soft);
}
.mega__panel-head h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.mega__view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  transition: gap .25s ease;
}
.mega__view:hover { gap: 10px; color: var(--c-accent-d); }
.mega__view span { transition: transform .25s ease; }
.mega__view:hover span { transform: translateX(2px); }

.mega__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 20px;
}
.mega__prod {
  display: block;
  text-decoration: none;
  color: var(--c-ink);
  transition: transform .25s ease;
}
.mega__prod:hover { transform: translateY(-3px); }
.mega__prod-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--c-bg-alt);
  margin-bottom: 10px;
  transition: box-shadow .25s ease;
}
.mega__prod:hover .mega__prod-img {
  box-shadow: 0 12px 24px -8px rgba(0,0,0,.16);
}
.mega__prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.mega__prod:hover .mega__prod-img img { transform: scale(1.06); }
.mega__prod strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
  margin-bottom: 3px;
  transition: color .2s ease;
}
.mega__prod:hover strong { color: var(--c-accent); }
.mega__prod em {
  font-style: normal;
  font-size: 11px;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  font-family: var(--ff-disp);
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 1280px) {
  .mega__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .mega { display: none !important; }
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--c-ink);
  transition: all var(--t-base);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.16);
    max-height: 0;
    overflow: hidden;
    /* Closing: same curve as mega menu */
    transition: max-height .42s cubic-bezier(0, 0.49, 0.58, 1);
  }
  .nav.is-open {
    /* Opening: longer + same curve. JS sets precise max-height via inline style */
    transition: max-height .5s cubic-bezier(0, 0.49, 0.58, 1);
  }
  .nav__list {
    flex-direction: column;
    padding: 20px 0;
    gap: 0;
  }
  .nav__link {
    padding: 14px 40px;
    width: 100%;
    color: var(--c-ink);     /* dark text on white mobile dropdown */
  }
  .nav__link:hover,
  .nav__link.active { color: var(--c-accent); }
  .nav__link::after { display: none; }
  .mega { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 600px) {
  .header__inner { height: 56px; }
  .logo img { width: 30px; }
  .logo__text strong { font-size: 13.5px; }
  .header__actions .btn { display: none; }
}

/* =====================================================
   Hero / Slider
   ===================================================== */

.hero {
  position: relative;
  height: calc(100vh - 100px);   /* leave 100px white strip below hero (Bodor pattern) */
  min-height: 620px;
  overflow: hidden;
  background: #0f0f10;
}
.slider {
  position: absolute;
  inset: 0;
}
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 6s ease;
  display: flex;
  align-items: flex-start;
}
.slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}
.slide__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}
.slide__content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 1180px;
  padding-top: 105px;
  text-align: center;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease .2s, transform 1s cubic-bezier(.2,.7,.2,1) .2s;
}
@media (max-width: 768px) {
  .slide__content { padding-top: 75px; }
}
.slide.is-active .slide__content {
  opacity: 1;
  transform: translateY(0);
}
.slide__content .eyebrow {
  color: rgba(255,255,255,.92);
  margin-bottom: 12px;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.slide__title {
  color: #fff;
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin-bottom: 24px;
  text-shadow: 0 2px 20px rgba(0,0,0,.34), 0 1px 3px rgba(0,0,0,.2);
}
.slide__desc {
  font-size: clamp(15px, 1.25vw, 19px);
  color: rgba(255,255,255,.92);
  max-width: 800px;
  margin: 0 auto 48px;
  line-height: 1.6;
  text-shadow: 0 1px 12px rgba(0,0,0,.4);
}
.slide__cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: all var(--t-fast);
}
.slider__arrow:hover {
  background: #fff;
  color: var(--c-ink);
  border-color: #fff;
}
.slider__arrow--prev { left: 40px; }
.slider__arrow--next { right: 40px; }

@media (max-width: 768px) {
  .slider__arrow { display: none; }
  .hero { min-height: 540px; }
}

.slider__dots {
  position: absolute;
  bottom: 60px;             /* lifted up to avoid overlap with the ticker bridge */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
.dot {
  width: 36px;
  height: 3px;
  border-radius: 0;
  border: 0;
  background: rgba(255,255,255,.35);
  padding: 0;
  cursor: pointer;
  transition: background var(--t-fast), width var(--t-base);
}
.dot.is-active { background: #fff; width: 56px; }

.hero__scroll {
  position: absolute;
  right: 40px;
  bottom: 30px;
  z-index: 5;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255,255,255,.5), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: #fff;
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(330%); }
}
@media (max-width: 900px) {
  .hero__scroll { display: none; }
}

/* =====================================================
   Hero–content bridge ticker (frosted glass, marquee)
   Sits half over hero bottom, half over intro top — visually
   connects the dramatic hero with the regular content below.
   ===================================================== */

.hero-ticker {
  position: relative;
  z-index: 5;
  width: min(1280px, calc(100% - 80px));
  /* Both negative margins = element has ZERO flow height, true "floating" overlay */
  margin: -40px auto -40px;
  height: 80px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -22px rgba(0, 0, 0, 0.35),
    0 6px 18px -6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hero-ticker__track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  padding: 0 24px;
  white-space: nowrap;
  animation: heroTicker 50s linear infinite;
}
.hero-ticker:hover .hero-ticker__track,
.hero-ticker:focus-within .hero-ticker__track {
  animation-play-state: paused;
}

@keyframes heroTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* loops since content is duplicated */
}

.hero-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  text-decoration: none;
  transition: color .25s ease;
  flex-shrink: 0;
}
.hero-ticker__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(142, 42, 42, 0.15);
}
.hero-ticker__item:hover { color: var(--c-accent); }

@media (max-width: 768px) {
  .hero-ticker {
    width: calc(100% - 32px);
    height: 64px;
    margin: -32px auto -32px;     /* both sides negative — no flow occupation */
    border-radius: 10px;
  }
  .hero-ticker__item {
    font-size: 15px;
    padding: 0 20px;
    gap: 10px;
  }
  .hero-ticker__track { animation-duration: 40s; }
}

/* =====================================================
   Intro / KPI
   ===================================================== */

.section--intro {
  padding-bottom: 120px;
  background: var(--c-bg-alt);
}
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 90px;
}
.intro__body { padding-bottom: 6px; }
.intro__lead {
  font-size: 17px;
  color: var(--c-text);
  line-height: 1.7;
  margin: 0 0 24px;
}
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 30px; }
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.kpi__item {
  padding: 50px 30px;
  border-right: 1px solid var(--c-line);
  text-align: left;
}
.kpi__item:last-child { border-right: 0; }
.kpi__num {
  font-family: var(--ff-disp);
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
  white-space: nowrap;
}
.kpi__unit {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.5em;
  font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0;
  vertical-align: 0.18em;
}
.kpi__label {
  font-size: 14px;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .kpi__item:nth-child(2) { border-right: 0; }
  .kpi__item:nth-child(1), .kpi__item:nth-child(2) { border-bottom: 1px solid var(--c-line); }
  .kpi__item { padding: 36px 22px; }
}
@media (max-width: 480px) {
  .kpi { grid-template-columns: 1fr; }
  .kpi__item { border-right: 0; border-bottom: 1px solid var(--c-line); }
  .kpi__item:last-child { border-bottom: 0; }
}

/* =====================================================
   Products grid
   ===================================================== */

.section--products { background: #fff; }

/* ===== Tab row ===== */
.prod-tabs {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 56px;
}
.prod-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-muted);
  white-space: nowrap;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.prod-tab:hover { color: var(--c-ink); }
.prod-tab.is-active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ===== Panels (left dark card + right light card grid) ===== */
.prod-panels { position: relative; }
.prod-panel { display: none; }
.prod-panel.is-active {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  animation: prodFadeIn .35s ease;
}
@keyframes prodFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Left dark narrative card */
.prod-panel__left {
  background: #0f0f10;
  color: #fff;
  padding: 44px 36px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 480px;
}
/* Subtle 3D geometric depth in bottom-left (Bodor-style) */
.prod-panel__left::before {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -10%;
  width: 70%;
  height: 70%;
  background:
    linear-gradient(135deg,
      transparent 0%,
      transparent 25%, rgba(255,255,255,.025) 25%, rgba(255,255,255,.025) 28%,
      transparent 28%,
      transparent 45%, rgba(255,255,255,.03) 45%, rgba(255,255,255,.03) 49%,
      transparent 49%,
      transparent 68%, rgba(255,255,255,.04) 68%, rgba(255,255,255,.04) 75%,
      transparent 75%);
  pointer-events: none;
  opacity: .8;
}
.prod-panel__num {
  position: relative;
  font-family: var(--ff-disp);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  display: block;
  margin-bottom: 24px;
}
.prod-panel__title {
  position: relative;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 28px;
}
.prod-panel__desc {
  position: relative;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
  margin-bottom: 36px;
}
.prod-panel__link {
  position: relative;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.4);
  transition: gap .25s ease, border-color .25s ease;
}
.prod-panel__link span { transition: transform .25s ease; }
.prod-panel__link:hover { gap: 14px; border-bottom-color: #fff; }
.prod-panel__link:hover span { transform: translateX(4px); }

/* Right card grid */
.prod-panel__right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.prod-panel__right--duo  { grid-template-columns: repeat(2, 1fr); }
.prod-panel__right--solo { grid-template-columns: 1fr; }

.prod-feature {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 15, 16, 0.06);
  border-radius: 10px;
  padding: 5px 24px;          /* 5px 上下，24px 左右 — image gets max vertical room */
  text-decoration: none;
  color: var(--c-ink);
  transition: transform .3s cubic-bezier(.2,.7,.2,1),
              box-shadow .3s ease,
              border-color .25s ease;
  min-height: 230px;
}
.prod-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 15, 16, 0.1);
  box-shadow: 0 22px 40px -16px rgba(0, 0, 0, 0.15);
}
.prod-feature__head {
  padding-top: 12px;            /* small head breathing room */
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line);
}
.prod-feature strong {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color .25s ease;
}
.prod-feature:hover strong { color: var(--c-accent); }
.prod-feature em {
  font-style: normal;
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.prod-feature__img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;                       /* fill ALL remaining card space */
  min-height: 180px;             /* lower bound so very wide images still have room */
  margin-top: auto;
  overflow: hidden;
}
.prod-feature__img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.prod-feature:hover .prod-feature__img img { transform: scale(1.05); }

/* Single-product layout: card spans width, image bigger */
.prod-panel__right--solo .prod-feature {
  min-height: 480px;
  padding: 5px 40px;       /* 5px top/bottom matches grid cards */
}
.prod-panel__right--solo .prod-feature__img {
  min-height: 400px;
  flex: 1;
}
.prod-panel__right--solo .prod-feature__img img {
  max-height: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .prod-panel.is-active {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .prod-panel__left { min-height: auto; padding: 36px 32px; }
  .prod-panel__right { grid-template-columns: repeat(2, 1fr); }
  .prod-panel__right--solo .prod-feature {
    min-height: 360px;
  }
}
@media (max-width: 768px) {
  /* 3 × 3 grid: cleaner than horizontal scroll, all categories visible at once */
  .prod-tabs {
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--c-line);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 36px;
  }
  .prod-tab {
    padding: 16px 8px;
    font-size: 16px;
    border-bottom: 1px solid var(--c-line);
    border-right: 1px solid var(--c-line);
    border-top: 0;
    border-left: 0;
    margin: 0;
    white-space: normal;        /* allow 2-line wrap if needed */
    line-height: 1.25;
    min-height: 58px;
  }
  .prod-tab:nth-child(3n) { border-right: 0; }
  .prod-tab:nth-child(n+7) { border-bottom: 0; }
  .prod-tab.is-active {
    color: var(--c-accent);
    background: rgba(142, 42, 42, 0.06);
    border-bottom-color: var(--c-line);   /* reset desktop's 3px red border */
  }

  .prod-panel__right { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .prod-panel__right--duo { grid-template-columns: repeat(2, 1fr); }
  .prod-panel__right--solo { max-width: 100%; }
  .prod-panel__features li span { width: 70px; font-size: 13px; }
}

/* =====================================================
   Why us
   ===================================================== */

.why-block {
  margin-top: 90px;        /* breathing room from KPI bar above */
}
.why-subhead {
  font-family: var(--ff-disp);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-align: center;
  margin: 0 0 40px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
}

@media (max-width: 900px) {
  .why-block { margin-top: 60px; }
}
.why-card {
  padding: 48px 36px;
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  background: #fff;
  transition: background var(--t-base);
}
.why-card:hover { background: var(--c-bg-alt); }
.why-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-accent-l);
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.why-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.why-card p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--c-text);
}

@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-card { padding: 36px 28px; }
}

/* =====================================================
   Global Partner Program — wide carousel (Bodor case-study pattern,
   repurposed for distributor recruitment)
   ===================================================== */

.section--partners { background: var(--c-bg-alt); }

.ptn-track-wrap {
  overflow: hidden;
}
.ptn-track {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  /* 60vw center card + 20vw peek each side = 100vw total */
  padding: 6px 20vw 24px;
  scroll-padding-inline: 20vw;
}
.ptn-card {
  flex: 0 0 60vw;               /* center card occupies 60% of viewport */
}
.ptn-track::-webkit-scrollbar { display: none; }

.ptn-card {
  scroll-snap-align: start;     /* aligned to scroll-padding-inline (20vw from left) */
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .35s ease;
  max-width: 1500px;            /* cap on ultra-wide displays */
}
.ptn-card:hover {
  box-shadow: 0 28px 56px -22px rgba(0, 0, 0, 0.2);
}
.ptn-card__link {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  text-decoration: none;
  color: var(--c-ink);
  min-height: 460px;
}
.ptn-card__media {
  background: #ddd;
  overflow: hidden;
}
.ptn-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.ptn-card:hover .ptn-card__media img { transform: scale(1.04); }

.ptn-card__body {
  padding: 60px 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.ptn-card__tag {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 700;
  margin-bottom: 22px;
}
.ptn-card__title {
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--c-ink);
  margin: 0 0 24px;
  /* Reserve 2 lines so cards align even if title is short */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.15em * 2);
}
.ptn-card__desc {
  font-size: 15px;
  line-height: 1.72;
  color: var(--c-text);
  margin: 0 0 32px;
  /* Clamp to 4 lines and reserve 4-line min-height — locks all cards to same height */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.72em * 4);
}
.ptn-card__link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-ink);
  align-self: flex-start;
  transition: gap .25s ease, color .25s ease, border-color .25s ease;
}
.ptn-card__link-arrow span { transition: transform .25s ease; }
.ptn-card:hover .ptn-card__link-arrow {
  gap: 14px;
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.ptn-card:hover .ptn-card__link-arrow span { transform: translateX(3px); }

/* Strong CTA below carousel */
.ptn-cta {
  text-align: center;
  margin-top: 52px;
}
.ptn-cta p {
  font-size: 15px;
  color: var(--c-text);
  margin: 0 0 22px;
  letter-spacing: 0.01em;
}
.ptn-cta .btn span {
  transition: transform .25s ease;
  display: inline-block;
}
.ptn-cta .btn:hover span { transform: translateX(3px); }

@media (max-width: 1024px) {
  .ptn-track { padding-inline: 10vw; scroll-padding-inline: 10vw; gap: 20px; }
  .ptn-card { flex-basis: 80vw; }
  .ptn-card__link { grid-template-columns: 1fr; min-height: auto; }
  .ptn-card__media { aspect-ratio: 16 / 9; }
  .ptn-card__body { padding: 40px 36px 36px; }
}
@media (max-width: 640px) {
  .ptn-track { padding-inline: 5vw; scroll-padding-inline: 5vw; gap: 16px; }
  .ptn-card { flex-basis: 90vw; }
  .ptn-card__body { padding: 32px 28px; }
  .ptn-card__title { font-size: 22px; }
}

/* =====================================================
   News & Insights — Centered header + 3-up blog cards
   (Bodor "Core Technologies" layout + blog card style)
   ===================================================== */

.section--news { background: #fff; }

/* Centered header (Bodor pattern) */
.news-head {
  text-align: center;
  max-width: none;        /* let it span container — desktop wants single-line */
  margin: 0 auto 64px;
}

/* Desktop: title + subtitle each on one line (no wrap) */
@media (min-width: 1024px) {
  .news-head__title { white-space: nowrap; }
  .news-head__sub   { white-space: nowrap; }
}
.news-head .eyebrow {
  display: inline-block;
  margin-bottom: 16px;
}
.news-head__title {
  font-family: var(--ff-disp);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-ink);
  margin: 0 0 18px;
}
.news-head__sub {
  font-size: 16px;
  color: var(--c-text);
  line-height: 1.65;
  margin: 0;
}

/* Track — horizontal scroll with snap (responsive carousel) */
.news-track-wrap {
  overflow: hidden;
  margin: 0 -6px;
}
.news-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 56px) / 3);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 6px 6px 18px;
}
.news-track::-webkit-scrollbar { display: none; }

/* Card */
.news-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid rgba(15, 15, 16, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s ease,
              border-color .25s ease;
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 15, 16, 0.12);
  box-shadow: 0 26px 50px -18px rgba(0, 0, 0, 0.18);
}
.news-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--c-ink);
  height: 100%;
}

/* Media + category badge */
.news-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-alt);
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.news-card:hover .news-card__media img { transform: scale(1.05); }

.news-card__cat {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  background: rgba(15, 15, 16, 0.78);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  line-height: 1.4;
}

/* Body */
.news-card__body {
  padding: 22px 24px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-card__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.35;
  color: var(--c-ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2);   /* reserve 2 lines → uniform card heights */
  transition: color .25s ease;
}
.news-card:hover .news-card__title { color: var(--c-accent); }
.news-card__excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.6em * 2);   /* reserve 2 lines */
}

/* Footer divider with views + date */
.news-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--c-line-soft);
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--c-muted);
  font-weight: 500;
}
.news-card__views {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.news-card__views svg { opacity: 0.65; flex-shrink: 0; }
.news-card__date {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Navigation arrows (Bodor pattern) */
.news-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 48px;
}
.news-nav__btn {
  width: 48px;
  height: 48px;
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-ink);
  transition: background .25s ease,
              color .25s ease,
              border-color .25s ease,
              transform .25s ease;
}
.news-nav__btn:hover {
  background: var(--c-ink);
  color: #fff;
  border-color: var(--c-ink);
  transform: translateY(-2px);
}
.news-nav__btn:disabled {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Responsive — visible cards per breakpoint */
@media (max-width: 1024px) {
  .news-track { grid-auto-columns: calc((100% - 24px) / 2); }   /* 2 visible */
}
@media (max-width: 640px) {
  .news-head { margin-bottom: 40px; }
  .news-track { grid-auto-columns: 86%; gap: 16px; }            /* 1 visible with peek */
  .news-card__title { font-size: 16px; }
}

/* =====================================================
   Three-way action grid (Bodor minimal CTA pattern)
   ===================================================== */

.section--actions { background: #fff; }

.actions__title {
  text-align: center;
  font-family: var(--ff-disp);
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-ink);
  margin: 0 0 64px;
}

.actions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 90px 32px;
  border: 1.5px solid var(--c-line);
  border-radius: 14px;
  background: transparent;
  text-decoration: none;
  color: var(--c-ink);
  text-align: center;
  min-height: 320px;
  transition: border-color .3s ease,
              background .3s ease,
              transform .3s cubic-bezier(.2,.7,.2,1),
              box-shadow .3s ease;
}
.action-card:hover {
  border-color: var(--c-ink);
  background: #fafafa;
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.15);
}

.action-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink);
  transition: color .3s ease, transform .3s ease;
}
.action-card:hover .action-card__icon { transform: scale(1.06); }

.action-card__label {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--c-ink);
  transition: color .25s ease;
}
.action-card:hover .action-card__label { color: var(--c-accent); }

.action-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), color .25s ease;
}
.action-card:hover .action-card__arrow {
  transform: translateX(8px);
  color: var(--c-accent);
}

@media (max-width: 900px) {
  .actions__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  /* Horizontal pill layout — icon left / label center / arrow right */
  .action-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    min-height: 0;
    gap: 16px;
  }
  .action-card__icon { flex-shrink: 0; }
  .action-card__icon svg { width: 26px; height: 26px; }
  .action-card__label {
    flex: 1;
    text-align: center;
    font-size: 17px;
  }
  .action-card__arrow { flex-shrink: 0; }
  .action-card__arrow svg { width: 20px; height: 20px; }
  .action-card:hover .action-card__icon { transform: none; }
  .action-card:hover .action-card__arrow { transform: translateX(4px); }
}

/* =====================================================
   Footer
   ===================================================== */

.footer {
  background: #0a0a0b;
  color: rgba(255,255,255,.6);
  padding-top: 80px;
}
.footer__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 60px;
  padding-bottom: 60px;
}
.footer__brand .logo img {
  width: 50px;
  filter: brightness(0) invert(1);
  opacity: .9;
}
.footer__brand .logo__text strong { color: #fff; }
.footer__brand .logo__text em { color: rgba(255,255,255,.45); }
.footer__about {
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.55);
}
.footer__col h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer__col li {
  font-size: 15px;
  color: rgba(255,255,255,.55);
}
.footer__col a:hover { color: #fff; }
.footer__contact li {
  display: flex;
  flex-direction: column;
}
.footer__contact li span {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 4px;
}
.footer__contact li:not(:has(span)) { }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0;
  font-size: 13.5px;
}
.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: #fff; }

@media (max-width: 900px) {
  .footer__main { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .footer { padding-top: 56px; }
  .footer__main {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 40px;
  }
  .footer__brand { padding-bottom: 28px; }

  /* Accordion rows */
  .footer__col {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
  }
  .footer__col h4 {
    position: relative;
    margin: 0;
    padding: 22px 36px 22px 0;
    cursor: pointer;
    user-select: none;
  }
  .footer__col h4::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
    transition: transform .3s ease;
  }
  .footer__col.is-open h4::after {
    transform: translateY(-50%) rotate(45deg);
  }

  .footer__col ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1),
                padding .35s ease,
                opacity .35s ease;
    padding-bottom: 0;
    opacity: 0;
  }
  .footer__col.is-open ul {
    max-height: 480px;
    padding-bottom: 22px;
    opacity: 1;
  }

  .footer__col:last-of-type {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* =====================================================
   Right side floating action rail — Bodor-style
   半透明白胶囊 + 独立黑色圆按钮 + 文字标签
   ===================================================== */

.side-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 14px;
  width: 84px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 54px;
  box-shadow:
    0 18px 44px rgba(15, 15, 16, .10),
    0 4px 12px rgba(15, 15, 16, .05),
    inset 0 1px 0 rgba(255,255,255,.6);
}

.rail-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: none;
  color: var(--c-ink);
}

.rail-item__btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #0f0f10;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 15, 16, .22);
  transition: transform .3s cubic-bezier(.2,.7,.2,1),
              box-shadow .3s cubic-bezier(.2,.7,.2,1),
              background .25s ease;
}
.rail-item__btn svg { width: 48px; height: 48px; }
.rail-item--top .rail-item__btn svg { width: 38px; height: 38px; }

.rail-item:hover .rail-item__btn {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 22px rgba(15, 15, 16, .28);
}

.rail-item__btn--avatar {
  background: linear-gradient(180deg, #e7ebf2, #c8cfde);
  padding: 0;
}
.rail-item__btn--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rail-item__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  white-space: nowrap;
  line-height: 1.2;
  transition: color .25s ease;
}
.rail-item:hover .rail-item__label { color: var(--c-accent); }

/* "Top" default = dim/inactive; activates on scroll */
.rail-item--top .rail-item__btn {
  background: rgba(15, 15, 16, .08);
  color: rgba(15, 15, 16, .35);
  box-shadow: none;
}
.rail-item--top .rail-item__label { color: rgba(15, 15, 16, .35); }
.rail-item--top { pointer-events: none; }

.side-rail.show-top .rail-item--top { pointer-events: auto; }
.side-rail.show-top .rail-item--top .rail-item__btn {
  background: #0f0f10;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 15, 16, .22);
}
.side-rail.show-top .rail-item--top .rail-item__label { color: var(--c-ink); }

/* Optional hover tooltip with extra info (sliding from left) */
.rail-item__tip {
  position: absolute;
  right: calc(100% + 16px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #0f0f10;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 2;
}
.rail-item__tip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #0f0f10;
}
.rail-item__tip strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}
.rail-item__tip em {
  font-style: normal;
  color: rgba(255,255,255,.72);
  font-size: 12.5px;
}
.rail-item:hover .rail-item__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Mobile: full-width bottom tab bar (iOS-style nav), Top hidden */
@media (max-width: 768px) {
  .side-rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: auto;

    /* CSS Grid gives deterministic equal columns — flex:1 was inconsistent with min-content */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 0;

    /* Padding accommodates iPhone safe-area home indicator */
    padding: 10px 4px calc(10px + env(safe-area-inset-bottom)) 4px;

    /* Solid bar with iOS-style glass */
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0;
    box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.08);
  }

  /* Hide Top on mobile — system gestures (iOS status-bar tap) cover this */
  .rail-item--top { display: none !important; }

  /* Each item centers within its 1fr column; min-width:0 forces shrink */
  .rail-item {
    min-width: 0;
    max-width: 100%;
    padding: 0;
    gap: 5px;
    overflow: hidden;
  }

  /* Slightly smaller icons + label always visible */
  .rail-item__btn { width: 40px; height: 40px; }
  .rail-item__btn svg { width: 38px; height: 38px; }
  .rail-item__label {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.2;
  }
  .rail-item__tip { display: none; }
}

/* Reserve bottom space on mobile so the fixed bar never covers content / footer */
@media (max-width: 768px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}

/* =====================================================
   Scroll-in animations
   ===================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.fade-up.is-in { opacity: 1; transform: translateY(0); }
