/* ==========================================================================
   The Integra Clinic — stylesheet
   Palette:  ivory #F7F2E9 · teal #1E3934 · sage #6F8C7C · sage-light #C7D6C8
             taupe #E1D3BA · gold #A9782E · ink #2B2A26
   Type:     Display  — "Fraunces"   (editorial serif, headlines)
             Eyebrow  — "Jost"       (geometric sans, tracked caps)
             Body     — "Work Sans"  (clean sans, paragraphs & UI)
   ========================================================================== */

:root {
  --ivory: #F7F2E9;
  --ivory-deep: #F0E9DA;
  --teal: #1E3934;
  --teal-soft: #294842;
  --sage: #6F8C7C;
  --sage-light: #C7D6C8;
  --taupe: #E1D3BA;
  --taupe-deep: #D2BE9C;
  --gold: #A9782E;
  --gold-light: #C69A4F;
  --ink: #2B2A26;
  --ink-soft: #55524A;
  --white: #FFFDF9;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-eyebrow: "Jost", "Century Gothic", sans-serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --max: 1180px;
  --radius: 6px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--teal);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 400; }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
a { color: inherit; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1.1em;
}

.eyebrow.on-dark { color: var(--gold-light); }

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46em;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s ease, background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.btn-primary { background: var(--teal); color: var(--ivory); }
.btn-primary:hover { background: var(--gold); }
.btn-ghost { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: var(--ivory); }
.btn-ghost.on-dark { color: var(--ivory); border-color: rgba(247,242,233,0.5); }
.btn-ghost.on-dark:hover { background: var(--ivory); color: var(--teal); }
.btn-light { background: var(--ivory); color: var(--teal); }
.btn-light:hover { background: var(--gold-light); color: var(--teal); }
.btn[disabled], .btn.is-disabled {
  opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 233, 0.98);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
  border-color: rgba(30,57,52,0.12);
  box-shadow: 0 6px 24px rgba(30,57,52,0.05);
}

/* Homepage-only variant: transparent, floats over the full-bleed hero photo,
   then turns solid once the page is scrolled past it. */
.site-header--overlay {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--teal);
  border-bottom-color: transparent;
}
.site-header--overlay .nav-links a { color: var(--ivory); }
.site-header--overlay .nav-links a::after { background: var(--gold-light); }
.site-header--overlay .nav-toggle span { background: var(--ivory); }
.site-header--overlay.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.18); }
.site-header--overlay .nav-row { justify-content: flex-end; }
@media (max-width: 900px) {
  .site-header--overlay .nav-links { background: var(--teal); }
}

/* Full-bleed hero photo, edge to edge, with the header floating on top of it */
.full-bleed-hero {
  position: relative;
  width: 100%;
  height: 86vh;
  min-height: 520px;
  max-height: 800px;
  overflow: hidden;
}
.full-bleed-hero img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 60%;
  display: block;
}
.full-bleed-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,30,28,0.45) 0%, rgba(20,30,28,0.05) 22%, rgba(20,30,28,0) 45%);
  pointer-events: none;
}

/* Full logo lockup, layered on the header photo, full height on the left */
.hero-logo-overlay {
  position: absolute; top: 104px; bottom: 40px; left: 40px; z-index: 6; display: block;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.4));
}
.hero-logo-overlay img { height: 100%; width: auto; display: block; }
@media (max-width: 620px) {
  .hero-logo-overlay { top: 90px; bottom: auto; left: 18px; }
  .hero-logo-overlay img { height: 92px; }
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  max-width: var(--max); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand-word { font-family: var(--font-display); color: var(--teal); font-size: 1.15rem; letter-spacing: 0.02em; }
.brand-word b { font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--font-eyebrow); font-size: 0.82rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 22px; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--teal); display: block; }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 72px 0 0 0; background: var(--ivory); flex-direction: column;
    padding: 40px 32px; gap: 26px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease; align-items: flex-start; }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { font-size: 1rem; }
  .nav-actions .btn-primary { display: none; }
  .nav-links .nav-cta { display: inline-flex; margin-top: 10px; }
  .nav-toggle { display: flex; }
}
.nav-cta { display: none; }
@media (max-width: 900px) { .nav-cta.btn { display: inline-flex; } }

