/* =========================================================
   Claremont Orthodontics — editorial design system
   Adapted from Sunny Dental Buderim
   ========================================================= */

:root {
  --cream: #F4ECDE;
  --cream-deep: #EBE2D1;
  --cream-light: #FBF7EE;
  --ink: #2A2520;
  --ink-soft: #57504A;
  --ink-mute: #8A8278;
  --rule: #D9CFBC;
  --navy: #1B3A5C;
  --navy-soft: #2A5080;
  --gold: #C9A84C;
  --gold-deep: #A88830;
  --grey-photo: #C9C1B3;
  --grey-photo-dk: #B8AF9E;
  --shadow-sm: 0 1px 2px rgba(42, 37, 32, 0.04);
  --shadow-md: 0 8px 32px -12px rgba(42, 37, 32, 0.12);

  --serif: 'Playfair Display', 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain — applied to body once */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0 0.12 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img { display: block; max-width: 100%; }

/* ------------------------------------------------------------------
   Typography
   ------------------------------------------------------------------ */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.eyebrow--navy { color: var(--navy); }
.eyebrow--gold { color: var(--gold-deep); }

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.display em { font-style: italic; color: var(--navy); font-weight: 500; }

.h1 { font-size: clamp(48px, 7.6vw, 112px); }
.h2 { font-size: clamp(38px, 4.8vw, 72px); }
.h3 { font-size: clamp(28px, 3vw, 44px); }
.h4 { font-size: clamp(22px, 2vw, 30px); }

.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.45;
  color: var(--ink-soft);
}

.body-lg { font-size: 19px; line-height: 1.7; color: var(--ink-soft); }
.body-md { font-size: 17px; line-height: 1.7; color: var(--ink-soft); }
.body-sm { font-size: 14px; line-height: 1.65; color: var(--ink-soft); }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

/* Drop cap utility */
.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  float: left;
  font-size: 5.2em;
  line-height: 0.88;
  margin: 0.06em 0.12em 0 -0.04em;
  color: var(--navy);
}

/* ------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------ */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.shell--wide { max-width: 1440px; }
.shell--narrow { max-width: 980px; }
.shell--read { max-width: 720px; }

@media (max-width: 720px) {
  .shell { padding: 0 24px; }
}

.section { padding: 120px 0; }
.section--sm { padding: 72px 0; }
.section--lg { padding: 160px 0; }

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .section--lg { padding: 96px 0; }
}

.divider-rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* Hand-drawn-feel SVG divider, used inline */
.hand-divider {
  display: block;
  width: 120px;
  height: 18px;
  color: var(--navy);
  opacity: 0.55;
}

/* ------------------------------------------------------------------
   Photo placeholder
   ------------------------------------------------------------------ */

.photo {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--grey-photo) 0 12px,
      var(--grey-photo-dk) 12px 13px
    );
  color: rgba(42, 37, 32, 0.55);
  overflow: hidden;
  border-radius: 2px;
}
.photo__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
  color: rgba(42, 37, 32, 0.65);
}
.photo__label small { color: rgba(42, 37, 32, 0.45); font-size: 10px; letter-spacing: 0.14em; }

.photo--4x5 { aspect-ratio: 4 / 5; }
.photo--3x4 { aspect-ratio: 3 / 4; }
.photo--1x1 { aspect-ratio: 1 / 1; }
.photo--3x2 { aspect-ratio: 3 / 2; }
.photo--16x9 { aspect-ratio: 16 / 9; }
.photo--21x9 { aspect-ratio: 21 / 9; }
.photo--5x4 { aspect-ratio: 5 / 4; }

/* ------------------------------------------------------------------
   Buttons / CTAs
   ------------------------------------------------------------------ */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px;
  background: var(--gold);
  color: #1F1B14;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 2px;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.cta:hover { background: var(--gold-deep); color: #fff; transform: translateY(-1px); }
.cta__arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.cta:hover .cta__arrow { transform: translateX(4px); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 17px 29px;
}
.cta--ghost:hover { background: var(--ink); color: var(--cream); transform: translateY(-1px); }

.cta--navy {
  background: var(--navy);
  color: var(--cream);
}
.cta--navy:hover { background: var(--navy-soft); color: #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--navy);
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  transition: gap 0.2s ease;
}
.link-arrow:hover { gap: 16px; }

