/* ==========================================================================
   Ramana's Dental & Implant Centre
   Design system: taken from the clinic logo — navy tooth, teal sweep
   Fraunces (display) / Plus Jakarta Sans (text)
   Layered on Bootstrap 5.3 — only grid, navbar collapse and form plumbing
   are borrowed; all visual styling lives here.
   ========================================================================== */

:root {
    /* Core palette — --brand is the logo navy, --accent its teal sweep */
    --ink: #141F3D;
    --ink-soft: #4B5775;
    --ink-faint: #7B86A0;
    --porcelain: #F1F4F9;
    --surface: #FFFFFF;
    --surface-sunk: #E7ECF5;
    --brand: #3B4A86;
    --brand-deep: #2A3666;
    --sky: #DBEDF6;
    --accent: #1FA2C8;
    --line: rgba(20, 31, 61, 0.12);
    --line-strong: rgba(20, 31, 61, 0.22);

    /* On-dark-band colours (fixed, not theme-dependent) */
    --on-ink: #E9EDF7;
    --on-ink-soft: #A3AFCB;

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-text: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Shape & depth — one radius family, one shadow */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --shadow: 0 1px 2px rgba(20, 31, 61, 0.06), 0 18px 40px -22px rgba(20, 31, 61, 0.30);

    /* Rhythm */
    --band-y: clamp(3.5rem, 7vw, 6rem);

    color-scheme: light;
}

[data-theme="dark"] {
    --ink: #E8ECF7;
    --ink-soft: #AAB5D0;
    --ink-faint: #8792B0;
    --porcelain: #0B1124;
    --surface: #141C35;
    --surface-sunk: #101729;
    --brand: #8EA0E2;
    --brand-deep: #B2C0EE;
    --sky: #16294A;
    --accent: #46C3E6;
    --line: rgba(232, 236, 247, 0.14);
    --line-strong: rgba(232, 236, 247, 0.26);

    color-scheme: dark;
}

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

body {
    margin: 0;
    font-family: var(--font-text);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--porcelain);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

img {
    max-width: 100%;
    height: auto;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.display-5 {
    font-family: var(--font-display);
    font-weight: 600;
    font-variation-settings: 'SOFT' 30, 'WONK' 0;
    color: var(--ink);
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1,
.display-5 {
    font-size: clamp(2rem, 4.2vw, 2.9rem);
}

h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
}

h3 {
    font-size: 1.3rem;
}

h4 {
    font-size: 1.125rem;
}

h5,
h6 {
    font-size: 1rem;
}

p {
    margin: 0 0 1rem;
    max-width: 68ch;
}

.lead {
    font-family: var(--font-text);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 58ch;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--brand-deep);
}

/* Teal pen-stroke under one phrase in the hero — the single flourish.
   Painted as a background on the span itself: a positioned pseudo-element
   would need its own stacking context to sit behind the text. */
.stroke {
    background-image: linear-gradient(to top,
            color-mix(in srgb, var(--accent) 38%, transparent) 0.38em,
            transparent 0.38em);
    background-repeat: no-repeat;
    padding: 0 0.04em;
    /* Keeps the stroke consistent when the phrase wraps onto a second line */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* --------------------------------------------------------------------------
   Bands — full-bleed horizontal sections carry the page rhythm
   -------------------------------------------------------------------------- */

.band {
    padding: var(--band-y) 0;
}

.band--tint {
    background: var(--surface-sunk);
}

/* Sits directly under a .page-head, which already supplies the top space */
.band--flush {
    padding-top: 0;
}

.band--surface {
    background: var(--surface);
}

.band--ink {
    background: #141F3D;
    color: var(--on-ink);
}

.band--ink h1,
.band--ink h2,
.band--ink h3,
.band--ink h4 {
    color: var(--on-ink);
}

.band--ink .lead,
.band--ink p {
    color: var(--on-ink-soft);
}

/* Section headings: left-aligned, no boxed card, no eyebrow label */
.section-head {
    max-width: 44rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
    margin-bottom: 0.5rem;
}

.section-head p {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.navbar {
    background: color-mix(in srgb, var(--porcelain) 86%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    padding: 0.85rem 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.navbar.is-scrolled {
    border-bottom-color: var(--line);
    background: color-mix(in srgb, var(--porcelain) 94%, transparent);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink) !important;
    max-width: 15rem;
}

/* The clinic's logo. Two files, because each is supplied with a solid
   background: the white-field version for light surfaces, the navy-field
   version for dark ones. Only the matching theme's file is ever fetched. */
.brand-logo {
    display: block;
    width: 5.3rem;
    height: 3.5rem;
    background: url('../images/logo-on-light.png') no-repeat left center / contain;
}

/* The white wordmark version, for the dark theme's near-black navbar */
[data-theme="dark"] .brand-logo {
    width: 7.4rem;
    background-image: url('../images/logo-on-dark.png');
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-soft) !important;
    padding: 0.4rem 0 !important;
    margin: 0 0.75rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -0.1rem;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transition: right 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
    right: 0;
}

.navbar-toggler {
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 0.35rem 0.55rem;
    color: var(--ink);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: none;
    width: 1.25rem;
    height: 1.25rem;
    position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.navbar-toggler-icon::before {
    top: 0.3rem;
}

.navbar-toggler-icon::after {
    bottom: 0.3rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon-only button, used for the theme switch */
.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--ink-soft);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-icon:hover {
    background: var(--sky);
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   Buttons — sentence case, no uppercase, no gradient, no shine sweep
   -------------------------------------------------------------------------- */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--ink);
    --btn-bd: var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-text);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.2;
    padding: 0.7rem 1.25rem;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-md);
    background: var(--btn-bg);
    color: var(--btn-fg);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    color: var(--btn-fg);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    --btn-bg: var(--brand);
    --btn-fg: #FFFFFF;
    --btn-bd: var(--brand);
}

