/* ============================================================
   Aurvex 鋆燁智能 — 全站共用樣式
   ============================================================ */

:root {
  --bg:          #FCFBF8;
  --bg-soft:     #F6F3EC;
  --bg-card:     #FFFFFF;

  --ink:         #131A24;
  --ink-2:       #16305C;   /* 產品 logo 深藍 */
  --ink-soft:    #4A5464;
  --muted:       #8B94A3;

  --border:        rgba(19, 26, 36, 0.10);
  --border-strong: rgba(19, 26, 36, 0.18);

  --gold:        #C08A2E;
  --gold-deep:   #96681B;
  --gold-light:  #DDB45F;
  --gold-pale:   #FAF3E2;

  --shadow-sm:  0 1px 3px rgba(19, 26, 36, 0.06);
  --shadow-md:  0 6px 24px -6px rgba(19, 26, 36, 0.12);
  --shadow-lg:  0 18px 48px -12px rgba(19, 26, 36, 0.16);
  --shadow-gold:0 12px 32px -10px rgba(192, 138, 46, 0.38);

  --radius:     10px;
  --radius-lg:  16px;
  --t:          0.28s;

  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI",
                  "PingFang TC", "Microsoft JhengHei",
                  "Helvetica Neue", Arial, sans-serif;
  --font-display: "Arial Black", "Arial Bold", "PingFang TC",
                  "Microsoft JhengHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ============================================================
   中文排版：避免孤字（換行後只剩一兩個字）
   balance → 標題各行長度平均
   pretty  → 段落最後一行不會只剩零星字元
   ============================================================ */
h1, h2, h3, h4, h5,
.hero h1, .section-head h2, .page-hero h1,
.hero-eyebrow, .btn, .trust-item .t-text,
.prod-card .p-tagline, .field-row h3,
.brand-band .bb-line, .cta-box h2,
.what-lead h2, .sg-text h2, .flow-step h3 {
  text-wrap: balance;
  -webkit-hyphens: none;
  hyphens: none;
}

p, li, small, figcaption,
.hero-sub, .section-head .sub, .page-hero p,
.sg-text p, .flow-step p, .fr-pain, .prod-card .p-desc,
.what-lead p, .trust-item .t-text small,
.pain-card p, .feat-card p, .step-card p, .role-card p,
.comp-card p, .cat-card .ct-desc, .arch-card p,
.creed-card p, .dna-text p, .ptech-card p, .lic-card p,
.app-card .desc, .app-card .scen, .entry-btn .e-desc,
.role-card .desc, .footer-tag, .contact-addr {
  text-wrap: pretty;
  -webkit-hyphens: none;
  hyphens: none;
}

/* 中文避頭尾：標點不落在行首 */
:lang(zh-TW), :lang(zh) {
  line-break: strict;
  overflow-wrap: break-word;
}

/* 專有名詞／中英混排詞組不被拆行 */
.nb { white-space: nowrap; }

/* 白底產品 logo 融入淺色背景（白色 × 底色 = 底色，等同去背） */
.prod-logo, .ph-logo {
  mix-blend-mode: multiply;
}

.icon-svg {
  width: 1em; height: 1em;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.section { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   背景紋理（豐富但不吵）
   ============================================================ */
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(19,26,36,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19,26,36,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(192,138,46,0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
}
.bg-glow.gold {
  background: radial-gradient(circle, rgba(221,180,95,0.30), transparent 68%);
}
.bg-glow.navy {
  background: radial-gradient(circle, rgba(22,48,92,0.12), transparent 68%);
}
/* 斜向光束 */
.bg-beam {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(105deg, transparent, rgba(221,180,95,0.14), transparent);
  transform: skewX(-14deg);
}
.has-bg { position: relative; overflow: hidden; }
.has-bg > .section,
.has-bg > .container-rel { position: relative; z-index: 1; }

/* ---------- 照片背景層 ----------
   用法：<div class="bg-photo" style="background-image:url('images/bg-xxx.jpg')"></div>
   放在 .has-bg 區塊內第一個子元素，圖片會鋪滿並自動壓上遮罩維持文字可讀性。
   ------------------------------------------------------------ */
.bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}
/* 淺色區塊：圖片壓很淡，只當質感底 */
.bg-photo.subtle { opacity: 0.10; }
.bg-photo.soft   { opacity: 0.18; }
/* 遮罩：讓上方文字一定讀得到 */
.bg-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    var(--bg) 0%,
    rgba(252,251,248,0.92) 34%,
    rgba(252,251,248,0.55) 60%,
    rgba(252,251,248,0.25) 100%);
}
.bg-photo.subtle::after,
.bg-photo.soft::after { display: none; }

/* 深色區塊用的照片層（技術／資安段） */
.bg-photo.on-dark { opacity: 0.28; }
.bg-photo.on-dark::after {
  display: block;
  background: linear-gradient(100deg,
    var(--ink) 0%,
    rgba(19,26,36,0.94) 40%,
    rgba(19,26,36,0.72) 100%);
}
/* 置中型（整段當視覺背景，兩側都要能讀字） */
.bg-photo.center-fade::after {
  background: radial-gradient(ellipse at center,
    rgba(252,251,248,0.72) 0%,
    rgba(252,251,248,0.90) 45%,
    var(--bg) 78%);
}
.bg-photo.on-dark.center-fade::after {
  background: radial-gradient(ellipse at center,
    rgba(19,26,36,0.66) 0%,
    rgba(19,26,36,0.88) 46%,
    var(--ink) 80%);
}

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 40px;
  background: rgba(252, 251, 248, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.nav-brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.nav-brand .logo-img { height: 76px; width: auto; display: block; }
.nav-brand .brand-zh {
  font-size: 19px;
  letter-spacing: 4px;
  font-weight: 800;
  padding-left: 13px;
  border-left: 1px solid var(--border-strong);
  white-space: nowrap;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0; padding: 0;
}
.nav-links > li { position: relative; }
.nav-links a {
  font-size: 14.5px;
  letter-spacing: 1.2px;
  color: var(--ink-soft);
  font-weight: 500;
  display: inline-block;
  padding: 10px 0;
  transition: color var(--t);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--gold-deep); }
.nav-links a.active { color: var(--ink); font-weight: 700; }
.nav-links a.active::after {
  content: ""; position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 2px; background: var(--gold);
}
/* 產品下拉 */
.nav-drop > a::before {
  content: "";
  position: absolute;
  right: -14px; top: 50%;
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  opacity: 0.6;
}
.nav-drop { padding-right: 16px; }
.drop-menu {
  position: absolute;
  top: 100%; left: -18px;
  min-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--t);
  list-style: none;
  margin: 8px 0 0;
}
.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.drop-menu li a {
  display: block;
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background var(--t), color var(--t);
}
.drop-menu li a small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.3px;
}
.drop-menu li a:hover { background: var(--gold-pale); color: var(--gold-deep); }

