/* ===========================
   Mori Dental 明森牙醫
   =========================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-mint: #e8f4f5;
  --teal: #4a90a4;
  --teal-dark: #2e6b7d;
  --teal-light: #a8d5d8;
  --navy: #1a2b4a;
  --text: #1a2b4a;
  --text-mid: #4a5e7a;
  --text-soft: #8a96a8;
  --border: #e3e9f0;
  --border-soft: #eef2f7;
  --shadow: 0 20px 50px rgba(26, 43, 74, 0.08);
  --sans: 'Manrope', 'Noto Sans TC', -apple-system, sans-serif;
  --serif: 'Noto Serif TC', serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ============ TOPBAR ============ */
.topbar {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 12px 0;
  font-size: 13px;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.topbar-left { display: flex; gap: 32px; }
.topbar-left span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar-left svg { color: var(--teal-light); }
.topbar-right a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-light);
  font-weight: 600;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.nav.scrolled {
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(26, 43, 74, 0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--teal);
}
.logo div { line-height: 1.2; }
.logo strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.logo small {
  display: block;
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.15em;
  font-weight: 600;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--text-mid);
  position: relative;
  padding: 6px 0;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--teal); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s var(--ease);
}
.nav-cta:hover {
  background: var(--teal-dark);
  transform: translateY(-2px);
}

/* ============ HERO ============ */
.hero {
  padding: 80px 0 100px;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-mint);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 28px;
}
.hero-title .hl {
  color: var(--teal);
  position: relative;
  display: inline-block;
}
.hero-title .hl::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--teal-light);
  z-index: -1;
  opacity: 0.5;
}
.hero-desc {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 28px;
}
.trust-item strong {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.trust-item sup {
  font-size: 16px;
  color: var(--teal);
  margin-left: 2px;
}
.trust-item span {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
  display: block;
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.trust-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Hero visual */
.hero-visual {
  position: relative;
  height: 600px;
}
.hero-img-main {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(26, 43, 74, 0.15);
}
.hero-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-card {
  position: absolute;
  background: #fff;
  padding: 16px 20px;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(26, 43, 74, 0.12);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}
.hero-card svg {
  color: var(--teal);
  background: var(--bg-mint);
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.hero-card strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
  font-weight: 700;
}
.hero-card small {
  font-size: 11px;
  color: var(--text-soft);
}
.hero-card-1 {
  top: 12%;
  left: -20px;
  animation: float 5s ease-in-out infinite;
}
.hero-card-2 {
  bottom: 16%;
  right: -20px;
  animation: float 5s ease-in-out infinite 1.5s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.btn.large { padding: 20px 40px; font-size: 15px; }
.btn.full { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(74, 144, 164, 0.3);
}
.btn-line {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-line:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ============ SECTION HEAD ============ */
.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.section-title em {
  color: var(--teal);
  font-style: normal;
}
.section-desc {
  font-size: 16px;
  color: var(--text-mid);
  margin-top: 16px;
}
.section-head { margin-bottom: 64px; }
.section-head.center {
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ============ ABOUT / FEATURES ============ */
.about {
  padding: 120px 0;
  background: var(--bg);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.feature {
  background: var(--bg-soft);
  padding: 40px 32px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  transition: all 0.4s var(--ease);
}
.feature:hover {
  background: #fff;
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: var(--teal-light);
}
.feat-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-mint);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  margin-bottom: 24px;
  transition: all 0.4s;
}
.feature:hover .feat-icon {
  background: var(--teal);
  color: #fff;
}
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.feature p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ============ SERVICES ============ */
.services {
  padding: 120px 0;
  background: var(--bg-soft);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: all 0.4s var(--ease);
}
.service:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}
.srv-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.srv-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.service:hover .srv-img img {
  transform: scale(1.08);
}
.srv-body {
  padding: 32px 28px;
  position: relative;
}
.srv-num {
  position: absolute;
  top: -20px;
  right: 24px;
  background: var(--teal);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.srv-body h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.srv-body p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 20px;
}
.srv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  transition: gap 0.3s;
}
.srv-link:hover { gap: 12px; }

/* ============ DOCTORS ============ */
.doctors {
  padding: 120px 0;
}
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.doctor {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: all 0.4s var(--ease);
}
.doctor:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}
.dr-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-mint);
}
.dr-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dr-body {
  padding: 32px 28px;
}
.dr-body h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.dr-title {
  font-size: 13px;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.dr-body ul {
  list-style: none;
}
.dr-body ul li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 8px;
}
.dr-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

/* ============ CASES ============ */
.cases {
  padding: 120px 0;
  background: var(--bg-soft);
}
.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
}
.cases-desc {
  font-size: 16px;
  color: var(--text-mid);
  margin: 24px 0 36px;
  max-width: 440px;
}
.testi-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.testi {
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
}
.testi .stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}
.testi .stars svg {
  width: 18px;
  height: 18px;
  color: #f5b942;
}
.testi p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}
.testi strong {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
}

/* ============ CTA ============ */
.cta {
  padding: 80px 0;
  background: var(--bg);
}
.cta-card {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff;
  padding: 60px 80px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.cta-card h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.cta-card p {
  font-size: 16px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.cta-actions .btn-primary {
  background: #fff;
  color: var(--teal-dark);
  border-color: #fff;
}
.cta-actions .btn-primary:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.cta-actions .btn-line {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.cta-actions .btn-line:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ============ CONTACT ============ */
.contact {
  padding: 120px 0;
  background: var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}
.contact-desc {
  font-size: 16px;
  color: var(--text-mid);
  margin: 24px 0 40px;
}
.info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: var(--bg-soft);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
}
.info-card svg {
  color: var(--teal);
  background: var(--bg-mint);
  padding: 12px;
  border-radius: 12px;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
}
.info-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.info-card p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.7;
}

/* Form */
.contact-form {
  background: var(--bg-soft);
  padding: 48px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-form h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field label {
  display: block;
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 600;
  margin-bottom: 8px;
}
.form-field label em {
  color: #e74c3c;
  font-style: normal;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  border-radius: 10px;
  transition: all 0.3s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.12);
}
.form-field textarea { resize: vertical; }

/* ============ FOOTER ============ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 60px;
  padding-bottom: 60px;
}
.footer .logo strong { color: #fff; }
.footer .logo small { color: var(--teal-light); }
.footer-col p {
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}
.footer-col h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}
.footer-col a {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--teal-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  font-size: 12px;
  text-align: center;
  color: rgba(255,255,255,0.5);
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ MOBILE NAV / HAMBURGER ============ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  z-index: 1001;
}
.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { transform: translate(-50%, calc(-50% - 5px)); }
.nav-toggle span:nth-child(3) { transform: translate(-50%, calc(-50% + 5px)); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  overflow-y: auto;
}
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu-inner {
  min-height: 100%;
  padding: 110px 32px 60px;
  display: flex;
  flex-direction: column;
}
.mobile-nav { display: flex; flex-direction: column; border-top: 1px solid var(--border-soft); }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  transition: padding 0.3s var(--ease), color 0.3s;
}
.mobile-nav a span {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--teal);
  font-weight: 700;
}
.mobile-nav a:hover { padding-left: 12px; color: var(--teal); }
.mobile-cta {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 32px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
}
.mobile-foot {
  margin-top: auto;
  padding-top: 60px;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  line-height: 1.9;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .topbar-left { gap: 20px; font-size: 12px; }
  .hero-title { font-size: clamp(40px, 6vw, 64px); }
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { height: 480px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .doctors-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .cases-grid { grid-template-columns: 1fr; gap: 60px; }
  .cta-card { grid-template-columns: 1fr; padding: 50px 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .topbar { display: none; }
  .nav { padding: 14px 0; }
  .container { padding: 0 24px; }
  .logo strong { font-size: 18px; }
  .logo small { font-size: 9px; }

  .hero { padding: 40px 0 70px; }
  .hero-eyebrow { font-size: 11px; }
  .hero-title { font-size: clamp(36px, 9vw, 52px); line-height: 1.15; }
  .hero-desc { font-size: 14px; }
  .hero-actions { flex-wrap: wrap; gap: 12px; }
  .hero-actions .btn { padding: 14px 24px; font-size: 13px; }
  .hero-visual { height: 380px; }
  .hero-card-1 { left: 0; padding: 14px 18px; font-size: 12px; }
  .hero-card-2 { right: 0; padding: 14px 18px; font-size: 12px; }
  .hero-trust { flex-wrap: wrap; gap: 16px; }
  .hero-trust > * { font-size: 11px; }

  .about, .services, .doctors, .cases, .contact { padding: 80px 0; }
  .section-eyebrow { font-size: 11px; }
  .section-title { font-size: clamp(30px, 7vw, 44px); }

  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { padding: 28px 24px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 28px 24px; }

  .cta-card { padding: 40px 28px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-form { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) {
  .mobile-nav a { font-size: 19px; padding: 20px 0; }
  .mobile-menu-inner { padding: 100px 24px 50px; }
}
