/* =============================================================================
   DATAI INTERNATIONAL GROUP — Stylesheet
   配色靈感：原 logo 的深藍漸層 + 萊姆綠 highlight
   ========================================================================== */

:root {
  /* Brand */
  --brand: #1F4E79;           /* 深藍 — logo 文字色 */
  --brand-dark: #163958;      /* 更深藍 — header / footer */
  --brand-darker: #0E2438;    /* 最深 — 高對比文字 */
  --brand-soft: #E8F0F7;      /* 極淺藍 — 區塊背景 */
  --accent: #C5DC52;          /* 萊姆綠 — logo 底線色，強調 */
  --accent-dark: #95A732;     /* 萊姆綠 hover */
  --gold: #E8B547;            /* logo 三角形的暖黃 */

  /* Neutrals */
  --text: #1A2330;
  --text-muted: #5C6577;
  --text-light: #8D95A3;
  --bg: #ffffff;
  --bg-soft: #F6F8FA;
  --bg-deep: #0E2438;
  --border: #E2E7ED;
  --border-strong: #C5CDD8;

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(14, 36, 56, 0.06);
  --shadow: 0 4px 18px rgba(14, 36, 56, 0.08);
  --shadow-lg: 0 12px 36px rgba(14, 36, 56, 0.14);
  --shadow-hover: 0 14px 40px rgba(31, 78, 121, 0.20);

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", "Sarabun", "Noto Sans Thai", sans-serif;
  --font-display: "Cormorant Garamond", "Noto Serif TC", "Songti TC", Georgia, serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

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

.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--text-muted); }

/* =============================================================================
   Top bar — 細長深色資訊欄
   ========================================================================== */
.topbar {
  background: var(--brand-darker);
  color: rgba(255, 255, 255, .85);
  font-size: 0.825rem;
  border-bottom: 2px solid var(--accent);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.5rem;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.topbar-item {
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
}
.topbar-item:hover { color: var(--accent); }

/* =============================================================================
   Header — sticky 主導覽
   ========================================================================== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 78px;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand-logo {
  height: 42px;
  width: auto;
  border-radius: 3px;
  flex-shrink: 0;
}
.brand-zh-only {
  font-size: 0.92rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-weight: 500;
  border-left: 1px solid var(--border-strong);
  padding-left: 0.85rem;
  white-space: nowrap;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-en {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--brand-dark);
}
.brand-zh {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}
.nav-link {
  position: relative;
  padding: 0.5rem 0.65rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-sm);
  transition: all 0.18s;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.22s;
}
.nav-link:hover { color: var(--brand-dark); }
.nav-link:hover::after { width: calc(100% - 1.7rem); }
.nav-link.active {
  color: var(--brand-dark);
  font-weight: 600;
}
.nav-link.active::after {
  width: calc(100% - 1.7rem);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand-dark);
}

/* =============================================================================
   HERO — 主視覺
   ========================================================================== */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg,
    #1F4E79 0%,
    #2C6499 35%,
    #3A7EB9 70%,
    #4A93D6 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 75% 25%, rgba(197, 220, 82, 0.18), transparent 60%),
    radial-gradient(ellipse 600px 300px at 20% 80%, rgba(232, 181, 71, 0.15), transparent 60%);
  z-index: 0;
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(197, 220, 82, .8);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
}
.hero-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 85%; top: 30%; animation-delay: 1.2s; width: 3px; height: 3px; }
.hero-particles span:nth-child(3) { left: 25%; top: 75%; animation-delay: 2.5s; width: 2px; height: 2px; }
.hero-particles span:nth-child(4) { left: 70%; top: 65%; animation-delay: 3.8s; }
.hero-particles span:nth-child(5) { left: 50%; top: 15%; animation-delay: 4.5s; width: 2px; height: 2px; background: rgba(232,181,71,.6); }
.hero-particles span:nth-child(6) { left: 90%; top: 80%; animation-delay: 5.7s; width: 3px; height: 3px; background: rgba(232,181,71,.6); }
@keyframes float {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  20%, 80% { opacity: 1; }
  50% { transform: translate(15px, -25px); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 5rem 1.5rem;
  text-align: center;
  width: 100%;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  font-weight: 600;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(197, 220, 82, 0.4);
  border-radius: 50px;
  margin-bottom: 2rem;
  text-transform: uppercase;
}
.hero-title {
  margin: 0 0 1.5rem;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.hero-title-en {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #C5DC52 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-en-2 {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.3rem;
}
.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 500;
  color: #fff;
  margin: 1.5rem 0 1rem;
  letter-spacing: 0.06em;
}
.hero-desc {
  max-width: 700px;
  margin: 1.5rem auto 2.5rem;
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.85);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.85rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--brand-darker);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #d3e76e;
  border-color: #d3e76e;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(197, 220, 82, 0.4);
  color: var(--brand-darker);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
  transform: translateY(-2px);
}
.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-2px);
}