.btn-primary:hover {
    --btn-bg: var(--brand-deep);
    --btn-bd: var(--brand-deep);
    box-shadow: 0 10px 20px -10px rgba(59, 74, 134, 0.65);
}

[data-theme="dark"] .btn-primary {
    --btn-fg: #0B1124;
}

.btn-outline-primary {
    --btn-bg: transparent;
    --btn-fg: var(--brand);
    --btn-bd: var(--brand);
}

.btn-outline-primary:hover {
    --btn-bg: var(--sky);
}

.btn-quiet {
    --btn-bg: var(--surface);
    --btn-fg: var(--ink);
    --btn-bd: var(--line-strong);
}

.btn-quiet:hover {
    --btn-bg: var(--sky);
}

.btn-lg {
    font-size: 1rem;
    padding: 0.85rem 1.6rem;
}

.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 0.9rem;
}

.band--ink .btn-outline-primary {
    --btn-fg: var(--on-ink);
    --btn-bd: rgba(234, 242, 239, 0.4);
}

.band--ink .btn-outline-primary:hover {
    --btn-bg: rgba(234, 242, 239, 0.1);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0 var(--band-y);
    background:
        radial-gradient(48rem 34rem at 88% -14%, var(--sky), transparent 68%),
        radial-gradient(34rem 26rem at 4% 108%, var(--sky), transparent 72%),
        var(--porcelain);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 4rem;
    }
}

.hero-title {
    font-size: clamp(2.25rem, 5.6vw, 3.6rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero-lead {
    font-size: 1.125rem;
    max-width: 34ch;
    color: var(--ink-soft);
    margin-bottom: 1.75rem;
}

/* Live open/closed pill */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem 0.4rem 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.status b {
    color: var(--ink);
    font-weight: 600;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--ink-faint);
    flex: none;
}

.status[data-open="yes"] .status-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 24%, transparent);
}

/* The two real dentists, under the hero copy */
.hero-team {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.hero-doc {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-doc img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    border: 1px solid var(--line);
    background: var(--sky);
    flex: none;
}

.hero-doc-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero-doc-role {
    display: block;
    font-size: 0.8125rem;
    color: var(--ink-faint);
    line-height: 1.3;
}

/* Booking panel — the one elevated, boldest element on the page */
.booking {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.booking h2 {
    font-size: 1.375rem;
    margin-bottom: 0.35rem;
}

.booking-note {
    font-size: 0.875rem;
    color: var(--ink-faint);
    margin-bottom: 1.25rem;
}

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.chip {
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
    border-color: var(--brand);
    color: var(--ink);
}

.chip[aria-pressed="true"] {
    background: var(--brand);
    border-color: var(--brand);
    color: #FFFFFF;
}

[data-theme="dark"] .chip[aria-pressed="true"] {
    color: #0B1124;
}

.booking .btn {
    width: 100%;
}

.booking-alt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.booking-alt a {
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Service cards — the only place using a repeated card
   -------------------------------------------------------------------------- */

.svc {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

/* Whole card is the tap target when it links to a prefilled booking */
a.svc {
    text-decoration: none;
    color: inherit;
}

.svc:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
}


.svc-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    border-radius: var(--r-md);
    background: var(--sky);
    color: var(--brand);
    flex: none;
}

.svc-icon svg {
    width: 1.625rem;
    height: 1.625rem;
}

.svc h3 {
    font-size: 1.1875rem;
    margin: 0;
}

.svc p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ink-soft);
    max-width: none;
}

