/* Inter (latin, variable 400–700), self-hosted — SIL OFL, see /fonts/Inter-OFL.txt.
   Chinese text uses the visitor's system font (PingFang TC / Microsoft JhengHei):
   a web CJK font cost ~1.2 MB in 19 files per page. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-var.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;
}

/* ============================================
   GAINNER 駿曦 - Redesign Tokens & Base
   ============================================ */

:root {
  /* Brand */
  --navy-900: #061a32;
  --navy-800: #0b2545;
  --navy-700: #13335f;
  --navy-600: #1d4376;
  --navy-500: #2c5a92;
  --navy-100: #e6edf6;
  --navy-50:  #f4f7fb;

  --gold-600: #86692a; /* AA contrast for small text on white / ink-50 */
  --gold-500: #c9a961;
  --gold-400: #ddc285;

  --ink-900: #0d1420;
  --ink-700: #2a3344;
  --ink-500: #5a6479;
  --ink-400: #8590a3;
  --ink-300: #b9c0cd;
  --ink-200: #dde1e9;
  --ink-100: #eef1f5;
  --ink-50:  #f7f8fb;
  --white:   #ffffff;

  --success: #1f7a4d;
  --danger:  #b3261e;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang TC", "Heiti TC", "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", sans-serif;
  --font-display: var(--font-sans);
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Spacing */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(11, 37, 69, 0.04);
  --shadow-sm: 0 1px 3px rgba(11, 37, 69, 0.06), 0 1px 2px rgba(11, 37, 69, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, 0.08), 0 2px 4px rgba(11, 37, 69, 0.04);
  --shadow-lg: 0 12px 32px rgba(11, 37, 69, 0.10), 0 4px 8px rgba(11, 37, 69, 0.04);

  --container: 1240px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.55;
}

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

/* ============================================
   Layout
   ============================================ */

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

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

.section {
  padding: 96px 0;
}

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

.section-tight { padding: 64px 0; }

/* ============================================
   Type
   ============================================ */

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold-500);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-800);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.h-1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.015em; }
.h-2 { font-size: clamp(24px, 2.4vw, 32px); }
.h-3 { font-size: 20px; }

.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-500);
  line-height: 1.65;
  text-wrap: pretty;
  max-width: 62ch;
}

.body {
  color: var(--ink-700);
  font-size: 16px;
  line-height: 1.65;
}

.muted { color: var(--ink-500); }
.tiny { font-size: 13px; color: var(--ink-500); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}
.btn-primary:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy-800);
  border-color: var(--ink-200);
}
.btn-secondary:hover {
  border-color: var(--navy-800);
  background: var(--navy-50);
}

.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  padding: 13px 0;
}
.btn-ghost:hover { color: var(--gold-600); }

.btn-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-800);
  font-weight: 500;
  font-size: 15px;
  transition: gap 0.16s ease;
}
.btn-arrow:hover { gap: 12px; color: var(--gold-600); }
.btn-arrow svg { transition: transform 0.16s ease; }
.btn-arrow:hover svg { transform: translateX(2px); }

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all 0.2s ease;
}
.card:hover {
  border-color: var(--navy-500);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Nav
   ============================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ink-200);
  height: var(--nav-h);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-logo img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--r-md);
  transition: all 0.16s ease;
  position: relative;
}
.nav-link:hover { color: var(--navy-800); background: var(--navy-50); }
.nav-link.active { color: var(--navy-800); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  background: var(--gold-500);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-iso-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy-700);
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
}
.nav-iso-mini::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.18);
}

.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--ink-200);
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .nav-links, .nav-cta .btn-secondary, .nav-iso-mini { display: none; }
  .nav-burger { display: inline-flex; }
}

.nav-mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--white);
  z-index: 49;
  padding: 24px;
  transform: translateY(-100%);
  transition: transform 0.24s ease;
  overflow-y: auto;
}
.nav-mobile.open { transform: translateY(0); }
.nav-mobile a {
  display: block;
  padding: 18px 4px;
  font-size: 18px;
  font-weight: 500;
  color: var(--navy-800);
  border-bottom: 1px solid var(--ink-100);
}

/* ============================================
   ISO Badge
   ============================================ */

.iso-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--navy-100);
  border-radius: 100px;
  box-shadow: var(--shadow-xs);
}
.iso-badge-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-500);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.iso-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.iso-badge-text .lab {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  text-transform: uppercase;
}
.iso-badge-text .val {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-800);
}

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

.footer {
  background: var(--navy-900);
  color: var(--ink-300);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
.footer h5, .footer .footer-title {
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 12px; }
.footer a:hover { color: var(--gold-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-400);
}
.footer-logo {
  height: 34px;
  filter: brightness(0) invert(1) opacity(0.95);
  margin-bottom: 16px;
}
.footer-tagline { color: var(--ink-300); font-size: 14px; line-height: 1.6; max-width: 32ch; }

/* ============================================
   Placeholders for product imagery
   ============================================ */

.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(11, 37, 69, 0.05) 0 1px,
      transparent 1px 12px),
    var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--navy-700);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  background: var(--white);
  padding: 6px 12px;
  border: 1px solid var(--navy-100);
  border-radius: 4px;
  white-space: nowrap;
}

.ph-dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(255, 255, 255, 0.04) 0 1px,
      transparent 1px 12px),
    var(--navy-900);
  border-color: var(--navy-700);
  color: var(--ink-300);
}
.ph-dark::after {
  background: var(--navy-800);
  color: var(--ink-200);
  border-color: var(--navy-700);
}

/* ============================================
   Forms
   ============================================ */

.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700);
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink-900);
  transition: border 0.16s ease, box-shadow 0.16s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(28, 67, 118, 0.12);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-error { color: var(--danger); font-size: 12px; }

/* ============================================
   Misc
   ============================================ */

.divider { height: 1px; background: var(--ink-200); border: 0; margin: 0; }

.dot-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.dot-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-700);
  line-height: 1.55;
}
.dot-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  margin-top: 9px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

/* page transitions */
.page { animation: fadeUp 0.32s ease; }
/* Motion only: starting at opacity 0 kept the main content (LCP) invisible for the
   first frames of every page view. */
@keyframes fadeUp {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}

/* scroll reveal helper */
.reveal { opacity: 0; transform: translateY(16px); transition: all 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
