/* Swift Power Engineering — Cool Precision system */
:root {
  --navy: #071a22;
  --navy-2: #0c2c38;
  --navy-3: #123844;
  --ice: #3ee0c8;
  --ice-2: #1aa894;
  --copper: #d4783a;
  --copper-2: #b85f24;
  --paper: #f3eee4;
  --paper-2: #e7dfd0;
  --ink: #122028;
  --muted: #5b6d76;
  --steel: #8ba3b0;
  --white: #fbf8f3;
  --line: rgba(62, 224, 200, 0.22);
  --line-dark: rgba(18, 32, 40, 0.12);
  --shadow: 0 18px 50px rgba(7, 26, 34, 0.18);
  --radius: 2px;
  --header-h: 76px;
  --z-header: 1000;
  --z-menu: 2000;
  --z-top: 1500;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4.5rem;
  --space-6: 7rem;
  --font: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --display: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 1.02rem;
}

body.is-locked {
  overflow: hidden;
  height: 100dvh;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ice);
  color: var(--navy);
  padding: 0.6rem 1rem;
  z-index: 3000;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--display);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice-2);
  font-size: 0.82rem;
  font-weight: 600;
}

.section {
  padding: var(--space-5) 0;
}

.section--navy {
  background: var(--navy);
  color: var(--paper);
}

.section--paper {
  background: var(--paper);
}

.section--tint {
  background: linear-gradient(180deg, #eae3d5 0%, var(--paper) 100%);
}

.section-head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 2.4rem;
  max-width: 42rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.2;
  font-weight: 700;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
}

.section--navy .lede {
  color: var(--steel);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.nav-link:focus-visible,
.logo:focus-visible,
.menu-toggle:focus-visible,
.back-top:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.btn-copper {
  background: var(--copper);
  color: #fff;
}

.btn-copper:hover {
  background: var(--copper-2);
}

.btn-ice {
  background: var(--ice);
  color: var(--navy);
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(7, 26, 34, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: grid;
  line-height: 1.15;
  color: var(--white);
}

.logo strong {
  font-size: 1.12rem;
  letter-spacing: 0.04em;
}

.logo span {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice);
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  color: #d7e4ea;
  padding: 0.45rem 0.7rem;
  font-size: 0.92rem;
  position: relative;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--ice);
}

.header-cta {
  display: none;
}

.menu-toggle {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: 0.2s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

/* Independent full-screen mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: var(--z-menu);
  background: var(--navy);
  color: var(--white);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0 1rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.menu-close {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-menu-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 1.5rem 1.25rem 2.5rem;
  display: grid;
  align-content: start;
  gap: 0.25rem;
}

.mobile-menu-list a {
  display: block;
  padding: 1rem 0.2rem;
  font-size: 1.45rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  color: var(--white);
}

.mobile-menu-list a.is-active {
  color: var(--ice);
}

.mobile-menu-cta {
  margin-top: 1.5rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .desktop-nav,
  .header-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(92dvh, 820px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background: var(--navy);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 26, 34, 0.88) 0%, rgba(7, 26, 34, 0.55) 48%, rgba(7, 26, 34, 0.28) 100%),
    linear-gradient(180deg, rgba(7, 26, 34, 0.2) 0%, rgba(7, 26, 34, 0.72) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0 4rem;
  max-width: 40rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.1rem);
  line-height: 1.12;
  margin: 0.8rem 0 1.1rem;
}

.hero p {
  color: #d8e6ec;
  font-size: 1.08rem;
}

.page-hero {
  background:
    linear-gradient(180deg, rgba(7, 26, 34, 0.78), rgba(7, 26, 34, 0.72)),
    var(--hero-img, url("../images/hero.jpg")) center / cover;
  color: var(--white);
  padding: 4.6rem 0 3.4rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin: 0.5rem 0 0.7rem;
}

/* Split / about */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
}

.kicker-line {
  width: 48px;
  height: 3px;
  background: var(--ice);
  margin: 0.8rem 0 1.1rem;
}

.prose p + p {
  margin-top: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}

.stat {
  border-top: 2px solid var(--ice);
  padding-top: 0.7rem;
}

.stat b {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  color: var(--navy);
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.section--navy .stat b {
  color: var(--ice);
}

.section--navy .stat span {
  color: var(--steel);
}

/* Service cards */
.service-grid {
  display: grid;
  gap: 1.25rem;
}

.service-card {
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.service-card-body {
  padding: 1.3rem 1.25rem 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.service-card p,
.service-card li {
  color: var(--muted);
  font-size: 0.98rem;
}

.service-card ul {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.25rem;
}

.service-card li::before {
  content: "▸ ";
  color: var(--ice-2);
}

.service-list {
  display: grid;
  gap: 1.4rem;
}

.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line-dark);
}

.num {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--ice-2);
  line-height: 1;
  min-width: 2.4rem;
}

