/* ============================================================
   iThermTec / KULI — Shared Styles
   Aesthetic: Light, premium, frosted-glass accents, cool-blue technical precision
   ============================================================ */

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

/* Inter — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Inter — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Base palette — cool technical white */
  --bg: #F5F8FC;
  --bg-elev: #FFFFFF;
  --bg-soft: #EBF0F9;
  --bg-tint: #E2EAF6;

  /* Text — cool-shifted */
  --ink: oklch(0.14 0.010 258);
  --ink-2: oklch(0.36 0.012 255);
  --ink-3: oklch(0.54 0.012 252);
  --ink-4: oklch(0.70 0.010 250);

  /* Primary accent — engineering blue (aligned with logo) */
  --accent: oklch(0.50 0.22 253);
  --accent-ink: oklch(0.38 0.20 254);
  --accent-soft: oklch(0.93 0.05 252);

  /* Secondary accent — teal (visual variety, prevents monotony) */
  --accent-2: oklch(0.58 0.16 196);
  --accent-2-soft: oklch(0.93 0.05 196);

  /* Lines & glass — blue-tinted */
  --line: oklch(0.89 0.014 248);
  --line-2: oklch(0.82 0.018 246);
  --glass-bg: rgba(245, 248, 252, 0.66);
  --glass-bg-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.76);
  --glass-shadow: 0 8px 30px rgba(10, 25, 80, 0.07);

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
}

