/* ==========================================================================
   Newtown Dental — homepage
   Implementation of "Newtown Dental Homepage - Final.dc.html" (Claude Design)
   ========================================================================== */

/* --- tokens ------------------------------------------------------------- */
:root {
  --navy:        #002766;
  --cyan:        #1DCDFE;
  --mint:        #3AEFBB;
  --red:         #FE4641;
  --green:       #10B981;
  --star:        #F5A623;

  --ink:         #313131;
  --ink-muted:   #4B5563;
  --white:       #ffffff;

  --tint-blue:   #F5FDFF;
  --tint-red:    #FFF7F7;
  --tint-green:  #F0FEF8;

  --line-blue:   #D8F2FB;
  --line-red:    #FBD9D8;
  --line-green:  #C8F7E4;
  --line-header: #E3EDF4;

  --font-head:   'Poppins', system-ui, sans-serif;
  --font-ui:     'Mulish', system-ui, sans-serif;
  --font-body:   'Open Sans', system-ui, sans-serif;

  --radius:      12px;
  --radius-sm:   8px;
  --gutter:      64px;
  --maxw:        1440px;

  --shadow-menu: 0 24px 48px rgba(0, 39, 102, 0.14);
  --shadow-img:  0 20px 50px rgba(0, 39, 102, 0.25);

  /* Hero background. Swap --hero-image for the final clinic photograph and
     dial --hero-veil back toward the design values (.72 / .6 / .15) —
     the current image is dark, so it needs a heavier white veil. */
  --hero-image:  url('../hero-images/headerv6.jpg');
  /* Lower these to bring the hero photo forward; raise them toward 1 to fade
     it back. Keep the left stop high enough that the headline stays legible. */
  --hero-veil:   linear-gradient(90deg,
                   rgba(255,255,255,0.72) 0%,
                   rgba(255,255,255,0.52) 46%,
                   rgba(255,255,255,0.10) 100%);
}

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

/* Several components below set `display`, which would otherwise beat the UA
   rule for [hidden] and leave collapsed menus visible. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  overflow-wrap: break-word;
}

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

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

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; color: var(--navy); margin: 0; }

p, ul, ol, dl, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 12px 20px; font: 700 14px var(--font-ui);
}
.skip-link:focus { left: 0; }

/* --- shared layout ------------------------------------------------------ */
.section { padding: 80px var(--gutter); }

.section__head {
  display: flex; flex-direction: column; gap: 14px;
  margin: 0 auto 40px; max-width: var(--maxw);
}
.section__head--center { text-align: center; align-items: center; }
.section__head h2 { font-size: 34px; line-height: 1.2; }

.eyebrow {
  font: 700 12px var(--font-ui);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow--mint { color: var(--mint); }

.link-arrow { font: 700 14px var(--font-ui); color: var(--cyan); }
.link-arrow:hover, .link-arrow:focus-visible { text-decoration: underline; }
.link-arrow--green { color: var(--green); }

.rule-gradient { height: 6px; background: linear-gradient(90deg, var(--cyan), var(--mint)); }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font: 700 15px var(--font-ui);
  text-align: center;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--cyan); color: var(--navy); }
.btn--primary:hover { background: #0FBCEC; box-shadow: 0 8px 20px rgba(29, 205, 254, 0.35); }

.btn--outline {
  color: var(--navy);
  border: 1.5px solid var(--navy);
  background: rgba(255, 255, 255, 0.6);
  padding: 14.5px 28px;
}
.btn--outline:hover { background: var(--white); }

.btn--ghost {
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  padding: 13.5px 28px;
}
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }

.btn--sm { padding: 13px 24px; font-size: 14px; }

/* --- emergency bar ------------------------------------------------------ */
.emergency-bar { background: var(--red); color: var(--white); font-size: 14px; }
.emergency-bar__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap; text-align: center;
}
.emergency-bar strong { font: 700 14px var(--font-ui); }
.emergency-bar__link {
  font: 700 14px var(--font-ui);
  border-bottom: 1.5px solid currentColor;
}

/* --- header ------------------------------------------------------------- */
.site-header { position: relative; z-index: 30; background: var(--white); }

