/* ============================================================
   Riverbend Family Dentistry — concept redesign
   Palette: deep teal / warm cream / ink  ·  Type: DM Serif Display + DM Sans
   ============================================================ */

:root {
  --teal-900: #073F3E;
  --teal-700: #0B5D5B;
  --teal-600: #0E7C7B;
  --teal-100: #DBEEED;
  --teal-050: #F2F9F8;
  --cream: #FAF7F2;
  --sand: #E8B84B;
  --ink: #172524;
  --ink-soft: #46605E;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(7, 63, 62, 0.10);
  --shadow-lg: 0 24px 60px rgba(7, 63, 62, 0.16);
  --font-head: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 0.55em; }
h3 { font-size: 1.35rem; margin-bottom: 0.35em; }
h2 small { font-size: 0.55em; color: var(--teal-600); letter-spacing: 0.04em; }

p { color: var(--ink-soft); }

a { color: var(--teal-600); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--teal-900); }

.ico {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700;
  font-size: 0.78rem; color: var(--teal-600); margin-bottom: 14px;
}
.eyebrow--light { color: var(--sand); }

.center { text-align: center; margin-top: 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--teal-600); color: var(--white);
  font-weight: 600; font-size: 1rem; letter-spacing: 0.01em;
  padding: 15px 30px; border-radius: 999px; border: 2px solid var(--teal-600);
  cursor: pointer; transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.btn:hover { background: var(--teal-900); border-color: var(--teal-900); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
.btn--sm { padding: 10px 22px; font-size: 0.92rem; }
.btn--lg { padding: 17px 36px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent; border-color: rgba(255, 255, 255, 0.65); color: var(--white);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--white); }
.btn--ghost-dark { background: transparent; border-color: var(--teal-600); color: var(--teal-600); }
.btn--ghost-dark:hover { background: var(--teal-600); color: var(--white); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--teal-900); }
.btn--light:hover { background: var(--cream); border-color: var(--cream); color: var(--teal-900); }

