/* Design tokens — daylight default + premium dark; GINHE blue accents */
:root,
html[data-theme="light"] {
  color-scheme: light;

  --bg:              #F3F5F8;
  --bg-soft:         #E9EEF4;
  --surface:         #FFFFFF;
  --surface-2:       #F7F9FC;
  --text:            #0B0D10;
  --text-2:          rgba(11, 13, 16, 0.68);
  --text-3:          rgba(11, 13, 16, 0.44);
  --text-secondary:  rgba(11, 13, 16, 0.62);
  --text-muted:      rgba(11, 13, 16, 0.42);
  --border:          rgba(11, 13, 16, 0.08);
  --border-strong:   rgba(11, 13, 16, 0.16);
  --border-mute:     rgba(11, 13, 16, 0.06);

  --navy:            #E8EDF4;
  /* 鲸跃银河品牌蓝 — 用于强调、描边、微光，不作大面积底色 */
  --accent:          #1A7FE0;
  --accent-hover:    #3DA8FF;
  --accent-deep:     #0F6BC4;
  --accent-soft:     rgba(26, 127, 224, 0.1);
  --accent-mid:      rgba(26, 127, 224, 0.18);
  --accent-line:     rgba(26, 127, 224, 0.42);
  --cta:             var(--accent);
  --cta-hover:       var(--accent-hover);
  --cta-text:        #FFFFFF;
  --gain:            #009E78;
  --gain-soft:       rgba(0, 158, 120, 0.12);
  --violet:          #6B4FE0;
  --violet-soft:     rgba(107, 79, 224, 0.12);
  --glow-cyan:       0 0 28px rgba(26, 127, 224, 0.18);
  --glow-cyan-lg:    0 0 48px rgba(26, 127, 224, 0.12), 0 0 96px rgba(26, 127, 224, 0.06);

  --muted-line:      rgba(11, 13, 16, 0.06);

  --accent-hairline: linear-gradient(
    90deg,
    transparent 0%,
    rgba(26, 127, 224, 0.08) 14%,
    rgba(26, 127, 224, 0.42) 36%,
    rgba(90, 170, 240, 0.7) 50%,
    rgba(26, 127, 224, 0.42) 64%,
    rgba(26, 127, 224, 0.08) 86%,
    transparent 100%
  );

  /* 白天高级渐变：冷白纸感 + 微量品牌蓝气韵 */
  --bg-gradient:
    radial-gradient(ellipse 85% 50% at 50% -8%, rgba(61, 168, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(26, 127, 224, 0.05) 0%, transparent 48%),
    linear-gradient(180deg, #F7F9FC 0%, #F0F3F7 48%, #F3F5F8 100%);

  --bg-gradient-soft:
    radial-gradient(ellipse 75% 48% at 48% 0%, rgba(61, 168, 255, 0.09) 0%, transparent 52%),
    radial-gradient(ellipse 40% 32% at 0% 85%, rgba(11, 13, 16, 0.03) 0%, transparent 48%),
    linear-gradient(180deg, #F5F7FA 0%, #EEF2F6 55%, #F3F5F8 100%);

  --bg-gradient-deep:
    radial-gradient(ellipse 65% 42% at 72% 0%, rgba(61, 168, 255, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #EEF2F7 0%, #E6EBF2 52%, #F0F3F7 100%);

  --sans:
    "SF Pro Display", "SF Pro Text",
    -apple-system, BlinkMacSystemFont,
    "Geist",
    "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC",
    "Helvetica Neue", Helvetica,
    "Segoe UI", sans-serif;

  --mono:
    "SF Mono", "Geist Mono",
    ui-monospace, Menlo, Consolas, monospace;

  --nav-h:           52px;
  --nav-max-w:       min(1120px, calc(100vw - 48px));
  --max:             1120px;
  --section-y:       clamp(100px, 12vw, 168px);
  --radius:          12px;
  --radius-sm:       10px;
  --radius-md:       14px;
  --radius-lg:       18px;
  --radius-xl:       22px;
  --pill:            999px;

  /* Nav island locked to night glass (identical in day / night) */
  --nav-glass:       rgba(255, 255, 255, 0.05);
  --nav-glass-scrolled: rgba(255, 255, 255, 0.08);
  --nav-glass-border: rgba(255, 255, 255, 0.2);
  --shadow-nav:
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  /* Semantic chrome — shared by components */
  --card-border:     rgba(11, 13, 16, 0.1);
  --card-border-hover: rgba(11, 13, 16, 0.22);
  --hover-fill:      rgba(11, 13, 16, 0.04);
  --hover-fill-strong: rgba(11, 13, 16, 0.07);
  --panel-bg:        #FFFFFF;
  --panel-bg-scrolled: #FFFFFF;
  --panel-inset:     rgba(255, 255, 255, 0.95);
  --overlay-scrim:   rgba(11, 13, 16, 0.42);
  --btn-primary-bg:  #0B0D10;
  --btn-primary-fg:  #FFFFFF;
  --btn-primary-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  --btn-ghost-border: rgba(11, 13, 16, 0.18);
  --btn-ghost-hover-bg: rgba(11, 13, 16, 0.04);
  --footer-bg:       #FFFFFF;
  --footer-fade:     rgba(243, 245, 248, 0.92);
  --footer-fg:       #0B0D10;
  --footer-muted:    rgba(11, 13, 16, 0.56);
  --footer-dim:      rgba(11, 13, 16, 0.42);
  --footer-line:     rgba(11, 13, 16, 0.1);
  --footer-sep:      rgba(11, 13, 16, 0.2);
  --modal-bg:        #FFFFFF;
  --modal-shadow:    0 32px 80px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(26, 127, 224, 0.1);
  --spot-glow:       rgba(26, 127, 224, 0.1);
  --ambient-glow:    rgba(26, 127, 224, 0.06);
  --card-sheen:      rgba(255, 255, 255, 0.55);
  --card-shadow-hover: 0 18px 44px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --logo-filter:     invert(1);
  --scroll-progress-mid: #0B0D10;
  --hero-base:       #E8EDF4;
  --media-ink:       #F5F5F7;
  --media-ink-2:     rgba(245, 245, 247, 0.82);
  --cad-tag-bg: #FFFFFF;
  --cad-tag-shadow: 0 8px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --section-after-bg:
    radial-gradient(ellipse 58% 36% at 18% 8%, rgba(26, 127, 224, 0.08), transparent 58%),
    radial-gradient(ellipse 42% 30% at 92% 18%, rgba(15, 23, 42, 0.03), transparent 55%),
    linear-gradient(180deg, #EEF2F7 0%, #F3F5F8 48%, #E8EDF4 100%);
  --promise-asset-bg:
    linear-gradient(145deg, rgba(26, 127, 224, 0.1) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), transparent 50%),
    #FFFFFF;
  --promise-rights-bg:
    radial-gradient(circle at 88% 12%, rgba(26, 127, 224, 0.06), transparent 42%),
    linear-gradient(180deg, #FFFFFF, #F7F9FC 100%);
  --promise-asset-shadow:
    inset 3px 0 0 var(--accent),
    0 18px 48px rgba(15, 23, 42, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg:              #000000;
  --bg-soft:         #070708;
  --surface:         #0B0B0C;
  --surface-2:       #121214;
  --text:            #F5F5F7;
  --text-2:          rgba(245, 245, 247, 0.72);
  --text-3:          rgba(245, 245, 247, 0.45);
  --text-secondary:  rgba(245, 245, 247, 0.72);
  --text-muted:      rgba(245, 245, 247, 0.45);
  --border:          rgba(255, 255, 255, 0.07);
  --border-strong:   rgba(255, 255, 255, 0.18);
  --border-mute:     rgba(255, 255, 255, 0.06);

  --navy:            #050506;
  --accent:          #3DA8FF;
  --accent-hover:    #6BC0FF;
  --accent-deep:     #1A7FE0;
  --accent-soft:     rgba(61, 168, 255, 0.1);
  --accent-mid:      rgba(61, 168, 255, 0.2);
  --accent-line:     rgba(61, 168, 255, 0.4);
  --cta:             var(--accent);
  --cta-hover:       var(--accent-hover);
  --cta-text:        #0a0a0a;
  --gain:            #00C896;
  --gain-soft:       rgba(0, 200, 150, 0.14);
  --violet:          #7B5CFF;
  --violet-soft:     rgba(123, 92, 255, 0.14);
  --glow-cyan:       0 0 28px rgba(61, 168, 255, 0.28);
  --glow-cyan-lg:    0 0 48px rgba(61, 168, 255, 0.18), 0 0 96px rgba(61, 168, 255, 0.08);

  --muted-line:      rgba(255, 255, 255, 0.055);

  --accent-hairline: linear-gradient(
    90deg,
    transparent 0%,
    rgba(61, 168, 255, 0.06) 14%,
    rgba(61, 168, 255, 0.38) 36%,
    rgba(170, 220, 255, 0.62) 50%,
    rgba(61, 168, 255, 0.38) 64%,
    rgba(61, 168, 255, 0.06) 86%,
    transparent 100%
  );

  --bg-gradient:
    radial-gradient(ellipse 85% 50% at 50% -8%, rgba(61, 168, 255, 0.055) 0%, transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(255, 255, 255, 0.028) 0%, transparent 48%),
    linear-gradient(180deg, #000000 0%, #09090a 48%, #000000 100%);

  --bg-gradient-soft:
    radial-gradient(ellipse 75% 48% at 48% 0%, rgba(61, 168, 255, 0.045) 0%, transparent 52%),
    radial-gradient(ellipse 40% 32% at 0% 85%, rgba(255, 255, 255, 0.02) 0%, transparent 48%),
    linear-gradient(180deg, #060607 0%, #000000 55%, #080809 100%);

  --bg-gradient-deep:
    radial-gradient(ellipse 65% 42% at 72% 0%, rgba(61, 168, 255, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #000000 0%, #0b0b0c 52%, #000000 100%);

  --nav-glass:       rgba(255, 255, 255, 0.05);
  --nav-glass-scrolled: rgba(255, 255, 255, 0.08);
  --nav-glass-border: rgba(255, 255, 255, 0.2);
  --shadow-nav:
    0 8px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  --card-border:     rgba(255, 255, 255, 0.12);
  --card-border-hover: rgba(255, 255, 255, 0.28);
  --hover-fill:      rgba(255, 255, 255, 0.06);
  --hover-fill-strong: rgba(255, 255, 255, 0.1);
  --panel-bg:        #0c0e12;
  --panel-bg-scrolled: #101218;
  --panel-inset:     rgba(255, 255, 255, 0.12);
  --overlay-scrim:   rgba(0, 0, 0, 0.72);
  --btn-primary-bg:  #FFFFFF;
  --btn-primary-fg:  #0a0a0a;
  --btn-primary-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  --btn-ghost-border: rgba(255, 255, 255, 0.28);
  --btn-ghost-hover-bg: rgba(255, 255, 255, 0.07);
  --footer-bg:       #000000;
  --footer-fade:     rgba(0, 0, 0, 0.35);
  --footer-fg:       #F5F5F7;
  --footer-muted:    rgba(245, 245, 247, 0.56);
  --footer-dim:      rgba(245, 245, 247, 0.36);
  --footer-line:     rgba(255, 255, 255, 0.1);
  --footer-sep:      rgba(245, 245, 247, 0.2);
  --modal-bg:        #0a0a0a;
  --modal-shadow:    0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(61, 168, 255, 0.08), 0 0 48px rgba(61, 168, 255, 0.1);
  --spot-glow:       rgba(255, 255, 255, 0.075);
  --ambient-glow:    rgba(255, 255, 255, 0.028);
  --card-sheen:      rgba(255, 255, 255, 0.06);
  --card-shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --logo-filter:     none;
  --scroll-progress-mid: #fff;
  --hero-base:       #050506;
  --media-ink:       #F5F5F7;
  --media-ink-2:     rgba(245, 245, 247, 0.82);
  --cad-tag-bg:
    linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.035) 48%,
      rgba(255, 255, 255, 0.02) 100%
    );
  --cad-tag-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 10px 28px rgba(0, 0, 0, 0.22);
  --section-after-bg:
    radial-gradient(ellipse 58% 36% at 18% 8%, rgba(61, 168, 255, 0.07), transparent 58%),
    radial-gradient(ellipse 42% 30% at 92% 18%, rgba(255, 255, 255, 0.03), transparent 55%),
    linear-gradient(180deg, #030406 0%, #000000 48%, #07090d 100%);
  --promise-asset-bg:
    linear-gradient(145deg, rgba(61, 168, 255, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%),
    rgba(8, 12, 18, 0.9);
  --promise-rights-bg:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%),
    rgba(255, 255, 255, 0.015);
  --promise-asset-shadow:
    inset 3px 0 0 var(--accent),
    0 18px 48px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

/* Same-origin multipage soft crossfade (Chromium) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--bg-gradient);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.47059;
  letter-spacing: -0.011em;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* fixed attachment causes paint jank on nav/scroll; keep scroll for perf */
  background-attachment: scroll;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
ol, ul { list-style: none; }
::selection { background: var(--accent-mid); color: var(--text); }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  text-shadow: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Soft panel corners — description / content blocks sitewide */
.panel-soft,
.hero-metric,
.home-link-card,
.home-prove-side,
.home-case-card,
.method-layer,
.company-culture-card,
.info-card,
.info-role,
.prove-why-item,
.prove-definition,
.solution-roi-item,
.privacy-toc,
.cta-form,
.product-card,
.product-service-card,
.truth-col,
.track-item,
.contrast-col,
.prove-note-col {
  border-radius: var(--radius-md);
}

/* Outline-only cards — no filled surface blocks */
.truth-col,
.home-case-card,
.method-layer,
.company-culture-card,
.info-card,
.info-role,
.prove-why-item,
.prove-note-col,
.prove-definition,
.solution-roi-item,
.privacy-toc,
.home-link-card,
.home-prove-side,
.track-item,
.contrast-col,
.hero-metric,
.cta-form {
  background: transparent !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--card-border);
}

.truth-col--good {
  border-color: var(--accent-line);
}

.is-card:hover,
.home-case-card:hover,
.home-link-card:hover,
.company-culture-card:hover,
.track-item:hover,
.method-layer:hover,
.info-card:hover,
.prove-why-item:hover {
  background: transparent !important;
}

/* Contiguous flow strips: round the outer shell only */
.loop-flow,
.prove-steps,
.standards-list,
.prove-alias-list {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(61, 168, 255, 0.25), var(--scroll-progress-mid) 45%, rgba(61, 168, 255, 0.85));
  box-shadow: none;
}

/* ── Premium card interaction ── */
.is-card {
  position: relative;
  isolation: isolate;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: linear-gradient(
    145deg,
    var(--card-sheen) 0%,
    transparent 45%,
    transparent 100%
  );
}

.is-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-hover);
  box-shadow: var(--card-shadow-hover);
}

.is-card:hover::before {
  opacity: 1;
}

.is-card > * {
  position: relative;
  z-index: 2;
}

/* Flush cells inside overflow strips — no lift */
.is-card--flush:hover {
  transform: none;
  box-shadow: none;
  background: transparent;
  border-color: var(--card-border-hover);
}

/* Soft pointer sheen — theme-aware glow */
.has-spotlight {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  --spot-x: 50%;
  --spot-y: 50%;
}

.has-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.45s ease;
  background: radial-gradient(
    300px circle at var(--spot-x) var(--spot-y),
    var(--spot-glow),
    transparent 60%
  );
}

.has-spotlight:hover::after {
  opacity: 1;
}

.is-magnetic {
  will-change: transform;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.15s ease, background 0.15s ease;
}

.hero-orb,
.hero-streak,
.hero-glow,
.hero-grid {
  transition: translate 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: translate;
}

/* Ambient pointer — barely visible */
.ambient-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  margin: -200px 0 0 -200px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(circle, var(--ambient-glow), transparent 70%);
  transition: opacity 0.5s ease;
}

.ambient-cursor.is-on {
  opacity: 1;
}

/* Keep page content above ambient glow */
body > section,
body > [data-partial="footer"] {
  position: relative;
  z-index: 2;
}

/* Overlays must sit above footer / page content (SSG strips data-partial) */
body > #contact-modal,
body > :has(> #contact-modal),
body > [data-partial="contact-modal"] {
  position: relative;
  z-index: 400;
}

body > #mobile-drawer,
body > :has(> #mobile-drawer),
body > [data-partial="mobile-drawer"] {
  position: relative;
  z-index: 250;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  .reveal { opacity: 1; transform: none; transition: none; will-change: auto; }
  .intro-band .intro-rotate,
  .hero-streak,
  .hero-orb,
  .cap-visual--grid .cap-grid-scan { animation: none !important; }
  .scroll-progress,
  .has-spotlight::after,
  .ambient-cursor,
  .is-card::before { display: none !important; }
  .is-magnetic { transition: none; }
  .is-card {
    transition: border-color 0.2s ease, background-color 0.2s ease;
  }
  .is-card:hover {
    transform: none;
    box-shadow: none;
  }
  .hero-orb,
  .hero-streak,
  .hero-glow,
  .hero-grid { transition: none; }
}
