/* ==========================================================================
   Willy Pan D.D.S. — global stylesheet
   Family & Cosmetic Dentistry · Cupertino, CA
   Modern, responsive, system-font design (no webfont downloads)
   ========================================================================== */

:root {
  --navy: #0d2f5f;
  --blue: #1550a0;
  --blue-bright: #2563c4;
  --blue-soft: #eaf2fb;
  --paper: #ffffff;
  --ink: #22303e;
  --muted: #5a6a7a;
  --line: #dbe4ee;
  --shadow-sm: 0 1px 3px rgba(13, 47, 95, .08);
  --shadow-md: 0 10px 30px -12px rgba(13, 47, 95, .25);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--blue-bright); }
a:hover { color: var(--blue); }

h1, h2, h3 {
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.85rem, 3.6vw, 2.55rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1em; }

/* Layout ------------------------------------------------------------------ */
.container {
  max-width: 1060px;
  margin-inline: auto;
  padding-inline: 22px;
}

.section { padding-block: 58px; }
.section-soft { background: linear-gradient(180deg, #f5f9fe 0%, #ffffff 100%); }

.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head p { color: var(--muted); margin-bottom: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

/* Accessibility ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: .6em 1em;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand img { display: block; }
.brand-tag {
  font-size: .8rem;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 14px;
  line-height: 1.35;
  display: none;
}
@media (min-width: 720px) { .brand-tag { display: block; } }

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--blue-soft);
  color: var(--navy);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: .55em 1.1em;
  border-radius: 10px;
  cursor: pointer;
}

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  display: block;
  padding: .5em .85em;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 9px;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.site-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
.site-nav .nav-cta {
  background: var(--blue);
  color: #fff;
}
.site-nav .nav-cta:hover { background: var(--navy); color: #fff; }

@media (max-width: 899px) {
  .nav-toggle { display: inline-block; }
  .js .site-nav {
    display: none;
    width: 100%;
    margin-left: 0;
  }
  .js .site-nav.open { display: block; }
  .js .site-nav ul { flex-direction: column; padding-block: 6px 14px; }
  .js .site-nav a { padding: .7em .9em; }
}

/* Hero (home) -------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, #e3eefc 0%, rgba(227, 238, 252, 0) 60%),
    linear-gradient(180deg, #f4f9ff 0%, #ffffff 100%);
  padding-block: 64px 70px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-block: 44px 50px; }
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border: 1px solid #cfdff5;
  padding: .35em .9em;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 { margin-bottom: .45em; }
.hero .lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 1.6em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }

.trust-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; color: var(--muted); font-size: .9rem; }
.trust-chips li::before { content: "✓ "; color: var(--blue-bright); font-weight: 700; }

.hero-figure { text-align: center; }
.hero-figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  padding: .78em 1.5em;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-ghost { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-ghost:hover { background: var(--blue-soft); color: var(--blue); }

/* Cards & grids ------------------------------------------------------------ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .96rem; }
.card .card-link { display: inline-block; margin-top: .9em; font-weight: 700; text-decoration: none; }
.card .card-link::after { content: " →"; }
.card .card-link:hover { text-decoration: underline; }

.icon-badge {
  display: inline-flex;
  width: 46px; height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.3rem;
  margin-bottom: 14px;
}

/* Split feature (image + text) --------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 42px;
  align-items: center;
}
.split.reverse { grid-template-columns: 1fr 340px; }
@media (max-width: 820px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
}
.split img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: block;
}
.portrait {
  justify-self: center;
  background: linear-gradient(160deg, var(--blue-soft), #fff);
  padding: 14px;
}
.portrait figcaption {
  margin-top: 10px;
  font-size: .88rem;
  color: var(--muted);
  text-align: center;
}

/* Checklist ---------------------------------------------------------------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li {
  padding-left: 1.7em;
  position: relative;
  margin-bottom: .6em;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-bright);
  font-weight: 800;
}

/* Steps (numbered) ---------------------------------------------------------- */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 20px; top: 44px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .2em; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: .96rem; }

/* Page hero (inner pages) --------------------------------------------------- */
.page-hero {
  background: linear-gradient(180deg, #f4f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding-block: 44px 40px;
}
.breadcrumb {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #9db0c4; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lede { color: var(--muted); max-width: 46em; margin-bottom: 0; font-size: 1.08rem; }

/* Team ---------------------------------------------------------------------- */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 720px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.team-card .avatar {
  flex: 0 0 112px;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-soft), #d9e8fa);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-card .avatar img { width: 100px; height: 124px; object-fit: cover; display: block; }
.team-card .avatar .initial {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--blue);
}
.team-card h3 { margin-bottom: .2em; }
.team-card .role {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--blue-bright);
  margin-bottom: .5em;
}
.team-card p { font-size: .94rem; color: var(--muted); margin-bottom: 0; }

/* FAQ (details/summary) ------------------------------------------------------ */
.faq-list { max-width: 780px; }
.faq-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 16px 20px;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--blue-bright);
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p {
  padding: 0 20px 18px;
  margin: 0;
  color: var(--muted);
}

/* Info / contact ------------------------------------------------------------ */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 { margin-bottom: .5em; }
.contact-card address { font-style: normal; color: var(--muted); margin-bottom: .8em; }
.contact-card p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }
.contact-card strong { color: var(--ink); }

/* CTA band ------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  padding-block: 46px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #cfe0f5; max-width: 560px; margin-inline: auto; margin-bottom: 1.4em; }
.cta-band .btn { background: #fff; color: var(--navy); }
.cta-band .btn:hover { background: var(--blue-soft); }
.cta-band .btn-ghost { background: transparent; border-color: #9db9de; color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* Tables ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.nice {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
table.nice th, table.nice td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table.nice th { color: var(--navy); background: var(--blue-soft); }
table.nice tr:last-child td { border-bottom: none; }

/* Footer ---------------------------------------------------------------------- */
.site-footer {
  margin-top: 70px;
  background: var(--navy);
  color: #b9cbe4;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-block: 52px 36px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h3 {
  color: #fff;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.site-footer a { color: #b9cbe4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand .brand-name {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  display: block;
  margin-bottom: .4em;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-block: 18px;
  font-size: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* Resource list --------------------------------------------------------------- */
.resource-list { max-width: 780px; }
.resource-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.resource-item:first-child { padding-top: 0; }
.resource-item:last-child { border-bottom: none; padding-bottom: 0; }
.resource-item h3 { margin-bottom: .25em; font-size: 1.08rem; }
.resource-item h3 a { color: var(--navy); text-decoration: none; }
.resource-item h3 a::after { content: " \2197"; font-size: .85em; color: var(--blue-bright); }
.resource-item h3 a:hover { color: var(--blue); text-decoration: underline; }
.resource-item p { color: var(--muted); font-size: .96rem; margin-bottom: 0; }

/* Small print ------------------------------------------------------------------ */
.small { font-size: .88rem; color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }