/* TY AUTO DETAIL — Precision Atelier */

:root {
  --navy: #1a2b4b;
  --navy-mid: #22345f;
  --navy-deep: #0e1830;
  --teal: #5ac8d8;
  --teal-dark: #2b9aab;
  --blue: #4a90e2;
  --white: #ffffff;
  --offwhite: #f2f5f9;
  --mist: #e7eef5;
  --ink: #152238;
  --muted: #5d6b82;
  --line: #d5deea;
  --whatsapp: #25d366;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --radius-pill: 999px;
  --header-h: 4.85rem;
  --container: 72rem;
  --shadow: 0 18px 48px rgba(14, 24, 48, 0.14);
  --shadow-soft: 0 8px 24px rgba(14, 24, 48, 0.08);
  --font-en: "Outfit", "Noto Sans TC", sans-serif;
  --font-zh: "Noto Sans TC", "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-zh);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

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

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-en);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5000;
  background: var(--teal);
  color: var(--navy-deep);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}

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

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

.section {
  padding: 5rem 0;
}

.section--tight {
  padding: 3.5rem 0;
}

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

.section--mist {
  background: var(--offwhite);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--teal-dark);
  font-family: var(--font-en);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: var(--teal);
}

.section__title {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  color: var(--navy);
  max-width: 18ch;
}

.section--navy .section__title,
.section--navy .eyebrow {
  color: var(--white);
}

.section--navy .eyebrow::before {
  background: var(--teal);
}

.section__lead {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.section--navy .section__lead {
  color: rgba(255, 255, 255, 0.78);
}

.section__head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.4rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}

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

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-desktop a:focus-visible,
.menu-toggle:focus-visible,
.filter-bar button:focus-visible,
.js-lightbox:focus-visible,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.btn--teal {
  background: var(--teal);
  color: var(--navy-deep);
  box-shadow: 0 10px 24px rgba(90, 200, 216, 0.35);
}

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

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: #063;
}

.btn--sm {
  min-height: 2.55rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-soft);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand img {
  width: 3.1rem;
  height: 3.1rem;
  object-fit: contain;
  background: var(--white);
  border-radius: 50%;
}

.brand__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__en {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--navy);
}

.brand__zh {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.nav-desktop ul {
  display: flex;
  gap: 0.15rem;
}

.nav-desktop a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-pill);
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--teal-dark);
}

.nav-desktop a[aria-current="page"] {
  background: rgba(90, 200, 216, 0.14);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-btn {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
}

.icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.header-actions .btn--sm {
  display: none;
}

.menu-toggle {
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 0.8rem;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

/* Independent full-screen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 4000;
  background: var(--navy-deep);
  color: var(--white);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu__inner {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.25rem 2rem;
}

.mobile-menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.mobile-menu__top span {
  font-family: var(--font-en);
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--teal);
}

.menu-close {
  width: 2.7rem;
  height: 2.7rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu nav a {
  display: block;
  padding: 1rem 0;
  font-size: 1.55rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu nav a[aria-current="page"] {
  color: var(--teal);
}

.mobile-menu__cta {
  margin-top: auto;
  padding-top: 1.6rem;
  display: grid;
  gap: 0.7rem;
}

.mobile-menu__cta .btn {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-h));
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 24, 48, 0.28) 0%, rgba(14, 24, 48, 0.78) 58%, rgba(14, 24, 48, 0.92) 100%),
    radial-gradient(circle at 85% 15%, rgba(90, 200, 216, 0.28), transparent 28%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 3.5rem;
}

.hero__kicker {
  font-family: var(--font-en);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--teal);
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 4.1rem);
  max-width: 16ch;
}

.hero__quote {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--teal);
  font-weight: 700;
}

.hero__lead {
  margin-top: 0.85rem;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.82);
}

.hero__ring {
  position: absolute;
  right: -4rem;
  top: 12%;
  width: 18rem;
  height: 18rem;
  border: 10px solid rgba(90, 200, 216, 0.18);
  border-radius: 50%;
  border-top-color: var(--teal);
  border-right-color: var(--navy);
  pointer-events: none;
}

.page-hero {
  position: relative;
  min-height: 18rem;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 24, 48, 0.35), rgba(14, 24, 48, 0.88));
}

.page-hero__content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 2.4rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-hero p {
  margin-top: 0.7rem;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.82);
}

/* Cards / grids */
.grid-2,
.grid-3,
.grid-4,
.grid-6 {
  display: grid;
  gap: 1.15rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-6 { grid-template-columns: 1fr 1fr; }

.card,
.reason,
.promo,
.case-card,
.contact-card,
.service-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.reason,
.contact-card {
  padding: 1.4rem;
}

.contact-card .btn {
  margin-top: 0.85rem;
}

article[id],
section[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.reason__num,
.service-block__num {
  font-family: var(--font-en);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.04em;
}

.reason h3,
.service-preview h3,
.promo h3,
.case-card h3,
.contact-card h3 {
  margin: 0.35rem 0 0.4rem;
  color: var(--navy);
  font-size: 1.12rem;
}

.muted {
  color: var(--muted);
}

.service-preview {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-rows: 10.5rem 1fr;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.service-preview:hover,
.case-card:hover,
.promo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-preview img,
.promo img,
.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js-lightbox {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.js-lightbox img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.service-preview__body,
.case-card__body,
.promo__body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.service-block {
  display: grid;
}

.service-block img {
  min-height: 0;
  height: auto;
  aspect-ratio: 1 / 1;
}

.service-block__body {
  padding: 1.5rem 1.4rem 1.7rem;
}

.check-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
}

.check-list li {
  padding-left: 1.5rem;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--teal);
}

/* Promo */
.promo img {
  height: 11rem;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.6rem 0;
}

.price__now {
  font-family: var(--font-en);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy);
}

.price__was {
  color: var(--muted);
  text-decoration: line-through;
}

.note {
  font-size: 0.82rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  background: rgba(90, 200, 216, 0.18);
  color: var(--teal-dark);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Charity */
.charity {
  display: grid;
  gap: 1.2rem;
  background:
    radial-gradient(circle at 12% 20%, rgba(90, 200, 216, 0.18), transparent 32%),
    var(--navy);
  color: var(--white);
  border-radius: calc(var(--radius) + 0.3rem);
  padding: 1.6rem;
}

.charity h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.gift-list {
  display: grid;
  gap: 0.5rem;
}

.gift-list span {
  display: block;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
}

.split {
  display: grid;
  gap: 1.2rem;
}

.split__media {
  min-height: 16rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.split__media img {
  height: 100%;
  min-height: 16rem;
}

.split__media .js-lightbox img {
  min-height: 0;
  height: auto;
}

/* Cases */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.filter-bar button {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
}

.filter-bar button.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.case-card {
  display: grid;
}

.case-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.case-card.is-hidden {
  display: none;
}

/* Form / map */
.form {
  display: grid;
  gap: 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.92rem;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.75rem 0.9rem;
  background: var(--offwhite);
}

.form textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.2rem 0 1.4rem;
}

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

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

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

.footer-brand img {
  width: 4.2rem;
  height: 4.2rem;
  object-fit: contain;
  background: var(--white);
  border-radius: 50%;
  margin-bottom: 0.7rem;
}

.legal {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

/* Utilities */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(14, 24, 48, 0.92);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.lightbox__stage {
  position: relative;
  width: min(100%, 56rem);
  max-height: calc(100dvh - 2.5rem);
  display: grid;
  place-items: center;
}

.lightbox__stage figure {
  margin: 0;
  display: grid;
  justify-items: center;
  max-width: 100%;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: min(82dvh, 52rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.lightbox__caption {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  font-size: 0.92rem;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
  border-radius: 50%;
}

.lightbox__close {
  top: -0.4rem;
  right: -0.4rem;
  width: 2.7rem;
  height: 2.7rem;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 2;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox__prev { left: -0.2rem; }
.lightbox__next { right: -0.2rem; }

.lightbox__nav[hidden],
.lightbox.is-single .lightbox__nav {
  display: none;
}

@media (max-width: 759px) {
  .lightbox__prev { left: 0.2rem; }
  .lightbox__next { right: 0.2rem; }
}

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

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

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: -2.4rem;
  position: relative;
  z-index: 2;
}

.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-family: var(--font-en);
  font-size: 1.45rem;
  color: var(--navy);
}

.values {
  display: grid;
  gap: 0.9rem;
}

.value {
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--teal);
  background: var(--offwhite);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Desktop */
@media (min-width: 760px) {
  .container {
    width: min(calc(100% - 3rem), var(--container));
  }

  .header-actions .btn--sm {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .grid-2,
  .split,
  .charity,
  .service-block,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .service-block--flip .js-lightbox {
    order: 2;
  }

  .hero__ring {
    right: 6%;
    width: 22rem;
    height: 22rem;
  }
}

@media (min-width: 1024px) {
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 759px) {
  .nav-desktop {
    display: none;
  }

  .brand__en {
    font-size: 0.7rem;
  }

  .brand__zh {
    font-size: 0.7rem;
  }
}

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

  .hero h1 {
    font-size: 1.85rem;
  }
}
