/* =========================================================
   台隆節能科技 — Official Site Styles
   Palette derived from logo: red mark + dark slate, eco-green accent
   ========================================================= */
:root {
  --red: #c8102e;
  --red-dark: #9c0c23;
  --ink: #1c2431;
  --ink-2: #38465a;
  --eco: #16a34a;
  --eco-dark: #0f7a37;
  --teal: #0ea5b7;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-soft-2: #eef2f7;
  --line: #e2e8f0;
  --muted: #64748b;
  --white: #fff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(28, 36, 49, .18);
  --shadow-lg: 0 24px 60px -18px rgba(28, 36, 49, .30);
  --maxw: 1180px;
  --header-h: 72px;
  --font: "Noto Sans TC", system-ui, "Microsoft JhengHei", sans-serif;
  --display: "Poppins", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--red);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-weight: 700; font-size: .98rem;
  padding: .85em 1.7em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: .25s ease; white-space: nowrap; line-height: 1;
}
.btn-sm { padding: .6em 1.2em; font-size: .88rem; }
.btn-block { width: 100%; padding: 1em; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(200,16,46,.6); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 100;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0,0,0,.4); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand-logo { height: 42px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.12rem; color: var(--ink); letter-spacing: .5px; }
.brand-text small { font-size: .62rem; color: var(--muted); letter-spacing: .8px; font-weight: 500; }

.main-nav ul { display: flex; gap: .35rem; }
.main-nav a {
  display: block; padding: .55rem .9rem; font-weight: 500; font-size: .95rem;
  color: var(--ink-2); border-radius: 8px; position: relative; transition: .2s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 50%; bottom: 6px; width: 0; height: 2px;
  background: var(--red); transition: .25s ease; transform: translateX(-50%);
}
.main-nav a:hover, .main-nav a.active { color: var(--red); }
.main-nav a:hover::after, .main-nav a.active::after { width: 40%; }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.lang-toggle {
  width: 40px; height: 34px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 8px; font-weight: 700; font-size: .82rem; color: var(--ink-2);
  cursor: pointer; transition: .2s;
}
.lang-toggle:hover { border-color: var(--red); color: var(--red); }
.nav-burger { display: none; width: 42px; height: 38px; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav-burger span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .3s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 60px;
  background: linear-gradient(135deg, #131b28 0%, #1f2c40 55%, #2a1520 100%);
  color: #fff; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
  animation: float 14s ease-in-out infinite;
}
.hero-bg span:nth-child(1) { width: 460px; height: 460px; background: rgba(200,16,46,.55); top: -120px; right: -80px; }
.hero-bg span:nth-child(2) { width: 380px; height: 380px; background: rgba(22,163,74,.45); bottom: -140px; left: -60px; animation-delay: -5s; }
.hero-bg span:nth-child(3) { width: 300px; height: 300px; background: rgba(14,165,183,.4); top: 40%; left: 45%; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-30px) scale(1.08); } }

.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero-eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: 2px; font-size: .82rem;
  color: #ffd7dd; padding: .4em 1em; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; margin-bottom: 1.4rem; background: rgba(255,255,255,.06);
}
.hero-title {
  font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.18; letter-spacing: .5px; white-space: pre-line; margin-bottom: 1.3rem;
}
.hero-sub { font-size: 1.06rem; color: rgba(255,255,255,.82); max-width: 46ch; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 1.5rem 1.3rem; backdrop-filter: blur(6px);
  transition: .3s;
}
.stat-card:hover { background: rgba(255,255,255,.13); transform: translateY(-4px); }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: #fff; line-height: 1; }
.stat-value .suffix { font-size: 1.1rem; color: #ffd7dd; margin-left: 2px; }
.stat-label { margin-top: .5rem; font-size: .9rem; color: rgba(255,255,255,.78); }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3; }
.scroll-hint span { display: block; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: scrolldot 1.6s infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translate(-50%,0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%,14px); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.5rem); color: var(--ink); position: relative; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); border-radius: 3px; margin-top: 1rem; }
.section-head.center h2::after { margin-inline: auto; }
.section-head .lead { margin-top: 1.1rem; font-size: 1.08rem; color: var(--muted); }

/* ---------- About ---------- */
.about { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
.about-text p { margin-bottom: 1.2rem; color: var(--ink-2); font-size: 1.03rem; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: .3s; }
.hl-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.hl-card .hl-icon { font-size: 1.9rem; margin-bottom: .6rem; }
.hl-card h3 { font-size: 1.1rem; margin-bottom: .4rem; color: var(--ink); }
.hl-card p { font-size: .92rem; color: var(--muted); }

/* ---------- Solutions ---------- */
.solution-list { display: grid; gap: 2rem; }
.solution-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 2.5rem;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.solution-card:nth-child(even) { grid-template-columns: 1fr 300px; }
.solution-card:nth-child(even) .sol-visual { order: 2; }
.sol-visual {
  aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--ink) 0%, var(--ink-2) 100%); position: relative; overflow: hidden;
}
.solution-card:nth-child(even) .sol-visual { background: linear-gradient(140deg, #103a22 0%, var(--eco-dark) 100%); }
.sol-visual::before { content: ""; position: absolute; width: 180%; height: 180%; background: radial-gradient(circle, rgba(255,255,255,.14) 0%, transparent 60%); }
.sol-visual .sol-emoji { font-size: 4.5rem; position: relative; z-index: 1; }
.sol-tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: 1px; color: var(--red); background: rgba(200,16,46,.1); padding: .35em 1em; border-radius: 999px; margin-bottom: 1rem; }
.solution-card:nth-child(even) .sol-tag { color: var(--eco-dark); background: rgba(22,163,74,.12); }
.sol-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-family: var(--display); margin-bottom: .7rem; color: var(--ink); }
.sol-body .sol-summary { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 1.3rem; }
.sol-features { display: grid; gap: .6rem; }
.sol-features li { position: relative; padding-left: 1.9rem; color: var(--ink-2); font-size: .98rem; }
.sol-features li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 1.3rem; height: 1.3rem;
  background: var(--eco); color: #fff; border-radius: 50%; font-size: .78rem; font-weight: 700;
  display: grid; place-items: center;
}

