/* ------------------------------------------------------------------
   BrightClinic landing – tokens
   ------------------------------------------------------------------ */
:root {
    --ink: #1c2422;        /* warm charcoal: headings, screen */
    --accent: #a9a8f7;     /* brand: buttons, marks, highlight. Same periwinkle as the app's default accent */
    --accent-rgb: 169, 168, 247; /* for rgba() glows and rings */
    --accent-light: #c4c3fa; /* wordmark periwinkle, lighter than the button accent */
    --accent-deep: #8b8acb; /* hover */
    --accent-text: #5f5e96; /* accent at text contrast: eyebrows, labels (5.9:1 on white, 5.2:1 on mist) */
    --mist: #eeedfd;       /* pale accent surfaces */
    --paper: #fbfaf6;      /* page ground */
    --white: #ffffff;
    --text: #2a2d2a;
    --muted: #5d615b;       /* 5.2:1 on mist */
    --line: #e6e2d8;
    --teal: #12716f;       /* status only */

    --font: 'Gabarito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --radius: 14px;
    --radius-sm: 8px;
    --container: 1120px;
    --gutter: clamp(16px, 4vw, 40px);

    --shadow-card: 0 1px 2px rgba(28, 36, 34, 0.04), 0 8px 24px -8px rgba(28, 36, 34, 0.1);
    --shadow-card-hover: 0 2px 4px rgba(28, 36, 34, 0.05), 0 18px 40px -14px rgba(28, 36, 34, 0.2);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent-text);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 8px 12px;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-sm);
}
.skip-link:focus {
    top: 12px;
}

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}
.container-narrow {
    max-width: 760px;
}

/* ------------------------------------------------------------------
   Type
   ------------------------------------------------------------------ */
h1,
h2,
h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.5rem);
    letter-spacing: -0.03em;
}
h2 {
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
}
h3 {
    font-size: 1.15rem;
    line-height: 1.3;
}
p {
    margin: 0;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-text);
}

/* highlighter band: the accent sits under the words, ink stays readable */
.hl {
    background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%);
    padding-inline: 0.06em;
    margin-inline: -0.06em;
}

.lead {
    margin-top: 22px;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--muted);
    max-width: 42ch;
}