.phone-inline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  white-space: nowrap;
}
.phone-inline a { border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.phone-inline a:hover { color: var(--navy); border-color: var(--navy); }

/* ------------------------------------------------------------------
   Nav
   ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 236, 222, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 48px;
  max-width: 1440px;
  margin: 0 auto;
  gap: 32px;
}
@media (max-width: 720px) {
  .nav__inner { padding: 18px 24px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.brand__mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  font-style: italic;
  border-radius: 50%;
}
.brand__sub {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2px;
  font-weight: 400;
}
.brand__name { line-height: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 38px;
}
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 8px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav__link[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--navy);
}
.nav__link:hover { color: var(--navy); }
.nav__chev { font-size: 10px; opacity: 0.6; transition: transform 0.2s ease; }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
}
.nav__cta:hover { background: var(--navy-soft); }

.nav__phone {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}

/* Services dropdown */
.dropdown {
  position: relative;
}
.dropdown__panel {
  position: absolute;
  top: calc(100% + 18px);
  left: -32px;
  width: 560px;
  background: var(--cream-light);
  border: 1px solid var(--rule);
  padding: 36px 40px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.dropdown__panel[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown__col-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.dropdown__item {
  display: block;
  padding: 9px 0;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}
.dropdown__item:hover { color: var(--navy); transform: translateX(4px); }
.dropdown__all {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 4px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
}
.dropdown__all:hover { color: var(--gold-deep); }

/* Mobile nav */
.nav__toggle { display: none; }
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__phone { display: none; }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }
  .nav__cta { padding: 10px 18px; font-size: 12px; }
}

.mobile-sheet {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 200;
  padding: 32px 28px;
  overflow-y: auto;
}
.mobile-sheet__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.mobile-sheet__link {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 96px 0 36px;
}
.footer .eyebrow { color: var(--gold); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(244, 236, 222, 0.14);
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.3;
  color: var(--cream);
  margin: 20px 0 28px;
  max-width: 320px;
}
.footer__col h5 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}
.footer__col a, .footer__col p {
  display: block;
  color: rgba(244, 236, 222, 0.72);
  font-size: 15px;
  line-height: 1.85;
  margin: 0;
}
.footer__col a:hover { color: var(--gold); }
.footer__bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(244, 236, 222, 0.5);
}

/* ------------------------------------------------------------------
   Pull quotes
   ------------------------------------------------------------------ */

.pullquote {
  position: relative;
  padding: 24px 0 24px 56px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.pullquote::before {
  content: "\201C";
  position: absolute;
  left: -6px;
  top: -32px;
  font-family: var(--serif);
  font-size: 160px;
  line-height: 1;
  color: var(--gold);
  font-style: normal;
}
.pullquote__attr {
  display: block;
  margin-top: 24px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.pullquote--lg { font-size: clamp(28px, 3.6vw, 52px); }
.pullquote--md { font-size: clamp(22px, 2.4vw, 32px); }

/* ------------------------------------------------------------------
   Numbered editorial section markers
   ------------------------------------------------------------------ */

.numbered {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 32px;
}
.numbered__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--gold-deep);
  font-weight: 400;
  min-width: 48px;
}
.numbered__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ------------------------------------------------------------------
   Service intro tag
   ------------------------------------------------------------------ */

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.page-eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--gold-deep);
}

/* ------------------------------------------------------------------
   Credentials bar
   ------------------------------------------------------------------ */

.cred-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--cream-light);
}
.cred-badge__icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  border-radius: 50%;
}

/* ------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input, .field textarea {
  font-family: var(--sans);
  font-size: 17px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 12px 0;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--navy);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------ */

.stack > * + * { margin-top: var(--gap, 24px); }
.row { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: 1fr; gap: 32px; }
}

.tone-navy { color: var(--navy); }
.tone-gold { color: var(--gold-deep); }
.tone-mute { color: var(--ink-mute); }

/* Anchor underline link */
.aul {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.aul:hover { border-color: var(--navy); color: var(--navy); }

/* Star row */
.stars {
  display: inline-flex;
  gap: 4px;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 2px;
}

/* Scroll fade in */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
main { animation: pageIn 0.35s ease both; }