.nav-cta {
  padding: 11px 22px;
  background: var(--gold-deep);
  color: #fff !important;
  border-radius: 6px;
  font-size: 14px;
  letter-spacing: 1.2px;
  font-weight: 600;
  transition: all var(--t);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover {
  background: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* 漢堡選單（手機） */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--t);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Section heading
   ============================================================ */
.section-head { margin-bottom: 50px; }
.section-head.center { text-align: center; }
.section-head .eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 4px;
  color: var(--gold-deep);
  margin-bottom: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.32;
}
.section-head h2 em { font-style: normal; color: var(--gold-deep); }
.section-head .sub {
  margin: 16px 0 0;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.85;
}
.section-head.center .sub { margin-left: auto; margin-right: auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--t);
  font-family: inherit;
}
.btn-primary { background: var(--gold-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-secondary { background: var(--bg-card); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-deep); background: var(--gold-pale); }
.btn-ghost { background: transparent; color: var(--gold-deep); padding: 0; font-weight: 700; }
.btn-ghost:hover { color: var(--ink); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  padding: 58px 40px 26px;
  position: relative;
  overflow: hidden;
}
.site-footer .bg-dots { opacity: 0.35; }
.footer-grid {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.footer-brand-row { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.footer-brand-row .logo-img { height: 52px; width: auto; }
.footer-brand-row .zh {
  font-size: 15px; color: #fff;
  letter-spacing: 4px; font-weight: 700;
  padding-left: 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-tag { font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.5); line-height: 1.85; }
.footer-col h4 {
  font-size: 11.5px; letter-spacing: 3px;
  color: var(--gold-light); font-weight: 700;
  margin: 0 0 16px; text-transform: uppercase;
}
.footer-col a, .footer-col p {
  display: block; font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 10px;
  transition: color var(--t);
}
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 20px auto 0;
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255, 255, 255, 0.35);
}
.footer-bottom .tag-line { color: var(--gold-light); letter-spacing: 2px; font-weight: 500; }

/* ============================================================
   Email 聯絡卡（全站共用）
   ============================================================ */
.mail-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--t);
}
.mail-card:hover { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.mail-card .mc-icon {
  font-size: 30px;
  color: var(--gold);
  display: inline-flex;
  margin-bottom: 16px;
}
.mail-card .mc-label {
  font-size: 11px;
  letter-spacing: 3.5px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mail-card .mc-mail {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.2vw, 27px);
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin-bottom: 26px;
  word-break: break-all;
  transition: color var(--t);
}
.mail-card .mc-mail:hover { color: var(--gold-deep); }
.contact-addr {
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.95;
}
@media (max-width: 520px) {
  .mail-card { padding: 30px 22px; }
}

/* ============================================================
   Reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-stagger.revealed > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.11s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.18s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.25s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.39s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   各頁視覺個性（同一套底，不同節奏）
   ------------------------------------------------------------
   page-solutions → 標題靠左、加層級編號、結構感重
   page-about     → 大段落、引言式、少卡片
   page-services  → 互動導向、標題偏窄
   page-product   → Hero 靠左、功能用編號
   ============================================================ */

/* 解決方案：所有段落標題靠左，前面加一條金線 */
.page-solutions .section-head.center { text-align: left; }
.page-solutions .section-head.center .sub { margin-left: 0; margin-right: 0; }
.page-solutions .section-head h2 {
  position: relative;
  padding-left: 22px;
}
.page-solutions .section-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em; bottom: 0.18em;
  width: 5px; border-radius: 3px;
  background: var(--gold);
}