/* ---------- Sections & layout helpers ---------- */
.section { padding: 108px 0; }
.section-sm { padding: 72px 0; }
.section-dark { background: var(--teal); color: var(--ivory); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-dark p { color: rgba(247,242,233,0.78); }
.section-taupe { background: var(--taupe); }

.grid { display: grid; gap: 40px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Signature path divider ---------- */
.path-divider { width: 100%; display: block; margin: 0 auto; }
.path-divider path {
  fill: none; stroke: var(--gold); stroke-width: 1.5;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.8s cubic-bezier(.2,.7,.2,1);
}
.path-divider.in-view path { stroke-dashoffset: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid rgba(30,57,52,0.09);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
}
.card .icon { width: 40px; height: 40px; margin-bottom: 20px; color: var(--gold); }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }

.pillar { text-align: center; padding: 10px; }
.pillar .icon { width: 46px; height: 46px; margin: 0 auto 18px; color: var(--gold); }
.pillar h4 { font-family: var(--font-eyebrow); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: var(--teal); margin: 0; }

/* ---------- Photo frame ---------- */
.photo-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.photo-frame::after {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(247,242,233,0.55);
  border-radius: calc(var(--radius-lg) - 4px); pointer-events: none;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 110px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-actions { display: flex; gap: 18px; margin-top: 34px; flex-wrap: wrap; }
.hero-photo { width: 100%; max-width: 460px; aspect-ratio: 4/5; margin: 0 auto; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: left; }
  .hero-photo { max-width: 340px; }
}

/* Homepage hero: centered text layout (no side image; header carries the photo watermark) */
.hero-banner-layout .container { display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal); color: rgba(247,242,233,0.85); padding: 84px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 50px; padding-bottom: 60px; border-bottom: 1px solid rgba(247,242,233,0.14); }
.footer-brand img { height: 50px; margin-bottom: 18px; }
.footer-brand p { color: rgba(247,242,233,0.65); max-width: 30em; }
.footer h5 { font-family: var(--font-eyebrow); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; color: var(--gold-light); margin: 0 0 20px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer a { text-decoration: none; color: rgba(247,242,233,0.82); font-size: 0.95rem; }
.footer a:hover { color: var(--gold-light); }
.tool-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(247,242,233,0.22); border-radius: 999px; padding: 10px 16px;
  font-size: 0.82rem;
}
.tool-pill .tag { font-family: var(--font-eyebrow); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(247,242,233,0.55); border: 1px solid rgba(247,242,233,0.3); border-radius: 999px; padding: 3px 8px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 26px 0; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; color: rgba(247,242,233,0.55); font-size: 0.85rem; }
.footer-tagline { font-family: var(--font-eyebrow); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; color: rgba(247,242,233,0.6); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-family: var(--font-eyebrow); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--teal); margin-bottom: 8px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 14px 16px; border-radius: var(--radius); border: 1px solid rgba(30,57,52,0.2);
  background: var(--white); font-family: var(--font-body); font-size: 1rem; color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-status { margin-top: 18px; font-size: 0.95rem; display: none; }
.form-status.success { color: var(--sage); display: block; }
.form-status.error { color: #a94438; display: block; }

/* ---------- Misc ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list span { font-family: var(--font-eyebrow); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--sage); color: var(--teal); border-radius: 999px; padding: 6px 14px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.banner-cta {
  background: var(--taupe); border-radius: var(--radius-lg); padding: 64px; text-align: center;
}
.banner-cta h2 { max-width: 22em; margin-left: auto; margin-right: auto; }

.coming-soon-badge {
  display: inline-block; font-family: var(--font-eyebrow); font-size: 0.65rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px;
  padding: 4px 10px; margin-bottom: 14px;
}

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--teal); color: var(--ivory);
  padding: 12px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ---------- Consents ---------- */
.legal-note {
  background: var(--taupe); border-left: 3px solid var(--gold); border-radius: var(--radius);
  padding: 18px 22px; font-size: 0.92rem; color: var(--ink); margin-bottom: 48px;
}
.legal-note strong { color: var(--teal); }

.consent-card {
  background: var(--white); border: 1px solid rgba(30,57,52,0.09); border-radius: var(--radius-lg);
  padding: 30px 32px; margin-bottom: 28px;
}
.consent-card h3 { margin-bottom: 4px; }
.consent-card .consent-version { font-family: var(--font-eyebrow); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--sage); margin-bottom: 18px; display: block; }
.consent-text {
  max-height: 220px; overflow-y: auto; padding: 18px 20px; background: var(--ivory);
  border-radius: var(--radius); font-size: 0.92rem; color: var(--ink-soft); line-height: 1.7;
  margin-bottom: 18px; border: 1px solid rgba(30,57,52,0.08);
}
.consent-text p { margin: 0 0 1em; }
.consent-text p:last-child { margin-bottom: 0; }
.consent-agree {
  display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; color: var(--ink); cursor: pointer;
}
.consent-agree input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }

.signature-block {
  background: var(--white); border: 1px solid rgba(30,57,52,0.09); border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.sig-pad-wrap {
  border: 1px solid rgba(30,57,52,0.2); border-radius: var(--radius); background: var(--ivory);
  position: relative; touch-action: none;
}
.sig-pad-wrap canvas { display: block; width: 100%; height: 180px; cursor: crosshair; border-radius: var(--radius); }
.sig-pad-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-eyebrow); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(43,42,38,0.35); pointer-events: none;
}
.sig-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.sig-clear {
  font-family: var(--font-eyebrow); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: none; border: none; color: var(--gold); cursor: pointer; padding: 4px 0;
}
.sig-clear:hover { text-decoration: underline; }

.consent-submit-status { margin-top: 20px; font-size: 0.95rem; display: none; }
.consent-submit-status.success { color: var(--sage); display: block; }
.consent-submit-status.error { color: #a94438; display: block; }