/* Dark mode — Midnight Slate */
.theme-dark {
  --bg: #0D1525;
  --bg-elev: #162038;
  --bg-soft: #1C2840;
  --bg-tint: #223050;

  --ink: oklch(0.95 0.006 250);
  --ink-2: oklch(0.76 0.012 252);
  --ink-3: oklch(0.58 0.014 252);
  --ink-4: oklch(0.44 0.010 250);

  --accent: oklch(0.66 0.22 252);
  --accent-ink: oklch(0.80 0.16 252);
  --accent-soft: oklch(0.26 0.10 252);

  --accent-2: oklch(0.68 0.16 196);
  --accent-2-soft: oklch(0.26 0.08 196);

  --line: oklch(0.26 0.016 252);
  --line-2: oklch(0.33 0.018 252);
  --glass-bg: rgba(18, 28, 52, 0.65);
  --glass-bg-strong: rgba(22, 34, 60, 0.88);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
  scroll-behavior: smooth;
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* ---------- Background ambient ---------- */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
}
.ambient::before {
  /* Blue-indigo haze — top-left */
  background: radial-gradient(circle, oklch(0.88 0.08 252) 0%, transparent 60%);
  top: -10vw; left: -10vw;
}
.ambient::after {
  /* Teal haze — bottom-right, prevents monotony */
  background: radial-gradient(circle, oklch(0.88 0.07 196) 0%, transparent 60%);
  top: 30vh; right: -15vw;
}
.theme-dark .ambient::before {
  background: radial-gradient(circle, oklch(0.42 0.20 255) 0%, transparent 60%);
  opacity: 0.50;
}
.theme-dark .ambient::after {
  background: radial-gradient(circle, oklch(0.36 0.15 200) 0%, transparent 60%);
  opacity: 0.42;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 24px;
  transition: padding 240ms ease;
}
.nav.scrolled { padding: 10px 24px; }
.nav-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 18px 10px 22px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--glass-shadow);
  transition: background 240ms ease;
}
.nav.scrolled .nav-inner { background: var(--glass-bg-strong); }
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.nav-logo .logo-img {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: all 200ms ease;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.theme-dark .nav-link:hover { background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--ink); }
.nav-link.active::before {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--accent);
  border-radius: 2px;
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav-pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  transition: all 180ms ease;
}
.nav-pill:hover { color: var(--ink); border-color: var(--line-2); }
.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--ink);
  border: none;
  transition: all 180ms ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.theme-dark .nav-cta { background: #fff; color: #000; }

@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  border: none;
  transition: all 200ms ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.theme-dark .btn-primary { background: #fff; color: #000; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn .arrow { transition: transform 200ms ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-ink);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.025em; line-height: 1.05; }
.display {
  font-size: clamp(48px, 7.5vw, 96px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.h1 { font-size: clamp(36px, 4.5vw, 64px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.h2 { font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.h3 { font-size: clamp(20px, 1.6vw, 26px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.lede {
  font-size: clamp(17px, 1.3vw, 21px);
  color: var(--ink-2);
  line-height: 1.5;
  font-weight: 400;
}
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: 120px 0;
  z-index: 1;
}
.section.tight { padding: 80px 0; }
.section-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 64px;
  max-width: 720px;
}

/* ---------- Glass card ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-lg);
}
.glass-strong {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: 0 16px 50px rgba(20,30,60,0.08);
  border-radius: var(--r-lg);
}

/* ---------- Module card ---------- */
.module-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  transition: all 280ms cubic-bezier(0.2, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  box-sizing: border-box;
}
.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%),
    oklch(0.60 0.20 252 / 0.10), transparent 40%);
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: 0 14px 40px rgba(20,30,60,0.06);
}
.theme-dark .module-card:hover {
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}
.module-card:hover::before { opacity: 1; }

.module-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  margin-bottom: 18px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 14px; color: var(--ink-2); transition: color 160ms ease; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------- Image placeholder ---------- */
.placeholder {
  position: relative;
  border-radius: var(--r-md);
  background:
    repeating-linear-gradient(135deg,
      oklch(0.95 0.005 250) 0 12px,
      oklch(0.97 0.003 250) 12px 24px);
  border: 1px dashed var(--line-2);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  overflow: hidden;
}
.theme-dark .placeholder {
  background:
    repeating-linear-gradient(135deg,
      oklch(0.16 0.008 250) 0 12px,
      oklch(0.18 0.008 250) 12px 24px);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms cubic-bezier(0.2, 0, 0.2, 1),
              transform 800ms cubic-bezier(0.2, 0, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero thermal canvas ---------- */
.thermal-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 20% 30%, oklch(0.86 0.14 30 / 0.55), transparent 50%),
    radial-gradient(ellipse at 75% 25%, oklch(0.90 0.12 80 / 0.5), transparent 50%),
    radial-gradient(ellipse at 60% 80%, oklch(0.85 0.12 220 / 0.6), transparent 55%),
    radial-gradient(ellipse at 30% 75%, oklch(0.88 0.10 270 / 0.45), transparent 55%);
  filter: blur(20px);
  opacity: 0.85;
}

/* iso-line overlay */
.thermal-iso {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(ellipse at 30% 40%,
      transparent 0,
      transparent 18px,
      rgba(255,255,255,0.18) 18px,
      rgba(255,255,255,0.18) 19px);
  mix-blend-mode: overlay;
}

/* ---------- Stat tile ---------- */
.stat {
  padding: 28px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.stat .num {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--ink), var(--accent-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat .lbl { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- Tag chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}

.app-visual-tags {
  position: absolute;
  right: 24px;
  bottom: 14px;
  left: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.app-visual-chip {
  justify-content: center;
  min-height: 32px;
  line-height: 1.22;
  text-align: center;
  white-space: normal;
}

.app-visual-tags-en {
  right: auto;
  max-width: min(760px, calc(100% - 260px));
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(320px, auto);
  align-items: end;
}

.app-visual-tags-en .app-visual-chip:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: start;
  max-width: min(520px, 100%);
}

@media (max-width: 920px) {
  .app-visual-tags-en {
    max-width: calc(100% - 48px);
    grid-template-columns: 1fr;
  }
  .app-visual-tags-en .app-visual-chip:nth-child(3) {
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .app-visual-tags {
    right: 14px;
    bottom: 10px;
    left: 14px;
    gap: 6px;
  }
  .app-visual-chip {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 11px;
  }
}

/* ---------- Mobile nav fallback ---------- */
.nav-mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  align-items: center; justify-content: center;
}
@media (max-width: 860px) {
  .nav-mobile-toggle { display: inline-flex; }
}

/* ---------- Form ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  transition: all 180ms ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px oklch(0.50 0.22 253 / 0.14);
}
.field .err {
  color: oklch(0.58 0.20 25);
  font-size: 12px;
}
.field.invalid input,
.field.invalid textarea {
  border-color: oklch(0.58 0.20 25);
}

/* utilities */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
