/* ============================================================
   Vulcanest — redesign3
   AI Reasoning for Industrials
   Theme: deep navy + electric / light blue
   ============================================================ */

:root {
  /* Surfaces — deep navy */
  --bg:        #050a16;
  --bg-2:      #081020;
  --surface:   #0d1730;
  --surface-2: #122142;
  --border:    rgba(140, 180, 255, 0.10);
  --border-2:  rgba(140, 180, 255, 0.22);

  /* Text */
  --text:      #eaf1ff;
  --muted:     #9fb4d8;
  --muted-2:   #6b80a8;

  /* Brand — dark blue primary + light/electric blue accent */
  --blue:      #1d4ed8;   /* deep blue */
  --blue-2:    #3b82f6;   /* primary blue */
  --sky:       #38bdf8;   /* light/electric blue */
  --sky-2:     #7dd3fc;   /* pale sky */
  --cyan:      #22d3ee;   /* cyan edge */

  --blue-glow: rgba(37, 99, 235, 0.45);
  --sky-glow:  rgba(56, 189, 248, 0.32);

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 78% -8%, var(--blue-glow), transparent 60%),
    radial-gradient(55rem 38rem at 5% 12%, var(--sky-glow), transparent 55%),
    var(--bg);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--muted); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container--narrow { max-width: 720px; }

.section { padding: clamp(2.5rem, 5vw, 4.25rem) 0; position: relative; }
.section--tight { padding: clamp(2rem, 4vw, 3.25rem) 0; }

/* ---------- Eyebrow / lead ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sky-2);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--sky), transparent);
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 60ch; }

.accent { color: var(--sky); }
.text-grad {
  background: linear-gradient(100deg, var(--sky-2), var(--sky) 45%, var(--blue-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Section heading block ---------- */
.shead { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.shead--center { margin-inline: auto; text-align: center; }
.shead--center .lead { margin-inline: auto; }
.shead h2 { margin-bottom: .8rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: .95rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn--primary {
  background: linear-gradient(100deg, var(--blue), var(--blue-2) 60%, var(--sky));
  color: #ffffff;
  box-shadow: 0 12px 30px -10px var(--blue-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px var(--blue-glow); }
.btn--ghost {
  background: rgba(140, 180, 255, .04);
  color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover { border-color: var(--sky); transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Pills ---------- */
.pill {
  font-size: .82rem; font-weight: 600;
  padding: .45rem .9rem; border-radius: 999px;
  border: 1px solid var(--border-2);
  background: rgba(140, 180, 255, .04);
}
.pill--sky   { color: var(--sky-2); border-color: rgba(56, 189, 248, .35); }
.pill--blue  { color: #bcd0ff; border-color: rgba(59, 130, 246, .35); }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cards (shared) ---------- */
.card {
  padding: 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  transition: transform .2s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; margin-bottom: 1rem; color: var(--sky);
  background: rgba(56, 189, 248, .10); border: 1px solid rgba(56, 189, 248, .22);
}
.card__icon svg { width: 24px; height: 24px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(5, 10, 22, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(5, 10, 22, 0.92); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.18rem; letter-spacing: .01em; }
.brand__mark { width: 32px; height: 32px; display: grid; place-items: center; color: var(--sky); }
.brand__mark svg { width: 30px; height: 30px; }
.brand__word { color: var(--text); }
.brand__est {
  background: linear-gradient(100deg, var(--sky), var(--sky-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav .brand { font-size: 1.6rem; gap: .7rem; }
.nav .brand__mark { width: 44px; height: 44px; }
.nav .brand__mark svg { width: 41px; height: 41px; }

.nav__brandwrap { display: flex; align-items: center; gap: .85rem; }

/* Language selector */
/* Inline language toggle (EN / 繁體中文) — active one gets a sky outline */
.langsel {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--border-2); border-radius: 999px;
  background: rgba(140, 180, 255, .05);
}
.langsel a {
  font-size: .8rem; font-weight: 600; line-height: 1; color: var(--muted);
  padding: .35rem .7rem; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.langsel a:hover { color: var(--text); }
.langsel a.is-active {
  color: var(--sky); border-color: var(--sky);
  background: rgba(56, 189, 248, .1); box-shadow: 0 0 12px -2px var(--sky-glow);
}

.nav__links { display: flex; align-items: center; gap: 1.9rem; margin-left: auto; margin-right: 2rem; }
.nav__links a { font-size: .95rem; color: var(--muted); font-weight: 500; position: relative; transition: color .2s ease; }
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: linear-gradient(90deg, var(--blue-2), var(--sky));
}
.nav__cta { display: flex; align-items: center; gap: 1rem; }
.nav__toggle {
  display: none; width: 42px; height: 42px; place-items: center;
  background: rgba(140, 180, 255, .05); border: 1px solid var(--border-2);
  border-radius: 10px; color: var(--text); cursor: pointer;
}
.nav__toggle svg { width: 22px; height: 22px; }

/* ============================================================
   PAGE HERO (sub pages)
   ============================================================ */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 3rem); }
.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.page-hero--photo {
  position: relative; isolation: isolate;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  min-height: min(90vh, 880px); display: flex; align-items: center;
}
.page-hero--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(5,10,22,.72) 0%, rgba(5,10,22,.48) 48%, rgba(5,10,22,.20) 100%);
}

/* Keep the heading visible on entry: standard hero height, anchor image to the
   top (so the bottom of the image is cropped, not the subject/heading area). */
.page-hero--top { background-position: center top; }
/* A slightly taller hero banner */
.page-hero--tall { min-height: min(92vh, 900px); }

/* Legal / prose pages (privacy, terms) */
.legal { max-width: 760px; }
.legal p { margin: 0 0 1rem; color: var(--muted); line-height: 1.75; }
.legal h2 { margin: 2rem 0 .6rem; font-size: 1.15rem; color: var(--text); }
.legal ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.legal li { margin-bottom: .5rem; color: var(--muted); line-height: 1.7; }
.legal a { color: var(--sky-2); }
.legal a:hover { color: var(--sky); }
.legal strong { color: var(--text); }
.legal-head .lead { color: var(--muted-2); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem; background: var(--bg-2); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 2.5rem; }
.footer h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 1rem; }
.footer a { display: block; color: var(--muted); margin-bottom: .55rem; transition: color .2s ease; }
.footer a:hover { color: var(--sky); }
.footer__addr { color: var(--muted); font-size: .92rem; line-height: 1.8; margin-top: 1rem; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  color: var(--muted-2); font-size: .85rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__toggle { display: grid; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem;
    position: absolute; top: 72px; left: 0; right: 0; margin: 0;
    padding: 1.5rem 24px 2rem; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .nav.open .nav__links a.active::after { display: none; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  /* Compact nav so brand + EN/繁體中文 toggle + menu button fit small phones */
  .nav .container { padding-inline: 16px; }
  .nav .brand { font-size: 1.12rem; gap: .45rem; }
  .nav .brand__mark { width: 32px; height: 32px; }
  .nav .brand__mark svg { width: 29px; height: 29px; }
  .nav__brandwrap { gap: .5rem; }
  .langsel a { font-size: .72rem; padding: .3rem .5rem; }
}
