/* ==========================================================
   亮宇興業 - 主樣式表
   設計：Corporate Trust（深綠 + 金色）
   ========================================================== */

:root {
  --ink: #1a2820;
  --ink-2: #2C3E2D;
  --gold: #C9A961;
  --gold-2: #8a6e34;
  --cream: #fafaf7;
  --line: #e8e6dc;
  --muted: #777;
  --text: #2a2a2a;
  --text-light: rgba(255,255,255,.85);
  --text-faint: rgba(255,255,255,.55);

  --container: 1200px;
  --pad-x: 56px;
  --pad-y: 80px;

  --radius: 8px;
  --radius-lg: 12px;
  --nav-h: 72px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei",
          "PingFang TC", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }

/* 共用區塊樣式 */
.section-label {
  font-size: 11px;
  letter-spacing: 5px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-label.gold { color: var(--gold); }

.section-divider {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 0 0 18px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px;
  line-height: 1.2;
  letter-spacing: -.3px;
}
.section-title em { font-style: normal; color: var(--gold); }
.section-title.light { color: #fff; }

/* 按鈕 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  border-radius: 4px;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }

/* ============ 導覽列 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,40,32,.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .3s;
}
.nav.scrolled { background: rgba(26,40,32,.95); box-shadow: 0 2px 20px rgba(0,0,0,.15); }
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 38px; }
.nav-menu {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
}
.nav-menu a {
  font-size: 14px;
  color: rgba(255,255,255,.85);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-menu a:hover { color: var(--gold); border-color: var(--gold); }
.nav-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.6);
  font-size: 13px;
}
.lang-btn {
  color: rgba(255,255,255,.6);
  font-size: 13px;
  padding: 4px 6px;
  letter-spacing: 1px;
  transition: color .2s;
}
.lang-btn.active, .lang-btn:hover { color: var(--gold); font-weight: 700; }
.lang-sep { color: rgba(255,255,255,.3); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; }

/* ============ Hero (A2 split) ============ */
.hero {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: calc(100vh - var(--nav-h));
  background: var(--ink);
  color: #fff;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
}
.hero-left {
  padding: 80px var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  margin-left: auto;
  width: 100%;
}
.hero-label {
  font-size: 11px;
  letter-spacing: 6px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 18px;
}
.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 0 0 22px;
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
  max-width: 520px;
  margin: 0 0 36px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-right {
  background: linear-gradient(135deg, var(--ink-2), var(--ink));
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px;
}
.hero-decor {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  opacity: .22;
  transform: rotate(8deg);
  border-radius: 12px;
}
.hero-cert-stack {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  perspective: 800px;
}
.hero-cert-img {
  width: 140px;
  height: auto;
  background: #fff;
  border: 3px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  transition: transform .3s;
}
.hero-cert-1 { transform: rotate(-5deg); }
.hero-cert-2 { transform: rotate(0deg) translateY(-8px); z-index: 1; }
.hero-cert-3 { transform: rotate(5deg); }
.hero-cert-stack:hover .hero-cert-img { transform: rotate(0); }
.hero-right .hero-badge-r2v3 {
  position: relative;
  z-index: 1;
  margin-top: 0;
  display: inline-block;
  padding: 6px 14px;
  font-size: 11px;
  letter-spacing: 3px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 100px;
}

/* ============ Facility Strip ============ */
.facility-strip {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: var(--ink);
}
.facility-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  filter: brightness(.85);
}
.facility-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26,40,32,.6) 0%,
    rgba(26,40,32,.15) 30%,
    rgba(26,40,32,.05) 60%,
    rgba(26,40,32,.7) 100%
  );
  display: flex;
  align-items: flex-end;
}
.facility-text {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x) 36px;
  width: 100%;
  color: #fff;
}
.facility-label {
  font-size: 11px;
  letter-spacing: 5px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 6px;
}
.facility-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.3;
  margin: 0;
}