/* ---------- Video ---------- */
.video-eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: 2px; font-size: .8rem;
  color: var(--red); text-transform: uppercase; margin-bottom: .6rem;
}
.video-frame {
  position: relative; width: min(100%, 960px); margin-inline: auto;
  aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: #000;
  border: 1px solid var(--line);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Products ---------- */
.products { background: var(--bg-soft); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.8rem; transition: .3s; position: relative; overflow: hidden; }
.product-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--eco)); transform: scaleX(0); transform-origin: left; transition: .35s; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card:hover::before { transform: scaleX(1); }
.product-icon { font-size: 2.4rem; margin-bottom: .8rem; }
.product-card h3 { font-size: 1.18rem; margin-bottom: .5rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.product-count { font-family: var(--display); font-size: .82rem; font-weight: 700; color: var(--red); background: rgba(200,16,46,.08); padding: .2em .7em; border-radius: 999px; white-space: nowrap; }
.product-card p { font-size: .94rem; color: var(--muted); }

/* ---------- Advantages ---------- */
.advantage-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.adv-card { padding: 2rem 1.6rem; border-radius: var(--radius); background: linear-gradient(160deg, #fff 0%, var(--bg-soft) 100%); border: 1px solid var(--line); transition: .3s; }
.adv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.adv-no { font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--red); opacity: .25; line-height: 1; }
.adv-card h3 { font-size: 1.15rem; margin: .5rem 0; color: var(--ink); }
.adv-card p { font-size: .93rem; color: var(--muted); }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; transition: .3s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.news-meta { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.news-date { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: .9rem; }
.news-tag { font-size: .74rem; font-weight: 700; color: var(--eco-dark); background: rgba(22,163,74,.12); padding: .2em .8em; border-radius: 999px; }
.news-card h3 { font-size: 1.12rem; margin-bottom: .5rem; color: var(--ink); }
.news-card p { font-size: .93rem; color: var(--muted); }
.partners { padding-top: 2.5rem; border-top: 1px dashed var(--line); }
.partners .p-label { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 1.6rem; letter-spacing: 1px; }
.partner-logos {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
  align-items: center; justify-items: center;
}
.partner-logo {
  width: 100%; height: 96px; display: grid; place-items: center;
  padding: 1rem 1.4rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
}
.partner-logo img {
  max-height: 100%; max-width: 100%; width: auto; object-fit: contain;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; }
.contact-info h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.5rem; }
.contact-list li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.contact-list .ci-icon { font-size: 1.3rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; background: var(--bg-soft); border-radius: 10px; flex: none; }
.contact-list .ci-k { font-size: .8rem; color: var(--muted); }
.contact-list .ci-v { font-weight: 500; color: var(--ink); }
.contact-list a.ci-v:hover { color: var(--red); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: .98rem; padding: .8em 1em; border: 1.5px solid var(--line);
  border-radius: 10px; background: var(--bg-soft); transition: .2s; resize: vertical; color: var(--ink);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 3px rgba(200,16,46,.1); }
.form-note { font-size: .92rem; padding: .8em 1em; border-radius: 10px; }
.form-note.ok { background: rgba(22,163,74,.1); color: var(--eco-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding-top: 3.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-brand img { height: 46px; background: #fff; padding: 6px 10px; border-radius: 10px; margin-bottom: 1rem; }
.footer-brand p { font-size: .98rem; color: #fff; }
.footer-brand .muted { color: rgba(255,255,255,.6); font-size: .9rem; }
.footer-contact { display: grid; gap: .7rem; align-content: start; }
.footer-contact h4 { color: #fff; margin-bottom: .3rem; font-size: 1rem; }
.footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.3rem 0; font-size: .85rem; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-bottom .muted { color: rgba(255,255,255,.5); }

/* ---------- Reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-stats { max-width: 460px; }
  .about-grid, .contact-grid, .footer-inner { grid-template-columns: 1fr; }
  .product-grid, .news-grid { grid-template-columns: 1fr 1fr; }
  .advantage-grid { grid-template-columns: 1fr 1fr; }
  .partner-logos { grid-template-columns: 1fr 1fr; }
  .solution-card, .solution-card:nth-child(even) { grid-template-columns: 1fr; gap: 1.8rem; }
  .solution-card:nth-child(even) .sol-visual { order: 0; }
  .sol-visual { max-width: 200px; aspect-ratio: 1; margin: 0 auto; }
}
@media (max-width: 720px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-120%); transition: .35s ease; pointer-events: none;
  }
  .main-nav.open { transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; padding: .8rem; gap: .2rem; }
  .main-nav a { padding: .85rem 1rem; }
  .nav-burger { display: flex; }
  .header-actions .btn { display: none; }
  .product-grid, .news-grid, .advantage-grid, .about-cards, .form-row { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
