/* ==========================================================================
   Highridge Dental Care — design tokens, reset, base typography
   ========================================================================== */

:root {
  /* Brand palette (extracted from original design) */
  --navy-900: #0A1D2C;   /* darkest — top info bar, footer background */
  --navy-800: #0F2A3F;   /* primary dark — hero, dark section backgrounds, headings */
  --blue-accent: #12A6E5;
  --blue-accent-hover: #0E86BC;
  --blue-light: #8FD6F5;

  --cream: #F7F4EF;      /* light section background */
  --cream-border: #E4E0D8;
  --cream-border-2: #E0DCD3;
  --cream-border-3: #DDD8CE;

  --white: #FFFFFF;
  --border-light: #E2E8EB;
  --border-light-2: #C3CDD3;
  --border-light-3: #C9CFD3;
  --border-light-4: #9AA9B1;
  --border-light-5: #A6AFB5;

  --text-navy: #0F2A3F;
  --text-body: #4A5C67;
  --text-body-2: #5A6C77;
  --text-muted: #6B7B85;
  --text-muted-2: #7E8F99;
  --text-muted-3: #7B95A3;
  --text-muted-4: #718B99;
  --text-light-blue: #93AEBC;
  --text-light-blue-2: #A9C0CC;
  --text-light-blue-3: #C6D8E1;
  --text-navy-faint: #3C5A6C;

  --placeholder-bg: #E5E2DB;
  --placeholder-text: #6E7C85;

  --font-display: 'Manrope', Helvetica, Arial, sans-serif;  /* titles & headings */
  --font-sans: 'Inter', Helvetica, Arial, sans-serif;

  /* Layout */
  --gutter: 44px;
  --header-topbar-h: 40px;
  --header-nav-h: 92px;
  --header-h: 132px;
  --max-content: 1440px;

  /* Intrinsic ratio of the practice photo library (768 x 580). Photo slots are
     sized to this so images are never cropped — see .media-fill. */
  --photo-ratio: 768 / 580;
  --portrait-ratio: 600 / 770;
}

@media (max-width: 960px) {
  :root {
    --gutter: 24px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 18px;
  }
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  /* .reveal--right starts translated 22px past its own box on purpose (the
     slide-in offset); clip only the X axis so that pre-reveal state can't
     open a horizontal scrollbar before the element settles into view. */
  overflow-x: hidden;
}

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

a {
  color: var(--blue-accent);
}

a:hover {
  color: var(--navy-800);
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Photos fill their slot without distorting. Slots are given the photo's own
   aspect ratio (--photo-ratio), so `cover` has nothing to crop and the full
   image is visible; `contain` is the fallback if a slot's ratio ever differs,
   letterboxing rather than cutting the subject off. */
.media-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Standard photo slot: sized by the image's own proportions. */
.photo-slot {
  aspect-ratio: var(--photo-ratio);
  overflow: hidden;
  background: var(--placeholder-bg);
}

/* Generic image placeholder — matches the original design's photo-not-yet-supplied blocks */
.placeholder-box {
  width: 100%;
  height: 100%;
  min-height: 60px;
  background: var(--placeholder-bg);
  background-image: repeating-linear-gradient(135deg, rgba(15, 42, 63, 0.055) 0px, rgba(15, 42, 63, 0.055) 7px, rgba(0, 0, 0, 0) 7px, rgba(0, 0, 0, 0) 15px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.placeholder-box span {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--placeholder-text);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
}

/* Buttons — shared across header, footer, and page content */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  padding: 17px 28px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--outline-navy {
  color: var(--text-navy);
  border-color: var(--border-light-2);
  background: transparent;
}
.btn--outline-navy:hover {
  border-color: var(--navy-800);
  color: var(--text-navy);
}

.btn--fill-accent {
  color: var(--white);
  background: var(--blue-accent);
}
.btn--fill-accent:hover {
  background: var(--blue-accent-hover);
  color: var(--white);
}

.btn--fill-navy {
  color: var(--white);
  background: var(--navy-800);
}
.btn--fill-navy:hover {
  background: var(--blue-accent);
  color: var(--white);
}

.btn--outline-white {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
}
.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--fill-white {
  color: var(--text-navy);
  background: var(--white);
}
.btn--fill-white:hover {
  background: var(--cream);
}

.btn--text {
  border: 0;
  padding: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--blue-accent);
  color: var(--text-navy);
  font-size: 11.5px;
}
.btn--text:hover {
  color: var(--blue-accent);
}

/* Small uppercase section label, used above headings across every page */
.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue-accent);
}
.eyebrow--dark {
  color: #08334A;
}
.eyebrow--light {
  color: var(--blue-light);
}

/* Visually-hidden but accessible (skip link target labels, sr-only text) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--navy-800);
  color: var(--white);
  padding: 12px 18px;
  font-size: 13px;
  text-decoration: none;
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

/* ==========================================================================
   Scroll reveal + count-up
   Progressive enhancement: the hidden state is scoped to html.js, which the
   inline boot script in <head> sets before first paint. With JS off (or if
   animations.js fails to load) nothing is ever hidden, so the page reads
   exactly as it did before.
   ========================================================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  /* Transitioning only opacity/transform keeps this on the compositor —
     no layout or paint work per frame. */
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Once settled, drop the transition so a later class or style change on the
   element can't accidentally re-animate it. */
.js .reveal.is-done {
  transition: none;
}

/* Directional variants for side-by-side layouts */
.js .reveal--left  { transform: translateX(-22px); }
.js .reveal--right { transform: translateX(22px); }
/* A transform makes an element a containing block, which breaks
   position: sticky — so the sidebar's variant fades without moving. */
.js .reveal--fade  { transform: none; }

/* Count-up digits jitter as the value changes because glyph widths differ;
   tabular figures keep the number from shuffling its neighbours around. */
.count-up {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Smaller screens get a shorter travel and a quicker settle — the same 18px
   lift reads as sluggish when the viewport is only a few hundred px tall. */
@media (max-width: 700px) {
  .js .reveal {
    transform: translateY(12px);
    transition-duration: 0.45s;
  }
  .js .reveal--left  { transform: translateX(-14px); }
  .js .reveal--right { transform: translateX(14px); }
}

/* Anyone who has asked their OS for less motion gets the finished state
   immediately — no fade, no transform, no counting. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal--left,
  .js .reveal--right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Review quote "Read More" toggle — injected by main.js only for quotes
   that actually overflow their clamp, so short reviews never show one.
   ========================================================================== */
.quote-toggle {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0;
  margin-top: -4px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-accent);
  cursor: pointer;
}
.quote-toggle:hover,
.quote-toggle:focus-visible {
  color: var(--navy-800);
}