.site-header__bar {
  max-width: var(--maxw); margin: 0 auto;
  min-height: 76px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--line-header);
}

.site-header__logo img { height: 38px; width: auto; }

.site-header__actions { display: flex; align-items: center; gap: 20px; }
.site-header__phone { font: 700 15px var(--font-ui); color: var(--navy); white-space: nowrap; }

/* primary nav */
.primary-nav { align-self: stretch; }
.primary-nav__list {
  display: flex; align-items: center; gap: 30px;
  height: 100%;
  font: 600 14px var(--font-ui); color: var(--navy);
}
.primary-nav__list > li { display: flex; align-items: center; height: 100%; }

.primary-nav__list > li > a,
.primary-nav__trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0;
  color: var(--navy);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.primary-nav__list > li > a:hover,
.primary-nav__trigger:hover,
.has-menu.is-open .primary-nav__trigger { border-bottom-color: var(--cyan); }

.chevron { font-size: 10px; color: var(--cyan); transition: transform .2s ease; }
.has-menu.is-open .chevron { transform: rotate(180deg); }

.has-menu { position: static; }

/* mega menu (Services) */
.mega-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--line-header);
  box-shadow: var(--shadow-menu);
}
.mega-menu__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 36px var(--gutter) 40px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px;
}
.mega-menu__col { display: flex; flex-direction: column; gap: 12px; }
.mega-menu__col > a { font-size: 13.5px; color: var(--ink); font-family: var(--font-body); font-weight: 400; }
.mega-menu__col > a:hover { color: var(--navy); text-decoration: underline; }

.mega-menu__heading {
  font: 700 14px var(--font-ui) !important;
  color: var(--navy) !important;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cyan);
}
.mega-menu__heading--mint { border-bottom-color: var(--mint); }

.mega-menu__callout {
  margin-top: 14px;
  background: var(--tint-red);
  border: 1px solid var(--line-red);
  border-radius: 10px;
  padding: 14px 16px;
  display: block;
}
.mega-menu__callout:hover { background: #FFEDED; }
.mega-menu__callout-title { display: block; font: 700 13px var(--font-ui); color: var(--red); }
.mega-menu__callout-text { display: block; font-size: 12.5px; margin-top: 4px; color: var(--ink); }

/* small dropdown (Patient Info) */
.drop-menu { position: absolute; left: 0; right: 0; top: 100%; pointer-events: none; }
.drop-menu__inner {
  pointer-events: auto;
  width: max-content; min-width: 240px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line-header);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-menu);
  padding: 22px 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.drop-menu__inner a { font-size: 13.5px; color: var(--ink); font-family: var(--font-body); }
.drop-menu__inner a:hover { color: var(--navy); text-decoration: underline; }

/* mobile toggle + drawer */
.nav-toggle { display: none; padding: 8px; }
.nav-toggle__bars { display: flex; flex-direction: column; gap: 4px; }
.nav-toggle__bars span { display: block; width: 20px; height: 2px; background: var(--navy); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  border-bottom: 1px solid var(--line-header);
  background: var(--white);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 8px var(--gutter) 24px;
}
.mobile-nav__list > li { border-bottom: 1px solid var(--line-header); }
.mobile-nav__list > li > a,
.mobile-nav__trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  padding: 15px 0;
  font: 700 15px var(--font-ui); color: var(--navy);
  text-align: left;
}
.mobile-nav__trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.mobile-nav__panel { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 18px 12px; }
.mobile-nav__panel a { font-size: 14px; color: var(--ink); }
.mobile-nav__group {
  font: 700 12px var(--font-ui); color: var(--cyan);
  letter-spacing: .1em; text-transform: uppercase;
  margin-top: 12px;
}
.mobile-nav__group:first-child { margin-top: 0; }
.mobile-nav__phone { display: inline-block; margin-top: 20px; font: 700 15px var(--font-ui); color: var(--navy); }

/* --- hero --------------------------------------------------------------- */
.hero { position: relative; background: var(--hero-image) center 65% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-veil); }

.hero__inner {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: 80px var(--gutter) 88px;
  display: grid; grid-template-columns: 1fr 560px; gap: 72px; align-items: center;
}

.hero__copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badges li {
  background: var(--white);
  border: 1px solid var(--line-blue);
  color: var(--navy);
  font: 700 12px var(--font-ui);
  padding: 7px 14px;
  border-radius: 999px;
}

.hero h1 { font-size: 52px; line-height: 1.14; text-wrap: pretty; }
.hero__lede { font-size: 18px; line-height: 1.65; max-width: 50ch; }
.hero__actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.hero__media { height: 440px; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-img);
}

/* --- value bar ---------------------------------------------------------- */
.value-bar { background: var(--navy); }
.value-bar__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 44px var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.value-prop { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.value-prop img { width: 64px; height: 64px; }
.value-prop__title { font: 600 22px var(--font-head); color: var(--cyan); }
.value-prop__title--mint { color: var(--mint); }
.value-prop__text { font-size: 13.5px; color: rgba(255, 255, 255, 0.8); }

/* --- welcome ------------------------------------------------------------ */
.welcome { padding-bottom: 0; padding-top: 88px; }
.welcome__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.welcome__intro { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.welcome__intro h2 { font-size: 34px; line-height: 1.2; }
.welcome__intro .link-arrow { margin-top: 6px; }
.welcome__body { display: flex; flex-direction: column; gap: 16px; font-size: 15.5px; line-height: 1.75; }

/* --- services ----------------------------------------------------------- */
.service-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.service-card {
  background: var(--tint-blue);
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 39, 102, 0.12); }
.service-card > img { width: 100%; height: 170px; object-fit: cover; }
.service-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.service-card__title { font: 700 17px var(--font-ui); color: var(--navy); }
.service-card p { font-size: 14px; line-height: 1.65; }
.service-card .link-arrow { margin-top: auto; }

.service-card--emergency { background: var(--tint-red); border-color: var(--line-red); }
.service-card--emergency .service-card__title { color: var(--red); }
.service-card--emergency .link-arrow { color: var(--red); }

.service-card--kids { background: var(--tint-green); border-color: var(--line-green); }
.tag-free { color: var(--green); }

/* --- why choose us ------------------------------------------------------ */
.why {
  background: var(--tint-blue);
  border-top: 1px solid var(--line-blue);
  border-bottom: 1px solid var(--line-blue);
}
.why__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.why__media { height: 460px; }
.why__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.why__body { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.why__body h2 { font-size: 34px; line-height: 1.2; }

.check-list { display: flex; flex-direction: column; gap: 16px; }
.check-list li { display: flex; gap: 14px; font-size: 14.5px; line-height: 1.65; }
.check-list strong { font: 700 15px var(--font-ui); color: var(--navy); }
.check {
  flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--cyan); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font: 700 13px var(--font-ui);
}

/* --- pricing & offers --------------------------------------------------- */
.pricing__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 560px 1fr; gap: 64px; align-items: center;
}
.offer-card {
  background: var(--navy);
  border-radius: 16px;
  padding: 40px;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
}
.offer-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
}
.offer-card__price { font: 600 44px var(--font-head); color: var(--white); margin-top: 10px; }
.offer-card__text { font-size: 14.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.85); margin: 14px 0 24px; }

.pricing__body { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.pricing__body h2 { font-size: 34px; line-height: 1.2; }
.pricing__body p { font-size: 15.5px; line-height: 1.75; }

/* --- reviews ------------------------------------------------------------ */
.reviews { background: var(--tint-blue); border-top: 1px solid var(--line-blue); }
.review-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 1100px; margin: 0 auto;
}
.review {
  background: var(--white);
  border: 1px solid var(--line-blue);
  border-radius: var(--radius);
  padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
}
.stars { color: var(--star); font-size: 16px; letter-spacing: 2px; }
.review blockquote { font-size: 15px; line-height: 1.7; font-style: italic; }
.review figcaption { font: 700 13px var(--font-ui); color: var(--navy); }
.reviews__more { text-align: center; margin-top: 32px; }

