/* ==========================================================================
   Omni Edge — Marketing Site
   Visual system: Brand Guideline (Chanel tokens) + Liquid Glass aesthetic
   Dark-first. All colors derive from the brand dark-mode palette.
   ========================================================================== */

:root {
  /* Brand dark-mode palette (from brand guideline §3.2 / §13) */
  --background: #121212;
  --surface: #1C1C1C;
  --foreground: #F2F2F2;
  --muted: #B5B5B5;
  --border: #292929;

  --beige: #C4B07D;
  --beige-gold: #B09A6B;

  --deep-blue: #7998C3;
  --nav-active: #0B2844;
  --nav-active-dark: #1D3A57;

  --success: #16A34A;

  /* Typography */
  /* Latin font first, CJK (Noto TC) as fallback — Latin glyphs use Playfair/Inter,
     Chinese glyphs fall back to Noto Serif/Sans TC. */
  --font-serif: "Playfair Display", "Noto Serif TC", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Noto Sans TC", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1120px;
  --radius: 24px;
  --radius-lg: 36px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient page background: subtle navy + beige glows over near-black,
   echoing the liquid-glass banner's radial light sources. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 8%, rgba(29, 58, 87, 0.55) 0%, rgba(29, 58, 87, 0.12) 30%, rgba(18, 18, 18, 0) 58%),
    radial-gradient(circle at 12% 88%, rgba(176, 154, 107, 0.10) 0%, rgba(176, 154, 107, 0) 40%),
    linear-gradient(160deg, #0e0e0e 0%, #121212 45%, #0b1622 100%);
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* ---- Typography helpers ---------------------------------------------------- */
.serif { font-family: var(--font-serif); font-weight: 400; }
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--beige);
  font-weight: 600;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.1;
  margin: 16px 0 0;
  letter-spacing: 0.01em;
}
.section-intro {
  color: var(--muted);
  max-width: 64ch;
  margin: 18px 0 0;
}

/* ---- Liquid glass surface -------------------------------------------------- */
.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 22%, rgba(29, 58, 87, 0.55) 0%, rgba(29, 58, 87, 0.22) 36%, rgba(18, 18, 18, 0) 64%),
    radial-gradient(circle at 20% 80%, rgba(176, 154, 107, 0.08) 0%, rgba(176, 154, 107, 0) 40%),
    linear-gradient(150deg, rgba(28, 28, 28, 0.82) 0%, rgba(18, 18, 18, 0.78) 60%, rgba(11, 40, 68, 0.55) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(242, 242, 242, 0.10),
    inset 0 -24px 48px rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(20px) saturate(128%);
  -webkit-backdrop-filter: blur(20px) saturate(128%);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(242, 242, 242, 0.14) 0%, rgba(242, 242, 242, 0.04) 18%, rgba(242, 242, 242, 0) 44%),
    radial-gradient(ellipse at 84% 16%, rgba(196, 176, 125, 0.16), rgba(196, 176, 125, 0) 34%);
  mix-blend-mode: screen;
}
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(242, 242, 242, 0.10),
    inset 0 -18px 40px rgba(0, 0, 0, 0.26),
    inset 0 0 60px rgba(196, 176, 125, 0.04);
}

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--beige-gold);
}
.btn-accent {
  background: linear-gradient(135deg, var(--beige) 0%, var(--beige-gold) 100%);
  color: #14110A;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(176, 154, 107, 0.30);
}
.btn-ghost {
  background: rgba(242, 242, 242, 0.04);
  border-color: rgba(196, 176, 125, 0.45);
  color: var(--foreground);
}
.btn-ghost:hover { border-color: var(--beige); }

/* ---- Header / Nav ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  background: rgba(12, 12, 12, 0.86);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img { width: 36px; height: 36px; }
.brand .name {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}
.nav-links a:not(.btn) {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--foreground); }
.nav-links .btn { height: 40px; padding: 0 20px; }

/* Language switch (EN / 繁中) — stays visible on mobile */
.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(196, 176, 125, 0.4);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 7px 12px;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-switch button:hover { color: var(--foreground); }
.lang-switch button[aria-pressed="true"] {
  background: var(--beige);
  color: #14110A;
}
.lang-switch button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--beige-gold);
}

@media (max-width: 760px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links { gap: 12px; }
}

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: clamp(64px, 10vw, 132px) 0 clamp(56px, 8vw, 104px);
}
/* Full-bleed liquid-glass atmosphere — no card edges, no top edge line.
   Keeps the navy + gold glow and a soft diagonal sheen, then fades into the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(242, 242, 242, 0.07) 0%, rgba(242, 242, 242, 0.02) 15%, rgba(242, 242, 242, 0) 38%),
    radial-gradient(circle at 80% 14%, rgba(29, 58, 87, 0.62) 0%, rgba(29, 58, 87, 0.20) 38%, rgba(18, 18, 18, 0) 68%),
    radial-gradient(circle at 14% 88%, rgba(196, 176, 125, 0.12) 0%, rgba(196, 176, 125, 0) 46%);
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}
.hero-glass { padding: 0; }
.hero-inner {
  display: grid;
  grid-template-columns: clamp(120px, 18vw, 200px) 2px minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(28px, 5vw, 56px);
}
.hero-mark {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 16px rgba(196, 176, 125, 0.10));
}
.hero-sep {
  width: 2px;
  height: min(220px, 72%);
  justify-self: center;
  background: linear-gradient(180deg, rgba(196, 176, 125, 0.08), var(--beige), rgba(196, 176, 125, 0.08));
  box-shadow: 0 0 12px rgba(196, 176, 125, 0.14);
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 6.4vw, 82px);
  line-height: 0.96;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.5);
}
.hero-subrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(16px, 2.4vw, 26px);
}
.hero-subrow .line {
  height: 2px;
  flex: 0 0 clamp(28px, 6vw, 90px);
  background: linear-gradient(90deg, transparent, var(--beige), transparent);
}
.hero-sub {
  font-size: clamp(12px, 1.6vw, 18px);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--beige);
  white-space: nowrap;
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  margin: clamp(22px, 3vw, 32px) 0 0;
}
.hero-tagline .accent { color: var(--beige); }
.hero-desc {
  color: var(--muted);
  max-width: 56ch;
  margin: 16px 0 0;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(24px, 3vw, 34px);
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 84px 2px minmax(0, 1fr); column-gap: 18px; }
  .hero-sep { height: 64%; }
}

/* ---- Generic section ------------------------------------------------------- */
section.block { padding: clamp(48px, 8vw, 96px) 0; }
.block-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }

/* ---- Pillars (4 core philosophies) ---------------------------------------- */
/* 4-up on desktop, 2x2 on tablet, stacked on mobile — balanced for 4 items */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}
.pillar {
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius);
}
.pillar .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--beige-gold);
  letter-spacing: 0.1em;
}
.pillar h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  margin: 14px 0 4px;
}
.pillar p { color: var(--muted); font-size: 15px; margin: 12px 0 0; }

/* ---- Use cases ------------------------------------------------------------- */
.usecase {
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(28, 28, 28, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.usecase:hover { border-color: rgba(196, 176, 125, 0.4); transform: translateY(-3px); }
.usecase .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--deep-blue);
  font-weight: 600;
}
.usecase h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  margin: 10px 0 0;
}
.usecase p { color: var(--muted); font-size: 14px; margin: 10px 0 0; }

/* ---- Trust strip ----------------------------------------------------------- */
.trust {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 960px) {
  .trust { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .trust { grid-template-columns: 1fr; }
}
.trust .item {
  padding: 24px 28px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trust .k {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--foreground);
}
.trust .v {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- CTA band -------------------------------------------------------------- */
/* Full-bleed liquid-glass atmosphere — no card edges. Glow lives on the section
   and fades in/out at top and bottom so the band melts into the page. */
#contact { position: relative; }
#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 26%, rgba(29, 58, 87, 0.50) 0%, rgba(29, 58, 87, 0.16) 38%, rgba(18, 18, 18, 0) 66%),
    radial-gradient(circle at 20% 80%, rgba(196, 176, 125, 0.10) 0%, rgba(196, 176, 125, 0) 44%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.cta-band {
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 56px);
  margin: 0;
  letter-spacing: 0.04em;
}
.cta-band p { color: var(--muted); margin: 16px auto 0; max-width: 52ch; }
.cta-band .hero-cta { justify-content: center; }

/* ---- Demo request form ----------------------------------------------------- */
.demo-form {
  max-width: 640px;
  margin: clamp(28px, 4vw, 40px) auto 0;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}
.field { display: block; margin-top: 16px; }
.field-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}
.demo-form input,
.demo-form textarea {
  width: 100%;
  background: rgba(28, 28, 28, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.demo-form input:focus,
.demo-form textarea:focus {
  outline: none;
  border-color: var(--beige-gold);
  box-shadow: 0 0 0 2px rgba(176, 154, 107, 0.30);
}
.demo-form textarea { resize: vertical; min-height: 88px; }
/* anti-spam honeypot — visually hidden, off-screen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.form-status { margin: 0; font-size: 14px; }
.form-status.ok { color: var(--success); }
.form-status.err { color: #E5736B; }
.demo-form.is-submitting button { opacity: 0.65; pointer-events: none; }

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(40px, 5vw, 56px) 0 40px;
  margin-top: clamp(40px, 6vw, 80px);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 40px; height: 40px; }
.footer-brand .name { font-family: var(--font-serif); font-size: 20px; }
.footer-meta { color: var(--muted); font-size: 13px; line-height: 1.8; }
.footer-meta a:hover { color: var(--beige); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.footer-bottom .powered {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.footer-bottom .powered b { color: var(--beige); font-weight: 500; }

/* ---- Reveal-on-scroll animation (brand: fade-in + slide-up, <= 0.3s) ------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