/* ============ About ============ */
.about {
  padding: var(--pad-y) var(--pad-x);
  background: var(--cream);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  max-width: var(--container);
  margin: 0 auto;
}
.about-side { position: sticky; top: calc(var(--nav-h) + 30px); align-self: start; }
.about-side-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 28px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-n { font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-l { font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-top: 8px; }

.about-body p {
  font-size: 15px;
  color: #444;
  line-height: 1.9;
  margin: 0 0 18px;
  text-align: justify;
}

/* ============ Certifications ============ */
.cert {
  background: var(--ink);
  color: #fff;
  padding: var(--pad-y) 0;
}
.cert-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.cert-text {
  font-size: 14px;
  color: rgba(255,255,255,.7);
  max-width: 560px;
  margin: 0 0 32px;
  line-height: 1.8;
}
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cert-card {
  position: relative;
  display: block;
  padding: 28px 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(201,169,97,.3);
  border-radius: var(--radius);
  transition: transform .2s, border-color .2s, background .2s;
}
.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: rgba(255,255,255,.07);
}
.cert-card.pending { border-style: dashed; cursor: default; }
.cert-card.pending:hover { transform: none; }
.cert-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--ink);
  letter-spacing: 1px;
}
.cert-badge.pending {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.cert-iso { font-size: 14px; letter-spacing: 3px; color: var(--gold); font-weight: 700; }
.cert-num { font-size: 32px; font-weight: 800; color: #fff; margin: 4px 0 10px; letter-spacing: -1px; }
.cert-desc { font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.6; }
.cert-desc-en { color: rgba(255,255,255,.45); font-size: 11px; }
.cert-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 6px;
  margin-bottom: 14px;
  box-sizing: border-box;
}
.cert-card-img-pending {
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(201,169,97,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201,169,97,.6);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 4px;
}

/* ============ Products ============ */
.products {
  padding: var(--pad-y) var(--pad-x);
  max-width: var(--container);
  margin: 0 auto;
}
.product-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.tab {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 700;
}
.product-panel { display: none; }
.product-panel.active { display: block; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.product-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.product-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.product-item .meta { padding: 12px 14px; }
.product-item .ch { font-size: 14px; font-weight: 700; color: var(--ink); }
.product-item .en { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: .5px; }

/* ============ Process ============ */
.process {
  padding: var(--pad-y) var(--pad-x);
  background: var(--cream);
}
.process > .section-label,
.process > .section-divider,
.process > .section-title {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.process-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  max-width: var(--container);
  margin: 28px auto 0;
}
.process-step {
  position: relative;
  padding: 22px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.process-step::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 16px;
  font-weight: 700;
  z-index: 2;
}
.process-step:last-child::after { display: none; }
.step-num {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 8px;
}
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.step-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ============ Fleet ============ */
.fleet {
  padding: var(--pad-y) var(--pad-x);
  max-width: var(--container);
  margin: 0 auto;
}
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.fleet-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.fleet-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.fleet-img { aspect-ratio: 4/3; overflow: hidden; }
.fleet-img img { width: 100%; height: 100%; object-fit: cover; }
.fleet-meta { padding: 16px 18px; }
.fleet-meta h4 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.fleet-meta p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ============ News ============ */
.news {
  padding: var(--pad-y) var(--pad-x);
  background: #fff;
  max-width: var(--container);
  margin: 0 auto;
}
.news-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.news-more {
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 2px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.news-more:hover { color: var(--gold); border-color: var(--gold); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.news-img { aspect-ratio: 16/9; overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 18px; }
.news-date {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2px;
  font-weight: 700;
}
.news-tag {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  background: #f3f1e6;
  color: var(--ink-2);
  font-size: 10px;
  border-radius: 100px;
  letter-spacing: 1px;
}
.news-h {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 12px 0 6px;
  line-height: 1.5;
}
.news-p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ============ Contact Section ============ */
.contact-section {
  padding: var(--pad-y) 0;
  background: var(--cream);
}
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  margin-top: 8px;
  margin-bottom: 40px;
}
.contact-info-title, .contact-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 18px;
}
.contact-info p {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 8px;
}
.contact-info p b {
  color: var(--gold);
  margin-right: 12px;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 600;
  display: inline-block;
  min-width: 36px;
}
.contact-info-block { margin-top: 14px !important; }

/* form */
.contact-form {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field { margin-bottom: 14px; }
.form-field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 1px;
  font-weight: 600;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,97,.15);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-honeypot { display: none; }
.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--ink);
  color: #fff;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.form-submit:hover { background: var(--ink-2); transform: translateY(-2px); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.form-status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 18px;
  line-height: 1.5;
}
.form-status.success { color: #2D7A3D; }
.form-status.error { color: #C73E3E; }

/* map under contact grid */
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

/* ============ Footer (simplified) ============ */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 40px 0 24px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-brand .footer-logo { width: 180px; margin-bottom: 10px; }
.footer-tag {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  max-width: 360px;
  margin: 0;
}
.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  letter-spacing: 1px;
  text-align: right;
}
.footer-copy div { line-height: 1.7; }

/* ============ Responsive: 平板 ============ */
@media (max-width: 1024px) {
  :root { --pad-x: 32px; --pad-y: 60px; }
  .hero-title { font-size: 44px; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .process-flow { grid-template-columns: repeat(3, 1fr); }
  .process-step::after {
    content: '↓';
    top: auto;
    right: auto;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
  }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .fleet-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ Responsive: 手機 ============ */
@media (max-width: 768px) {
  :root { --pad-x: 20px; --pad-y: 48px; --nav-h: 60px; }
  .nav-inner { gap: 16px; }
  .nav-logo img { height: 30px; }
  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 16px var(--pad-x);
    gap: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    border-left: 0;
  }
  .nav-toggle { display: flex; margin-left: auto; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left { padding: 50px var(--pad-x); }
  .hero-title { font-size: 32px; }
  .hero-right { padding: 40px 20px; }
  .hero-cert-stack { gap: 8px; margin-bottom: 16px; }
  .hero-cert-img { width: 90px; border-width: 2px; }

  .about {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-side { position: static; }

  .cert-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex-shrink: 0; }
  .process-flow { grid-template-columns: 1fr; }
  .process-step::after { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .fleet-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-tag { max-width: none; }
  .footer-copy { text-align: center; }

  .section-title { font-size: 24px; }

  .facility-strip { height: 240px; }
  .facility-title { font-size: 20px; }
  .facility-text { padding-bottom: 24px; }
}

/* ============ 動畫 ============ */
@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-sub, .hero-ctas { opacity: 0; animation: fadeUp .6s ease-out forwards; }
  .hero-sub { animation-delay: .1s; }
  .hero-ctas { animation-delay: .2s; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