/* --- FAQ ---------------------------------------------------------------- */
.faq__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: start;
}
.faq__head { display: flex; flex-direction: column; gap: 14px; }
.faq__head h2 { font-size: 34px; line-height: 1.2; }
.faq__list { display: flex; flex-direction: column; gap: 14px; }
.faq__item { border: 1px solid var(--line-blue); border-radius: var(--radius); padding: 22px 26px; }
.faq__item h3 { font: 700 15px var(--font-ui); color: var(--navy); }
.faq__item p { font-size: 14px; line-height: 1.7; margin-top: 8px; }

/* --- final CTA ---------------------------------------------------------- */
.final-cta {
  background: var(--navy);
  border-top: 6px solid;
  border-image: linear-gradient(90deg, var(--cyan), var(--mint)) 1;
}
.final-cta__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 72px var(--gutter);
  display: grid; grid-template-columns: 1fr 480px; gap: 64px; align-items: center;
}
.final-cta__body { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.final-cta h2 { font-size: 36px; line-height: 1.2; color: var(--white); }
.final-cta__body > p { font-size: 15.5px; line-height: 1.7; color: rgba(255, 255, 255, 0.8); max-width: 48ch; }
.final-cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.final-cta__details {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px;
  font-size: 14px; color: rgba(255, 255, 255, 0.8);
}
.final-cta__details > div { display: flex; gap: 12px; flex-wrap: wrap; }
.final-cta__details dt { font: 700 13px var(--font-ui); color: var(--cyan); min-width: 66px; }
.final-cta__details dd { margin: 0; }
.final-cta__details a:hover { text-decoration: underline; }

.final-cta__map {
  height: 380px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; justify-content: center;
}
.final-cta__map img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 1320px) {
  :root { --gutter: 40px; }
  .primary-nav__list { gap: 22px; }
  .hero__inner { grid-template-columns: 1fr 440px; gap: 48px; }
  .pricing__inner { grid-template-columns: 460px 1fr; gap: 48px; }
  .final-cta__inner { grid-template-columns: 1fr 400px; gap: 48px; }
}

/* below this the desktop nav is replaced by the drawer */
@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .site-header__phone { display: none; }
  .nav-toggle { display: block; }

  .hero__inner,
  .welcome__inner,
  .why__inner,
  .pricing__inner,
  .faq__inner,
  .final-cta__inner { grid-template-columns: 1fr; gap: 40px; }

  .why__media { order: 2; height: 320px; }
  .why__body { order: 1; }

  .hero__media { height: 320px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .final-cta__map { height: 320px; }
  .hero { background-position: center 55%; }
}

@media (max-width: 860px) {
  :root { --gutter: 24px; }
  .section { padding: 56px var(--gutter); }
  .welcome { padding-top: 56px; }

  .emergency-bar__detail { display: none; }
  .value-bar__inner { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .value-prop img { width: 48px; height: 48px; }
  .value-prop__title { font-size: 18px; }

  .hero h1 { font-size: 34px; }
  .hero__lede { font-size: 16px; }
  .section__head h2,
  .welcome__intro h2,
  .why__body h2,
  .pricing__body h2,
  .faq__head h2 { font-size: 26px; }
  .final-cta h2 { font-size: 28px; }
  .offer-card { padding: 30px 26px; }
  .offer-card__price { font-size: 32px; }

  .review-grid { grid-template-columns: 1fr; }
  .final-cta__inner { padding: 56px var(--gutter); }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }
  .site-header__bar { min-height: 66px; padding-block: 12px; }
  .site-header__logo img { height: 26px; }
  .site-header__actions { gap: 8px; }
  .site-header__actions .btn--sm { padding: 10px 14px; font-size: 13px; white-space: nowrap; }

  .service-grid { grid-template-columns: 1fr; }
  .service-card > img { height: 150px; }

  .hero__inner { padding: 36px var(--gutter) 44px; }
  .hero h1 { font-size: 30px; }
  .hero__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__media { height: 220px; }
  .badges li { font-size: 11px; padding: 5px 10px; }

  .final-cta__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .final-cta__details > div { flex-direction: column; gap: 2px; }
  .final-cta__map { height: 260px; padding: 14px; }
  .review { padding: 24px; }
}

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