/* 關於我們：標題置中且加寬，內文放大，走「讀文章」的節奏 */
.page-about .section-head h2 { letter-spacing: 3px; }
.page-about .section-head .sub { max-width: 700px; font-size: 17px; }
.page-about .section-head { margin-bottom: 58px; }

/* 需求發想：標題較窄、字距緊，偏工具感 */
.page-services .section-head h2 { letter-spacing: 0; }
.page-services .section-head .sub { max-width: 560px; }

/* 產品頁：段落標題置中但加上英文小標框線 */
.page-product .section-head .eyebrow {
  padding: 5px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--bg-card);
}

/* ============================================================
   子頁 Page hero
   ============================================================ */
.page-hero {
  padding: 76px 0 60px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.page-hero .eyebrow {
  display: inline-block;
  font-size: 11.5px; letter-spacing: 4px;
  color: var(--gold-deep); font-weight: 700;
  text-transform: uppercase; margin-bottom: 16px;
}
.page-hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.22;
}
.page-hero h1 em { font-style: normal; color: var(--gold-deep); }
.page-hero p {
  margin: 0;
  max-width: 660px;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.9;
}

/* ============================================================
   RWD
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding: 0 24px; }
  .site-nav { padding: 12px 24px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 13.5px; }
  .nav-brand .logo-img { height: 62px; }
  .nav-brand .brand-zh { font-size: 15px; letter-spacing: 3px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 860px) {
  .site-nav { flex-wrap: wrap; padding: 10px 20px; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 13px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a.active::after { display: none; }
  .nav-drop { padding-right: 0; }
  .nav-drop > a::before { display: none; }
  /* 手機：下拉直接展開成清單 */
  .drop-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none;
    background: var(--bg-soft);
    border-radius: 8px;
    margin: 6px 0 10px;
    padding: 4px;
    min-width: 0;
  }
  .drop-menu li a { border-bottom: none; padding: 11px 12px; font-size: 14px; }

  .section { padding: 0 20px; }
  .section-head { margin-bottom: 36px; }
  .page-hero { padding: 52px 0 44px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .site-footer { padding: 44px 20px 22px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; font-size: 11.5px; }
}

@media (max-width: 520px) {
  .btn { padding: 13px 22px; font-size: 13.5px; width: 100%; justify-content: center; }
  .nav-brand .logo-img { height: 52px; }
  .nav-brand .brand-zh { font-size: 14px; letter-spacing: 2px; padding-left: 10px; }
}
