/* ===================================================================
   手機維修專門店 / Mobile Repair Pro Shop
   Design language: "Diagnostic Bench" — the visual world of a repair
   counter: intake tickets, torn perforation edges, multimeter-style
   monospace readouts, copper solder accents on deep circuit-navy.
   =================================================================== */

:root {
  /* Color */
  --ink:        #10202B;   /* screen-off navy — primary text / dark surfaces */
  --ink-soft:   #274151;   /* steel-blue secondary text on light */
  --paper:      #F4F2EC;   /* warm bench-paper background */
  --paper-raised:#FFFFFF;  /* card surface on paper */
  --copper:     #C1691F;   /* solder-copper accent */
  --copper-deep:#9A4E15;
  --circuit:    #3F6E5C;   /* muted circuit-board green — secondary accent */
  --line:       #D8D2C4;   /* hairline on paper */
  --line-dark:  rgba(244,242,236,0.16);

  /* Type */
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --font-body:    "Inter", "Noto Sans TC", sans-serif;
  --font-mono:    "IBM Plex Mono", "Noto Sans TC", monospace;

  --radius: 4px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
}

/* ---------- Type scale ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--copper);
  display: inline-block;
}

.section { padding: 76px 0; }
.section--tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p.lede { margin-top: 14px; color: var(--ink-soft); font-size: 1.05rem; }

.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark .eyebrow { color: #E3A868; }
.section--dark .eyebrow::before { background: #E3A868; }
.section--dark .section-head p.lede { color: #B9C3C9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--copper);
  border-color: var(--copper);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn-ghost-light {
  border-color: rgba(244,242,236,0.5);
  color: var(--paper);
}
.btn-ghost-light:hover { background: rgba(244,242,236,0.1); }
.btn-block { width: 100%; justify-content: center; }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(244,242,236,0.92);
  backdrop-filter: blur(8px);
  z-index: -1;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(16,32,43,0.08); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--ink);
  display: grid;
  place-items: center;
}
.brand-text-group { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.brand-addr {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  max-width: 280px;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.tel-link {
  display: none;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}
.tel-link:hover { border-color: var(--ink); }

.lang-toggle {
  display: flex;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}
.lang-toggle button {
  background: transparent;
  border: none;
  padding: 9px 13px;
  cursor: pointer;
  color: var(--ink);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.main-nav {
  position: fixed;
  inset: 0;
  top: 71px;
  background: var(--paper);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
  z-index: 55;
  overflow-y: auto;
}
.main-nav.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform .25s ease, visibility 0s linear 0s;
}
.main-nav ul {
  list-style: none;
  margin: 0; padding: 30px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.main-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line);
}
.main-nav .nav-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 900px) {
  .tel-link { display: inline-flex; }
  .nav-toggle { display: none; }
  .main-nav {
    position: static;
    inset: auto;
    top: auto;
    transform: none;
    visibility: visible;
    background: none;
    overflow: visible;
  }
  .main-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 26px;
  }
  .main-nav a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 4px 0;
    border-bottom: none;
  }
  .main-nav .nav-cta { display: none; }
  .header-inner { flex-wrap: nowrap; }
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: 54px 0 70px;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(193,105,31,0.16), transparent 60%),
    var(--paper);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  gap: 40px;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; }
}

.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.hero-stats div {
  padding: 16px 14px 0;
  border-right: 1px solid var(--line);
}
.hero-stats div:last-child { border-right: none; }
.hero-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--copper);
}
.hero-stats span { font-size: 0.78rem; color: var(--ink-soft); }

/* --- signature element: the diagnostic intake ticket --- */
.ticket {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: 26px 24px 22px;
  box-shadow: 8px 8px 0 rgba(193,105,31,0.35);
}
.ticket::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -1px;
  width: 0;
  border-left: 2px dashed rgba(244,242,236,0.25);
}
.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(244,242,236,0.25);
  color: #B9C3C9;
}
.ticket-id { color: var(--paper); font-weight: 700; }
.ticket-scan {
  position: relative;
  height: 84px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(63,110,92,0.25), rgba(63,110,92,0.05));
  border: 1px solid rgba(244,242,236,0.14);
  overflow: hidden;
  margin-bottom: 16px;
}
.ticket-scan::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #7FD9B6, transparent);
  animation: scan 2.6s linear infinite;
}
@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}
.ticket-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.ticket-list li {
  display: flex; justify-content: space-between;
  font-size: 0.86rem;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(244,242,236,0.1);
}
.ticket-list li span:last-child { font-family: var(--font-mono); color: #7FD9B6; }
.ticket-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.78rem; color: #B9C3C9;
}
.ticket-foot strong { color: var(--paper); font-size: 1rem; }

/* ===================== SERVICES ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.svc-card {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(16,32,43,0.09);
  border-color: var(--copper);
}
.svc-icon {
  width: 44px; height: 44px;
  border-radius: 7px;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--copper);
}
.svc-icon svg { width: 24px; height: 24px; }
.svc-card h3 { font-size: 1.05rem; }
.svc-card .svc-en {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.svc-card p.svc-desc { color: var(--ink-soft); font-size: 0.92rem; flex-grow: 1; }
.svc-cta {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--copper-deep);
  display: inline-flex; align-items: center; gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.svc-cta:hover { color: var(--copper); }

/* ===================== TRUST ===================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  overflow: hidden;
}
.trust-item {
  background: var(--ink);
  padding: 28px 24px;
}
.trust-item .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--copper);
  display: block;
  margin-bottom: 6px;
}
.trust-item h4 { font-size: 0.98rem; margin-bottom: 6px; }
.trust-item p { font-size: 0.85rem; color: #B9C3C9; }

/* ===================== TESTIMONIALS ===================== */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.testi-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  border-radius: 6px;
  padding: 22px;
}
.testi-stars { color: var(--copper); font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 10px; letter-spacing: 2px; }
.testi-quote { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 14px; }
.testi-name { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.testi-note { font-size: 0.72rem; color: var(--ink-soft); }

/* ===================== CONTACT ===================== */
.contact-grid {
  display: grid;
  gap: 30px;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}
.contact-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .ic {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 6px; background: var(--ink); color: var(--copper);
  display: grid; place-items: center;
}
.contact-list .ic svg { width: 18px; height: 18px; }
.contact-list strong { display: block; font-size: 0.92rem; }
.contact-list span { font-size: 0.86rem; color: var(--ink-soft); }
.contact-list a { text-decoration: none; }

.map-embed {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
  min-height: 340px;
}
.map-embed iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--ink);
  color: #B9C3C9;
  padding: 46px 0 26px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  gap: 28px;
  margin-bottom: 30px;
}
@media (min-width: 780px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.footer-grid h4 { color: var(--paper); font-size: 0.85rem; margin-bottom: 14px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em;}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: #B9C3C9; text-decoration: none; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  border-top: 1px solid rgba(244,242,236,0.12);
  padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

/* ===================== WHATSAPP FLOAT ===================== */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(37,211,102,0.45);
  text-decoration: none;
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }

/* ===================== UTIL ===================== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

[lang-tc], [lang-en] { }
html[lang="en"] [data-i18n-tc-only] { display: none; }
html[lang="zh-Hant-HK"] [data-i18n-en-only] { display: none; }

/* ===================== BREADCRUMB (subpages) ===================== */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  padding: 16px 0 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px dotted var(--ink-soft); }
.breadcrumb a:hover { color: var(--copper); border-color: var(--copper); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ===================== SUBPAGE HERO (topic pages) ===================== */
.topic-hero {
  padding: 20px 0 56px;
  background:
    radial-gradient(ellipse 800px 460px at 90% -10%, rgba(193,105,31,0.14), transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}
.topic-hero-grid {
  display: grid;
  gap: 30px;
  align-items: start;
}
@media (min-width: 900px) {
  .topic-hero-grid { grid-template-columns: 1.3fr 0.7fr; }
}
.topic-hero h1 { margin: 14px 0 16px; }
.topic-hero .lede { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 26px; max-width: 560px; }
.topic-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.signs-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: 24px 22px;
}
.signs-panel h2 { font-size: 1rem; margin-bottom: 14px; color: var(--paper); }
.signs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.signs-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.88rem; color: #DCE3E6;
  padding-bottom: 11px; border-bottom: 1px solid rgba(244,242,236,0.1);
}
.signs-list li:last-child { border-bottom: none; padding-bottom: 0; }
.signs-list li::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--copper);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ===================== PROCESS STEPS ===================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.process-step {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 20px;
  position: relative;
}
.process-step .step-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--copper);
  display: block;
  margin-bottom: 10px;
}
.process-step h3 { font-size: 1rem; margin-bottom: 8px; }
.process-step p { font-size: 0.88rem; color: var(--ink-soft); }

/* ===================== FAQ ACCORDION ===================== */
.faq-list { display: grid; gap: 12px; max-width: 780px; }
.faq-item {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-q::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--copper);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform .18s ease;
}
.faq-item.is-open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .22s ease, padding .22s ease;
  padding: 0 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.faq-item.is-open .faq-a {
  max-height: 240px;
  padding: 0 20px 18px;
}

/* ===================== RELATED SERVICES ===================== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 18px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  transition: transform .15s ease, border-color .15s ease;
}
.related-card:hover { transform: translateY(-3px); border-color: var(--copper); }
.related-card .arrow { color: var(--copper); font-family: var(--font-mono); }