/* Gateway */
.gateway {
  display: grid;
  gap: 1rem;
}

.gate-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: var(--white);
  display: flex;
  align-items: flex-end;
}

.gate-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gate-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 26, 34, 0.15), rgba(7, 26, 34, 0.82));
}

.gate-card div {
  position: relative;
  z-index: 1;
  padding: 1.3rem;
}

.gate-card h3 {
  font-size: 1.4rem;
}

.gate-card span {
  color: var(--ice);
  font-family: var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

/* Why */
.why-grid {
  display: grid;
  gap: 1rem;
}

.why-card {
  background: var(--navy-2);
  padding: 1.4rem;
  border-left: 3px solid var(--ice);
}

.why-card p {
  color: #c9d7dd;
  margin-top: 0.55rem;
}

/* Pricing */
.price-hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.price-box {
  background: var(--navy);
  color: var(--white);
  padding: 1.8rem;
}

.price-box .amount {
  font-family: var(--display);
  font-size: 4.4rem;
  line-height: 0.9;
  color: var(--ice);
}

.price-box .amount small {
  font-size: 1.2rem;
}

.price-types {
  display: grid;
  gap: 1rem;
}

.price-type {
  background: var(--white);
  padding: 1.1rem;
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  box-shadow: 0 8px 24px rgba(7, 26, 34, 0.08);
}

.price-type img {
  width: 84px;
  height: 84px;
  object-fit: cover;
}

.price-type strong {
  display: block;
}

.price-type b {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--copper);
}

.note-banner {
  margin-top: 1.6rem;
  padding: 1.2rem 1.3rem;
  background: #fff4e8;
  border-left: 4px solid var(--copper);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line-dark);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--ice-2);
  font-family: var(--display);
  font-size: 1.4rem;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-panel,
.form-panel {
  background: var(--white);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.contact-list a {
  color: var(--ice-2);
  font-weight: 700;
}

.map-placeholder {
  min-height: 280px;
  background:
    linear-gradient(135deg, rgba(7, 26, 34, 0.72), rgba(18, 56, 68, 0.65)),
    repeating-linear-gradient(90deg, #cfd8d4 0 12px, #d8e0dc 12px 24px),
    repeating-linear-gradient(0deg, #c5d0cc 0 12px, #d4ddd9 12px 24px);
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

.map-placeholder strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #cfd8d4;
  background: #fbfaf7;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius);
}

.form-grid textarea {
  min-height: 140px;
  resize: vertical;
}

.form-grid .error {
  color: #b42318;
  font-size: 0.82rem;
  font-weight: 500;
}

.form-success {
  display: none;
  padding: 1rem;
  background: #e8f8f4;
  border-left: 4px solid var(--ice-2);
}

.form-success.is-show {
  display: block;
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  background: var(--white);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
}

.blog-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.2rem 1.2rem 1.4rem;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
}

.blog-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.article {
  background: var(--white);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  box-shadow: var(--shadow);
  max-width: 820px;
}

.article .meta {
  margin: 0.4rem 0 1.2rem;
}

.toc {
  background: var(--paper);
  padding: 1rem 1.1rem;
  margin: 0 0 1.8rem;
  border-left: 3px solid var(--ice-2);
}

.toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--navy-2);
}

.article h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.7rem;
}

.article h3 {
  font-size: 1.15rem;
  margin: 1.3rem 0 0.5rem;
}

.article p + p,
.article ul + p,
.article p + ul {
  margin-top: 0.95rem;
}

.article ul {
  padding-left: 1.2rem;
  list-style: disc;
  color: var(--muted);
}

.article a {
  color: var(--ice-2);
  text-decoration: underline;
}

.cta-band {
  margin-top: 2.4rem;
  padding: 1.5rem;
  background: var(--navy);
  color: var(--white);
}

/* Footer */
.site-footer {
  background: #05141a;
  color: #c9d7dd;
  padding: 3rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

.site-footer h3 {
  color: var(--white);
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.site-footer a:hover {
  color: var(--ice);
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: #8ea0a8;
}

.back-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--z-top);
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--copper);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.back-top.is-show {
  opacity: 1;
  pointer-events: auto;
}

.js-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 700px) {
  .service-grid,
  .gateway,
  .why-grid,
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split,
  .price-hero,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .price-types {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gateway {
    grid-template-columns: repeat(4, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 430px) {
  .wrap {
    width: min(var(--max), calc(100% - 1.5rem));
  }

  .mobile-menu-list a {
    font-size: 1.28rem;
    padding: 0.95rem 0.2rem;
  }

  .price-type {
    grid-template-columns: 64px 1fr;
  }

  .price-type b {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 4.2rem 0 3rem;
  }
}