.svc-foot {
    display: block;
    margin-top: auto;
    padding-top: 1rem;
}

.svc-tag {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--brand);
}

/* --------------------------------------------------------------------------
   Reasons — hairline list instead of another card grid
   -------------------------------------------------------------------------- */

.reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .reasons {
        grid-template-columns: 1fr 1fr;
        column-gap: 3rem;
    }
}

.reasons li {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}

.reasons li i {
    color: var(--brand);
    font-size: 1.125rem;
    line-height: 1.5;
    flex: none;
}

.reasons h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.15rem;
}

.reasons p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--ink-soft);
    max-width: none;
}

.band--ink .reasons li {
    border-top-color: rgba(234, 242, 239, 0.18);
}

.band--ink .reasons li i {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   First visit — genuinely a sequence, so it is numbered
   -------------------------------------------------------------------------- */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .steps {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.steps li {
    counter-increment: step;
    padding-top: 1.25rem;
    border-top: 2px solid rgba(234, 242, 239, 0.22);
}

.steps li::before {
    content: counter(step);
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.steps h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.3rem;
}

.steps p {
    margin: 0;
    font-size: 0.9375rem;
    max-width: none;
}

/* --------------------------------------------------------------------------
   Doctors
   -------------------------------------------------------------------------- */

.doc {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

/* Arch crop — a quiet nod to a tooth's crown, used only here. The box keeps
   the portraits' own 0.78 ratio so the faces aren't enlarged by the crop. */
.doc-photo {
    width: 11rem;
    height: 14rem;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 5.5rem 5.5rem var(--r-md) var(--r-md);
    background: var(--sky);
    /* The portraits are shot on white, so the arch needs an edge to read */
    border: 1px solid var(--line);
    flex: none;
    align-self: center;
}

.doc-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (min-width: 576px) {
    .doc {
        flex-direction: row;
        gap: 1.5rem;
    }

    .doc-photo {
        align-self: flex-start;
    }
}

.doc-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.doc-role {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 0.75rem;
}

.doc-body p {
    font-size: 0.9375rem;
    color: var(--ink-soft);
    max-width: none;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

/* --------------------------------------------------------------------------
   FAQ — native <details>, no accordion JavaScript
   -------------------------------------------------------------------------- */

.faq {
    max-width: 48rem;
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '\002B';
    font-family: var(--font-text);
    font-size: 1.25rem;
    color: var(--brand);
    flex: none;
    transition: transform 0.2s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq p {
    margin: 0 0 1.1rem;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Visit / location panel
   -------------------------------------------------------------------------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.facts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.facts li {
    display: flex;
    gap: 0.85rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
}

.facts li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.facts i {
    color: var(--brand);
    font-size: 1.0625rem;
    line-height: 1.5;
    flex: none;
}

.facts dt,
.fact-key {
    font-weight: 600;
    display: block;
}

.facts a {
    font-weight: 500;
}

.map-frame {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface-sunk);
    min-height: 20rem;
    height: 100%;
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 20rem;
    border: 0;
}

/* --------------------------------------------------------------------------
   Page header for inner pages
   -------------------------------------------------------------------------- */

.page-head {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
    background:
        radial-gradient(50rem 24rem at 90% -20%, var(--sky), transparent 70%),
        var(--porcelain);
}

.page-head h1 {
    margin-bottom: 0.6rem;
}

.page-head .lead {
    margin-bottom: 0;
}

.page-head-inner {
    max-width: 46rem;
}

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

.form-control,
.form-select {
    font-family: var(--font-text);
    font-size: 1rem;
    padding: 0.7rem 0.9rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
    color: var(--ink-faint);
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    color: var(--ink);
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
    outline: none;
}

/* The <option> popup is drawn by the OS and does not reliably inherit the
   select's background, so pin it to a readable pair in both themes. */
select.form-select option {
    background-color: #FFFFFF;
    color: #141F3D;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--ink-faint);
}

.form-check-input {
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
}

.form-check-input:checked {
    background-color: var(--brand);
    border-color: var(--brand);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.form-control.is-invalid,
.form-select.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #C0392B;
}

[data-theme="dark"] .form-control.is-invalid,
[data-theme="dark"] .form-select.is-invalid,
[data-theme="dark"] .was-validated .form-control:invalid {
    border-color: #FF9A8E;
}

.invalid-feedback {
    font-size: 0.8125rem;
    color: #C0392B;
}

[data-theme="dark"] .invalid-feedback {
    color: #FF9A8E;
}

/* --------------------------------------------------------------------------
   Sticky action bar — mobile only. A clinic's two real jobs: call, or book.
   -------------------------------------------------------------------------- */

.quick-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1040;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
}

.quick-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.5rem;
    padding: 0.5rem;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.quick-bar a i {
    font-size: 1.125rem;
    color: var(--brand);
}

.quick-bar a.is-primary {
    background: var(--brand);
    color: #FFFFFF;
}

.quick-bar a.is-primary i {
    color: inherit;
}

@media (min-width: 992px) {
    .quick-bar {
        display: none;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 3.5rem;
    }
}

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

.footer {
    background: #141F3D;
    color: var(--on-ink-soft);
    padding: clamp(3rem, 5vw, 4rem) 0 1.5rem;
    font-size: 0.9375rem;
}

.footer h2,
.footer h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--on-ink);
    margin-bottom: 1rem;
}

.footer p {
    color: var(--on-ink-soft);
    max-width: 34ch;
}

/* The navy-field logo sits on the footer's own navy, so it reads as one piece */
.footer-logo {
    display: block;
    height: 3.5rem;
    width: auto;
    margin-bottom: 0.25rem;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--on-ink-soft);
    text-decoration: none;
}

.footer-link:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.social-links a {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(234, 242, 239, 0.25);
    border-radius: var(--r-sm);
    color: var(--on-ink);
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-links a:hover {
    background: rgba(234, 242, 239, 0.12);
    color: #FFFFFF;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(234, 242, 239, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

/* --------------------------------------------------------------------------
   Hero entrance — one orchestrated sequence on load, nothing on scroll
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .enter > * {
        animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }

    .enter > *:nth-child(1) { animation-delay: 0.05s; }
    .enter > *:nth-child(2) { animation-delay: 0.12s; }
    .enter > *:nth-child(3) { animation-delay: 0.19s; }
    .enter > *:nth-child(4) { animation-delay: 0.26s; }
    .enter > *:nth-child(5) { animation-delay: 0.33s; }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, .chip):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 1100;
    padding: 0.6rem 1rem;
    background: var(--brand);
    color: #FFFFFF;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: #FFFFFF;
}

/* Toast used by the form handlers in main.js */
.toast-note {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    max-width: 22rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--r-md);
    background: var(--ink);
    color: var(--porcelain);
    box-shadow: var(--shadow);
    font-size: 0.9375rem;
    cursor: pointer;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] .toast-note {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

.toast-note.is-in {
    transform: translateX(0);
}

.toast-note.is-ok {
    border-left: 4px solid var(--brand);
}

.toast-note.is-bad {
    border-left: 4px solid #E07A6A;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding-top: 1rem;
        margin-top: 0.85rem;
        border-top: 1px solid var(--line);
    }

    .nav-link {
        margin: 0;
        padding: 0.65rem 0 !important;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-top: 1rem;
    }

    .nav-actions .btn {
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .btn-row .btn {
        width: 100%;
    }

    .hero-team {
        gap: 1rem;
    }

    .footer-bottom {
        justify-content: flex-start;
    }

    /* 16px keeps iOS from zooming the viewport on focus */
    .form-control,
    .form-select {
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
    .navbar,
    .footer,
    .quick-bar,
    .booking,
    .btn {
        display: none !important;
    }

    body {
        background: #FFFFFF;
        color: #000000;
        padding-bottom: 0;
    }

    .band,
    .hero,
    .page-head {
        background: #FFFFFF !important;
        padding: 1rem 0;
    }

    .svc,
    .doc,
    .panel {
        border: 1px solid #CCCCCC;
        page-break-inside: avoid;
    }
}