.section-lead {
    margin-top: 14px;
    max-width: 56ch;
    color: var(--muted);
    font-size: 1.05rem;
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active {
    transform: translateY(1px);
}
.btn-primary {
    background: var(--accent);
    color: var(--ink);
}
.btn-primary:hover {
    background: var(--accent-deep);
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover {
    box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-sm {
    padding: 10px 16px;
    font-size: 0.92rem;
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.site-header.is-scrolled {
    border-bottom-color: var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 72px;
}

/* wordmark: Bright in the brand periwinkle, Clinic in ink. A logo, so it
   is exempt from text contrast; the full accent reads better than the tint. */
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}
.brand-name {
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    font-weight: 400;
    line-height: 1;
}
.brand-name b {
    font-weight: 800;
    color: var(--accent);
}
.brand-name span {
    color: var(--ink);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav > a:not(.btn) {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}
.site-nav > a:not(.btn):hover {
    color: var(--accent-text);
}

.nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
    content: '';
}
.nav-toggle-bar {
    top: 21px;
}
.nav-toggle-bar::before {
    left: 0;
    top: -7px;
}
.nav-toggle-bar::after {
    left: 0;
    top: 7px;
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bar {
    background: transparent;
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bar::before {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bar::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.hero {
    position: relative;
    padding-block: clamp(40px, 7vw, 88px) clamp(48px, 6vw, 80px);
    overflow: hidden;
    /* white at the top so the header and hero are one surface, mist at the far end */
    background: linear-gradient(160deg, var(--white) 0%, var(--white) 38%, var(--mist) 100%);
}
.hero::before {
    /* a soft accent glow behind the copy: the "bright" in the name */
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), transparent);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.hero-note {
    margin-top: 22px;
    max-width: 44ch;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Screen: the day sheet sits on a dark panel like an app window ------*/
.screen {
    background: linear-gradient(135deg, #d9d8fb 0%, var(--accent) 100%);
    border-radius: 22px;
    padding: 22px 22px 14px;
    max-width: 540px;
    margin-inline: auto;
    color: var(--ink);
    box-shadow: 0 30px 60px -30px rgba(78, 77, 130, 0.35);
}
.screen-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 18px;
}
.screen-title {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.screen-date {
    color: rgba(28, 36, 34, 0.65);
    font-size: 0.85rem;
}
.screen-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 12px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 2px 8px -2px rgba(78, 77, 130, 0.25);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.screen-stat-n {
    font-weight: 800;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.daysheet {
    list-style: none;
    margin: 0;
    padding: 6px 4px 8px;
    background: var(--white);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.9rem;
}
.row {
    display: grid;
    grid-template-columns: 48px 14px 1fr auto;
    align-items: center;
    gap: 0 10px;
    padding: 9px 12px 9px 14px;
    border-radius: 8px;
}
.row-live {
    background: var(--mist);
}
.row-time {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* agenda rail: a continuous line with a stop per appointment */
.row-rail {
    position: relative;
    align-self: stretch;
}
.row-rail::before {
    content: '';
    position: absolute;
    left: 6px;
    top: -9px;
    bottom: -9px;
    width: 2px;
    background: var(--line);
}
.row:first-child .row-rail::before {
    top: 50%;
}
.row:last-child .row-rail::before {
    bottom: 50%;
}
.row-rail::after {
    content: '';
    position: absolute;
    left: 3px;
    top: calc(50% - 4px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--line);
}
.row-live .row-rail::after {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.45);
}

.row-who {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 600;
}
.row-who small {
    display: block;
    font-weight: 500;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.2;
}
.avatar {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mist);
    color: var(--accent-text);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.chip em {
    font-style: normal;
    font-weight: 500;
    opacity: 0.8;
}
.chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.chip-sched {
    background: #f1f0eb;
    color: var(--muted);
}
.chip-wait {
    background: #fff0c2;
    color: #8a5a00;
}
.chip-in {
    background: #e0f2f0;
    color: var(--teal);
}
.chip-offer {
    background: #e7ecff;
    color: #2f47a8;
}
.chip-done {
    background: #dcf3e6;
    color: #1c6b3a;
}

/* Entrance: rows stagger in, then the live row advances (script.js) */
.daysheet .row {
    opacity: 0;
    transform: translateY(6px);
    animation: row-in 0.5s var(--ease) forwards;
    animation-delay: calc(0.25s + var(--i, 0) * 90ms);
}
@keyframes row-in {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ------------------------------------------------------------------
   Sections
   ------------------------------------------------------------------ */
.section {
    padding-block: clamp(64px, 9vw, 112px);
}
.section-head {
    max-width: 640px;
    margin-bottom: clamp(32px, 5vw, 56px);
}

.grid {
    display: grid;
    gap: 20px;
}
.grid-modules {
    grid-template-columns: repeat(4, 1fr);
}

/* White band: sets a section apart from the paper ground around it --*/
.section-band {
    background: var(--white);
    border-block: 1px solid var(--line);
}

/* Patient journey: icon stops joined by a line ----------------------*/
.journey {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}
.journey-step {
    position: relative;
    padding-top: 60px;
    text-align: center;
}
.journey-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    width: 44px;
    height: 44px;
    padding: 11px;
    border-radius: 50%;
    background: var(--mist);
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.journey-step:first-child .journey-icon,
.journey-step:last-child .journey-icon {
    background: var(--accent);
}
/* connector: from this icon's centre to the next one's, under the icons */
.journey-step::after {
    content: '';
    position: absolute;
    top: 21px;
    left: 50%;
    right: calc(-50% - 12px);
    height: 2px;
    background: var(--line);
}
.journey-step:last-child::after {
    display: none;
}
.journey-step h3 {
    margin-bottom: 4px;
    font-size: 0.98rem;
}
.journey-step p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.subhead {
    margin: 40px 0 16px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}
.grid-note {
    margin-top: 28px;
    color: var(--muted);
    font-size: 0.95rem;
}

.card {
    padding: 26px 24px 28px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}
.card-icon {
    width: 44px;
    height: 44px;
    padding: 11px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--mist);
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.card h3 {
    margin-bottom: 8px;
}
.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Mist band: pale accent ground under white cards ------------------*/
.section-mist {
    background: var(--mist);
}
.grid-integrations {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.integration {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-card);
}
.integration-tag {
    display: inline-block;
    margin-bottom: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--mist);
    color: var(--accent-text);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.integration h3 {
    margin-bottom: 8px;
}
.integration p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Data and security: three plain columns, no cards ------------------*/
.grid-trust {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.trust {
    padding-top: 18px;
    border-top: 2px solid var(--accent);
}
.trust h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}
.trust p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* FAQ ---------------------------------------------------------------*/
.faq {
    border-top: 1px solid var(--line);
}
.faq details {
    border-bottom: 1px solid var(--line);
}
.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 4px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--ink);
    font-size: 1.05rem;
}
.faq summary::-webkit-details-marker {
    display: none;
}
.faq summary::after {
    content: '+';
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--mist);
    color: var(--accent-text);
    font-weight: 700;
    transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after {
    transform: rotate(45deg);
}
.faq details p {
    padding: 0 4px 22px;
    color: var(--muted);
    max-width: 62ch;
}

/* Contact -----------------------------------------------------------*/
.section-contact {
    background: var(--mist);
}
.contact-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
    margin-top: 32px;
    padding: 22px 26px;
    background: var(--white);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    border: 1px solid transparent;
    transition: border-color 0.2s, transform 0.25s var(--ease);
}
.contact-line:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.contact-label {
    width: 90px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}
.contact-value {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

/* Footer ------------------------------------------------------------*/
.site-footer {
    padding-block: 32px;
    border-top: 1px solid var(--line);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-footer .brand-name {
    font-size: 1.2rem;
}
.footer-text {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ------------------------------------------------------------------
   Reveal on scroll
   ------------------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
.grid .reveal:nth-child(2) { transition-delay: 60ms; }
.grid .reveal:nth-child(3) { transition-delay: 120ms; }
.grid .reveal:nth-child(4) { transition-delay: 180ms; }
.grid .reveal:nth-child(5) { transition-delay: 60ms; }
.grid .reveal:nth-child(6) { transition-delay: 120ms; }
.grid .reveal:nth-child(7) { transition-delay: 180ms; }
.grid .reveal:nth-child(8) { transition-delay: 240ms; }
.journey .reveal:nth-child(2) { transition-delay: 60ms; }
.journey .reveal:nth-child(3) { transition-delay: 120ms; }
.journey .reveal:nth-child(4) { transition-delay: 180ms; }
.journey .reveal:nth-child(5) { transition-delay: 240ms; }
.journey .reveal:nth-child(6) { transition-delay: 300ms; }
.journey .reveal:nth-child(7) { transition-delay: 360ms; }
.journey .reveal:nth-child(8) { transition-delay: 420ms; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .site-nav {
        gap: 16px;
    }
    .grid-modules {
        grid-template-columns: repeat(2, 1fr);
    }
    /* journey turns vertical: stops on the left, line runs down */
    .journey {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 560px;
    }
    .journey-step {
        padding: 10px 0 24px 64px;
        text-align: left;
    }
    .journey-icon {
        left: 0;
        transform: none;
    }
    .journey-step h3 {
        font-size: 1.05rem;
    }
    .journey-step p {
        font-size: 0.88rem;
    }
    .journey-step:last-child {
        padding-bottom: 0;
    }
    .journey-step::after {
        top: 44px;
        left: 21px;
        right: auto;
        bottom: 0;
        width: 2px;
        height: auto;
    }
    .grid-trust {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 860px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .lead {
        max-width: 48ch;
    }
    .hero-visual {
        order: 2;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    .site-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px var(--gutter) 20px;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 32px -16px rgba(28, 36, 34, 0.25);
    }
    .site-nav[hidden] {
        display: none;
    }
    .site-nav > a:not(.btn) {
        padding: 12px 4px;
        font-size: 1.05rem;
    }
    .site-nav .btn {
        margin-top: 8px;
        justify-content: center;
    }
    .grid-integrations {
        grid-template-columns: 1fr;
    }
    .screen {
        padding: 16px 14px 10px;
        border-radius: 18px;
    }
    /* phone: no rail, time on the left, name with the status chip stacked under it */
    .row {
        grid-template-columns: 50px 1fr;
        grid-template-areas:
            'time who'
            'time chip';
        row-gap: 6px;
        padding: 10px 12px;
    }
    .row-time {
        grid-area: time;
        align-self: start;
        padding-top: 6px;
    }
    .row-rail,
    .row-phone-hide {
        display: none;
    }
    .row-who {
        grid-area: who;
    }
    .row .chip {
        grid-area: chip;
        justify-self: start;
    }
}

@media (max-width: 768px) and (min-width: 401px) {
    .grid-modules {
        gap: 12px;
    }
    .card {
        padding: 20px 18px 22px;
    }
    .card-icon {
        width: 38px;
        height: 38px;
        padding: 9px;
        margin-bottom: 14px;
    }
    .card h3 {
        font-size: 1.05rem;
    }
    .card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .grid-modules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .contact-label {
        width: 100%;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .daysheet .row {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .card,
    .contact-line,
    .btn,
    .chip {
        transition: none;
    }
}