/* ---------- Top bar ---------- */
.topbar { background: var(--teal-900); color: rgba(255, 255, 255, 0.92); font-size: 0.88rem; }
.topbar .wrap { display: flex; gap: 28px; align-items: center; padding-top: 9px; padding-bottom: 9px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.topbar__item:hover { color: var(--sand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(7, 63, 62, 0.08);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(7, 63, 62, 0.10); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand__mark { width: 38px; height: 38px; fill: var(--teal-600); stroke: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-family: var(--font-head); font-weight: 400; font-size: 1.45rem; letter-spacing: 0.01em; }
.brand__text em { font-style: normal; text-transform: uppercase; letter-spacing: 0.34em; font-size: 0.6rem; color: var(--teal-600); font-weight: 700; margin-top: 2px; }
.brand--light { color: var(--white); }
.brand--light .brand__mark { fill: var(--sand); }
.brand--light .brand__text em { color: var(--sand); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { color: var(--ink); font-weight: 500; font-size: 0.98rem; position: relative; padding: 4px 0; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--teal-600); border-radius: 2px; transition: width 0.25s ease;
}
.nav a:not(.btn):hover::after, .nav a:not(.btn).active::after { width: 100%; }
.nav a:not(.btn):hover { color: var(--teal-600); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: clamp(580px, 92vh, 860px);
  display: flex; align-items: center;
  overflow: hidden; background: var(--teal-900);
}
.hero__media { position: absolute; inset: 0; pointer-events: none; }
.hero__media iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;           /* 16:9 */
  min-height: 100%; min-width: 177.78vh;   /* cover */
  transform: translate(-50%, -50%);
  border: 0;
}
.hero__overlay {
  position: absolute; inset: 0;
  background:
    /* keeps the headline column legible */
    linear-gradient(100deg, rgba(7, 63, 62, 0.92) 0%, rgba(7, 63, 62, 0.72) 42%, rgba(7, 63, 62, 0.30) 78%, rgba(7, 63, 62, 0.22) 100%),
    /* grounds the footage so it doesn't blow out at the edges */
    linear-gradient(180deg, rgba(7, 63, 62, 0.35) 0%, rgba(7, 63, 62, 0) 30%, rgba(7, 63, 62, 0) 62%, rgba(7, 63, 62, 0.45) 100%);
}
/* .hero__inner also carries .wrap. .hero is a flex container, so without
   width:100% the wrap shrinks to its content and stops lining up with the
   header's container column. Constrain the children, not the wrap. */
.hero__inner { position: relative; z-index: 2; width: 100%; padding-top: 96px; padding-bottom: 118px; }
.hero h1 { color: var(--white); margin-bottom: 22px; font-size: clamp(2.5rem, 5vw, 4rem); }
.hero h1 .h1-line { display: block; }
.hero h1 .h1-line--gold { color: var(--sand); font-style: italic; }
.hero .eyebrow { color: var(--sand); }
.hero__lead { color: rgba(255, 255, 255, 0.88); font-size: 1.16rem; max-width: 52ch; margin-bottom: 34px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: 38px; padding: 0; }
.hero__chips li {
  color: rgba(255, 255, 255, 0.92); font-size: 0.86rem; font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 999px;
  padding: 7px 16px; background: rgba(7, 63, 62, 0.35); backdrop-filter: blur(4px);
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 28px; height: 46px; border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  z-index: 2;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 9px; margin-left: -2px;
  background: var(--white); border-radius: 2px; animation: scrollhint 1.8s ease-in-out infinite;
}
@keyframes scrollhint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Trust strip ---------- */
.trust { background: var(--white); border-bottom: 1px solid rgba(7, 63, 62, 0.08); }
.trust__inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding-top: 26px; padding-bottom: 26px;
}
.trust__item { display: flex; align-items: center; gap: 13px; }
.trust__item .ico { width: 30px; height: 30px; color: var(--teal-600); }
.trust__item b { display: block; font-size: 0.98rem; }
.trust__item span { display: block; font-size: 0.83rem; color: var(--ink-soft); }

/* ---------- Sections / splits ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--teal-050); }

.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { position: relative; }
.split__media img {
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  aspect-ratio: 5 / 4; object-fit: cover; width: 100%;
}
.split__media--portrait img { aspect-ratio: 4 / 4.6; object-fit: cover; }
.split__badge {
  position: absolute; bottom: -20px; left: -20px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
}
.split__badge .ico { width: 26px; height: 26px; color: var(--teal-600); }
.split__badge b { display: block; font-size: 0.95rem; }
.split__badge span { display: block; font-size: 0.82rem; color: var(--ink-soft); }
.split__copy > p { margin-bottom: 16px; }

.checklist { list-style: none; margin: 22px 0 26px; display: grid; gap: 12px; padding: 0; }
.checklist li { position: relative; padding-left: 34px; font-weight: 500; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--teal-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B5D5B' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
.checklist--light li { color: rgba(255, 255, 255, 0.94); }
.checklist--light li::before { background-color: rgba(255, 255, 255, 0.18); }

.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.link-arrow .ico { transition: transform 0.22s ease; }
.link-arrow:hover .ico { transform: translateX(4px); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 34px 30px;
  box-shadow: 0 4px 16px rgba(7, 63, 62, 0.06);
  border: 1px solid rgba(7, 63, 62, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--teal-100);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card__icon svg {
  width: 28px; height: 28px; fill: none; stroke: var(--teal-700);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card p { font-size: 0.97rem; }

.service-chips { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: center; }
.service-chips > span { font-weight: 700; color: var(--teal-900); font-size: 0.9rem; }
.service-chips ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.service-chips li {
  background: var(--white); border: 1px solid rgba(7, 63, 62, 0.14);
  color: var(--ink-soft); border-radius: 999px; padding: 6px 15px; font-size: 0.85rem;
}

/* ---------- Dark band ---------- */
.band { background: linear-gradient(120deg, var(--teal-900), var(--teal-700)); padding: 96px 0; }
.band h2 { color: var(--white); }
.band p { color: rgba(255, 255, 255, 0.85); }
.band .split__media img { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.band .btn--light { margin-top: 10px; }

.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.cred {
  background: var(--teal-050); border: 1px solid rgba(7, 63, 62, 0.08);
  border-radius: 12px; padding: 14px 18px;
}
.cred b { display: block; font-size: 0.95rem; }
.cred span { font-size: 0.83rem; color: var(--ink-soft); }

/* ---------- Smile strip ---------- */
.smiles { overflow: hidden; background: var(--white); padding: 10px 0 0; }
.smiles__track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.smiles figure { margin: 0; overflow: hidden; }
.smiles img {
  width: 100%; aspect-ratio: 3 / 3.4; object-fit: cover;
  transition: transform 0.5s ease;
}
.smiles figure:hover img { transform: scale(1.05); }

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.quote {
  background: var(--white); border-radius: var(--radius); padding: 34px 34px 28px;
  box-shadow: 0 4px 16px rgba(7, 63, 62, 0.06); border: 1px solid rgba(7, 63, 62, 0.06);
  position: relative;
}
.quote__mark { width: 34px; height: 34px; fill: var(--teal-100); stroke: none; margin-bottom: 12px; }
.quote p { font-size: 1.02rem; color: var(--ink); }
.quote footer { margin-top: 16px; font-weight: 700; color: var(--teal-700); font-size: 0.92rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; padding: 0; }
.step {
  background: var(--white); border: 1px solid rgba(7, 63, 62, 0.10);
  border-radius: var(--radius); padding: 36px 30px; text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step__num {
  display: inline-grid; place-items: center; width: 52px; height: 52px;
  border-radius: 50%; background: var(--teal-600); color: var(--white);
  font-family: var(--font-head); font-size: 1.5rem; margin-bottom: 18px;
}
.step p { font-size: 0.97rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal-700), var(--teal-900)); padding: 84px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-bottom: 30px; }
.cta-band .hero__cta { justify-content: center; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 60px; align-items: start; }
.info-list { list-style: none; display: grid; gap: 20px; margin: 26px 0 30px; padding: 0; }
.info-list li { display: flex; gap: 15px; align-items: flex-start; }
.info-list .ico { width: 24px; height: 24px; color: var(--teal-600); margin-top: 3px; }
.info-list b { display: block; margin-bottom: 2px; }
.info-list span { color: var(--ink-soft); font-size: 0.97rem; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--white); border: 1px solid rgba(7, 63, 62, 0.08); }
.map iframe { width: 100%; height: 280px; border: 0; display: block; }
.map__link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; font-weight: 600; font-size: 0.92rem;
  border-top: 1px solid rgba(7, 63, 62, 0.08);
}

.contact-form {
  background: var(--white); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(7, 63, 62, 0.08);
}
.contact-form > p { margin: 6px 0 24px; font-size: 0.97rem; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }
.field label em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  border: 1.5px solid rgba(7, 63, 62, 0.18); border-radius: 10px;
  padding: 12px 15px; background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(14, 124, 123, 0.14);
}
.field input.is-invalid { border-color: #C0392B; }
.form-note { margin-top: 16px; font-size: 0.88rem; text-align: center; }
.form-success {
  margin-top: 20px; background: var(--teal-050); border: 1px solid rgba(14, 124, 123, 0.3);
  border-radius: 12px; padding: 18px 20px; display: grid; gap: 4px; justify-items: center; text-align: center;
}
.form-success .ico { width: 30px; height: 30px; color: var(--teal-600); }
.form-success span { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { background: var(--teal-900); color: rgba(255, 255, 255, 0.85); }
.footer__inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px;
  padding-top: 70px; padding-bottom: 54px;
}
.footer__brand p { color: rgba(255, 255, 255, 0.65); font-size: 0.95rem; margin-top: 18px; max-width: 34ch; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col b { color: var(--white); margin-bottom: 6px; font-size: 1rem; }
.footer__col a, .footer__col span { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }
.footer__col a:hover { color: var(--sand); }
.footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.84rem; }
.footer__legal .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.footer__legal span { color: rgba(255, 255, 255, 0.55); }
.footer__demo-note { font-style: italic; }

/* ---------- Reveal animation ----------
   Hidden state only applies once JS has tagged <html class="js"> —
   without JS (or if it fails) the page renders fully visible. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .split { gap: 44px; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .smiles__track { grid-template-columns: repeat(3, 1fr); }
  .smiles figure:nth-child(n+4) { display: none; }
  .trust__inner { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 0 0 auto 0; top: 0; z-index: 70;
    flex-direction: column; align-items: flex-start; gap: 8px;
    background: var(--white); padding: 92px 28px 30px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-110%); transition: transform 0.3s ease;
  }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { font-size: 1.15rem; padding: 8px 0; }
  .nav .btn { margin-top: 10px; }
  .nav-toggle { display: block; position: relative; z-index: 80; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .section { padding: 72px 0; }
  .hero__inner { padding-top: 70px; padding-bottom: 90px; }
  .field-row { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .contact-form { padding: 28px 22px; }
}

@media (max-width: 560px) {
  .hide-sm { display: none !important; }
  .topbar .wrap { justify-content: center; }
  .cards, .steps { grid-template-columns: 1fr; }
  .smiles__track { grid-template-columns: repeat(2, 1fr); }
  .smiles figure:nth-child(n+3) { display: none; }
  .trust__inner { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cred-grid { grid-template-columns: 1fr; }
  .split__badge { left: 12px; bottom: -16px; }
  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero__chips li { font-size: 0.8rem; }
}