/* =============================================================================
   Stats bar
   ========================================================================== */
.stats {
  background: var(--brand-dark);
  color: #fff;
  position: relative;
}
.stats::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(197, 220, 82, 0.04) 50%,
    transparent 100%);
}
.stats-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}
.stat {
  position: relative;
  padding: 0 1rem;
}
.stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.5rem;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.01em;
}
.stat-plus {
  font-size: 0.65em;
  vertical-align: top;
  margin-left: 0.1em;
  color: rgba(197, 220, 82, .8);
}
.stat-lbl {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.stat-en {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =============================================================================
   Sections / general
   ========================================================================== */
.section {
  padding: 5.5rem 0;
}
.section-soft {
  background: var(--bg-soft);
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--brand-darker);
  margin: 0 0 1rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

/* =============================================================================
   Business cards (首頁 + 事業群頁)
   ========================================================================== */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.biz-grid--full {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.biz-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 1.75rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(.2, .8, .2, 1);
}
.biz-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s;
}
.biz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}
.biz-card:hover::before {
  transform: scaleX(1);
}
.biz-card--highlight {
  background: linear-gradient(135deg, #fff 0%, #FBFCF4 100%);
  border-color: rgba(197, 220, 82, 0.35);
}
.biz-card-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  filter: grayscale(0);
}
.biz-card-cat {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(197, 220, 82, 0.12);
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.biz-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand-darker);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.biz-card-en {
  font-size: 0.82rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
  font-weight: 500;
}
.biz-card-tag {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
  line-height: 1.55;
}
.biz-card-tag-en {
  font-size: 0.82rem;
  color: var(--text-light);
  margin: 0;
  font-style: italic;
}
.biz-card-arrow {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* =============================================================================
   Exhibition preview (首頁) + ex-grid (展會頁)
   ========================================================================== */
.exhibition-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: 0.85rem;
}
.exhibition-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  display: block;
  background: var(--brand-dark);
}
.exhibition-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.exhibition-tile:hover img {
  transform: scale(1.06);
}
.exhibition-tile-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.exhibition-tile--big {
  grid-column: span 2;
  grid-row: span 2;
}

.ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.ex-tile {
  margin: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.ex-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.ex-tile img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.ex-tile figcaption {
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
  border-top: 3px solid var(--accent);
}

/* =============================================================================
   Split section (Casalunar 預覽)
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.split-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split-img img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}
.split-img-tag {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--accent);
  color: var(--brand-darker);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
}
.split-text h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  margin: 0.5rem 0 1.25rem;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.check-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.85rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.97rem;
  line-height: 1.6;
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(197, 220, 82, 0.2);
}

/* =============================================================================
   Product preview (首頁 + 食品事業)
   ========================================================================== */
.product-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.product-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}
.product-preview:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.product-preview-img {
  width: 130px;
  height: 130px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-preview-code {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.product-preview-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-darker);
  margin-bottom: 0.2rem;
}
.product-preview-en {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* =============================================================================
   CTA banner
   ========================================================================== */
.cta {
  background: linear-gradient(135deg, var(--brand-darker) 0%, var(--brand-dark) 50%, var(--brand) 100%);
  color: #fff;
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(197, 220, 82, 0.12), transparent 50%);
}
.cta-inner {
  position: relative;
  text-align: center;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 1rem;
}
.cta-text {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 580px;
  margin: 0 auto 2rem;
}
.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =============================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--brand-darker);
  color: rgba(255, 255, 255, 0.78);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 3rem;
  padding: 3.5rem 1.5rem 2.5rem;
}
.footer-logo {
  height: 38px;
  width: auto;
  border-radius: 3px;
  margin-bottom: 0.85rem;
}
.footer-company {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}
.footer-en {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.footer-since {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.06em;
}
.footer-h {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-list li {
  margin-bottom: 0.55rem;
}
.footer-list a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}
.footer-list a:hover {
  color: var(--accent);
}
.footer-contact {
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.65;
}
.footer-contact strong {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.footer-contact a {
  color: rgba(255, 255, 255, 0.78);
}
.footer-contact a:hover { color: var(--accent); }
.footer-en-addr {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-tag {
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}

/* =============================================================================
   Page hero (內頁)
   ========================================================================== */
.page-hero {
  background: var(--bg-soft);
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-hero--brand {
  background: linear-gradient(135deg, var(--brand-darker), var(--brand-dark) 60%, var(--brand));
  color: #fff;
  border-bottom: 0;
}
.page-hero--brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 30%, rgba(197, 220, 82, 0.14), transparent 60%);
  pointer-events: none;
}
.page-hero .container {
  position: relative;
}
.page-hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.page-hero--brand .page-hero-eyebrow {
  color: var(--accent);
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  color: var(--brand-darker);
}
.page-hero--brand .page-hero-title {
  color: #fff;
}
.page-hero-en {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.page-hero--brand .page-hero-en {
  color: rgba(255, 255, 255, 0.75);
}

/* =============================================================================
   Prose (about, group pages 等)
   ========================================================================== */
.prose-narrow {
  max-width: 780px;
  margin: 0 auto;
}
.prose-narrow .lead {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.prose-narrow h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brand-darker);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.prose-narrow p {
  line-height: 1.85;
  margin: 0 0 1rem;
}
.th-para {
  font-size: 0.97rem;
  line-height: 1.95;
  color: var(--text-muted);
}

/* About cards */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.about-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.about-card-num {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brand-darker);
  margin: 0 0 0.5rem;
}
.about-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Leader card */
.leader-card {
  max-width: 580px;
  margin: 2.5rem auto 0;
  text-align: center;
  padding: 2.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
}
.leader-name {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brand-darker);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.leader-name-th {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.leader-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 0.15rem;
}
.leader-title-en {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.leader-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.85;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin: 1.25rem 0 0;
}

/* =============================================================================
   Info block (group pages)
   ========================================================================== */
.info-block {
  background: var(--bg-soft);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  margin: 1.75rem 0;
  border-left: 3px solid var(--accent);
}
.info-block h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-darker);
  border-bottom: 0;
  padding-bottom: 0;
}
.info-block--accent {
  background: linear-gradient(135deg, var(--bg-soft), #FAFBE8);
  border-left-color: var(--brand);
}
.contact-row {
  margin: 0.6rem 0;
  font-size: 0.96rem;
  line-height: 1.7;
}
.contact-row strong {
  display: inline-block;
  min-width: 165px;
  color: var(--brand-dark);
}

/* =============================================================================
   Casalunar 專屬樣式
   ========================================================================== */
.casalunar-hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
}
.casalunar-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.casalunar-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 36, 56, 0.72), rgba(31, 78, 121, 0.55) 50%, rgba(14, 36, 56, 0.4));
  z-index: 1;
}
.casalunar-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 5rem 1.5rem;
  width: 100%;
}
.casalunar-eyebrow {
  color: var(--accent);
}
.casalunar-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 0.95;
  margin: 0 0 1rem;
  color: #fff;
}
.casalunar-tag {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin: 0;
}

.casalunar-units {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.unit-card {
  background: #fff;
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.unit-card--wide { grid-column: span 2; }
.unit-tag {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.unit-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--brand-darker);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.85rem;
}
.unit-num-sm {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.unit-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.facility-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 3rem;
}
.facility-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.facility-row--reverse { grid-template-columns: 1fr 1.1fr; }
.facility-row--reverse .facility-img { order: 2; }
.facility-row--reverse .facility-text { order: 1; }
.facility-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.facility-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.facility-text h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brand-darker);
  margin: 0 0 0.85rem;
}
.facility-text p {
  margin: 0 0 0.85rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.casalunar-gallery {
  margin-top: 3rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.casalunar-gallery img {
  width: 100%;
  height: auto;
}
.location-block {
  margin-top: 3rem;
  padding: 2.25rem 2.5rem;
  background: linear-gradient(135deg, var(--bg-soft), #FAFBE8);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.location-block h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brand-darker);
  margin: 0 0 0.85rem;
}
.location-block p {
  margin: 0;
  line-height: 1.8;
  color: var(--text);
  font-size: 1rem;
}

/* =============================================================================
   Coming soon
   ========================================================================== */
.coming-soon {
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 560px;
  margin: 0 auto;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.coming-soon-icon {
  font-size: 3rem;
  color: var(--brand);
  margin-bottom: 1rem;
  opacity: 0.6;
}
.coming-soon h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--brand-darker);
  margin: 0 0 1rem;
}
.coming-soon p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* =============================================================================
   Service grid (Korenai)
   ========================================================================== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: #fff;
  padding: 2rem 1.75rem;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-darker);
  margin: 0 0 0.6rem;
}
.service-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* =============================================================================
   Product cards (產品列表) + 詳細頁
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.28s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.product-card-img {
  width: 100%;
  height: 220px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-img img {
  max-width: 75%;
  max-height: 75%;
  object-fit: contain;
}
.product-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  border-top: 3px solid var(--accent);
}
.product-card-code {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent-dark);
  background: rgba(197, 220, 82, 0.12);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}
.product-card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand-darker);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}
.product-card-th {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.product-card-en {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.product-card-arrow {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 600;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.product-detail-img {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.product-detail-img img {
  max-width: 100%;
  max-height: 360px;
}
.product-code-big {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}
.product-detail-info h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brand-darker);
  margin: 0 0 0.4rem;
}
.product-detail-th {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.product-detail-en {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}
.product-detail-info h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand-darker);
  margin: 1.5rem 0 0.75rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.spec-table th, .spec-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.spec-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--brand-dark);
  width: 38%;
  white-space: nowrap;
}

.product-section {
  margin: 2.5rem 0;
}
.product-section h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brand-darker);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-right: 2rem;
}
.th-list {
  padding-left: 1.25rem;
  line-height: 1.85;
}
.th-list li {
  margin-bottom: 0.65rem;
  color: var(--text);
}
.note-box {
  background: #FAFBE8;
  border: 1px solid rgba(197, 220, 82, 0.4);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.85;
}

.app-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.app-img {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}
.app-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* =============================================================================
   Contact page
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.contact-main h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--brand-darker);
  margin: 0 0 0.25rem;
}
.contact-en-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  margin-bottom: 2rem;
}
.contact-block {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.contact-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.05em;
}
.contact-value {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text);
}
.contact-value a { color: var(--brand); }
.contact-value a:hover { color: var(--accent-dark); }

.map-wrap {
  margin-top: 3rem;
}
.map-wrap iframe {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* =============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-lg);
    gap: 0;
    align-items: stretch;
  }
  .main-nav.is-open { display: flex; }
  .nav-link {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-link::after { display: none; }

  .hero { min-height: 480px; }
  .hero-inner { padding: 4rem 1.5rem; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .stat:nth-child(2)::after { display: none; }

  .split { grid-template-columns: 1fr; gap: 2rem; }

  .exhibition-preview {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 180px);
  }
  .exhibition-tile--big { grid-column: span 2; grid-row: span 1; }

  .casalunar-units { grid-template-columns: 1fr; }
  .unit-card--wide { grid-column: span 1; }

  .facility-row, .facility-row--reverse {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .facility-row--reverse .facility-img { order: 1; }
  .facility-row--reverse .facility-text { order: 2; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom .container { flex-direction: column; gap: 0.5rem; text-align: center; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-block { grid-template-columns: 110px 1fr; }

  .product-detail { grid-template-columns: 1fr; }
  .product-detail-img { min-height: 280px; }
}

@media (max-width: 600px) {
  .topbar-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }
  .topbar-left, .topbar-right { gap: 1rem; flex-wrap: wrap; justify-content: center; }

  .header-inner { padding: 0.75rem 1rem; }
  .brand-zh { display: none; }

  .container { padding: 0 1rem; }
  .section { padding: 4rem 0; }
  .section-head { margin-bottom: 2.5rem; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { padding: 0.85rem 1.5rem; }

  .stats-inner { padding: 2rem 1rem; }

  .product-card-img { height: 180px; }

  .contact-block { grid-template-columns: 1fr; gap: 0.25rem; }
  .contact-label { font-size: 0.78rem; }
  .contact-row strong { display: block; min-width: 0; margin-bottom: 0.15rem; }
}
