/* ============================================================
   Foresight Schools, Ikom — Foundation
   Reset · derived tokens · typography · layout · components · masthead · footer

   Every colour, radius, spacing step and font resolves to a CSS custom property written into
   :root by includes/header.php from the theme_tokens table. Nothing visual is hardcoded, so
   the admin's Appearance screen restyles the whole site.
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video, figure { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5 { font-weight: inherit; }

/* ── Derived tokens ── */
:root {
    --font-display: var(--font-heading), 'Poppins', system-ui, sans-serif;
    --font-text:    var(--font-body), 'Inter', system-ui, sans-serif;

    --line:      color-mix(in srgb, var(--color-slate) 24%, transparent);
    --line-soft: color-mix(in srgb, var(--color-slate) 14%, transparent);
    --ink-70:    color-mix(in srgb, var(--color-text) 68%, transparent);
    --ink-55:    color-mix(in srgb, var(--color-text) 52%, transparent);

    --primary-tint: color-mix(in srgb, var(--color-primary) 8%, transparent);
    --primary-deep: color-mix(in srgb, var(--color-primary) 84%, #000);
    --teal-tint:    color-mix(in srgb, var(--color-secondary) 10%, transparent);
    --teal-deep:    color-mix(in srgb, var(--color-secondary) 78%, #000);

    --shadow-1: 0 1px 2px rgba(20,16,14,.04), 0 2px 8px rgba(20,16,14,.05);
    --shadow-2: 0 2px 4px rgba(20,16,14,.04), 0 10px 26px rgba(20,16,14,.07);
    --shadow-3: 0 4px 8px rgba(20,16,14,.05), 0 20px 50px rgba(20,16,14,.11);

    --ease: cubic-bezier(.22, .61, .36, 1);
    --t: var(--motion-speed, 250ms) var(--ease);

    /* Content cap. --layout-width comes from theme_tokens (admin-editable); the literal is the
       fallback if the stylesheet is ever served without the token block. */
    --container: var(--layout-width, 1520px);
    --gutter: clamp(18px, 4vw, 52px);
    --mast-h: 76px;
}

body {
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.68;
    color: var(--color-text);
    background: #fff;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

::selection { background: var(--color-primary); color: #fff; }
:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 3px; border-radius: 4px; }

/* Available to assistive technology, invisible on screen. Used to announce links that open a
   new tab — clip-path rather than display:none, which would remove it from the a11y tree too. */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden; white-space: nowrap;
    clip-path: inset(50%);
}

.skip-link {
    position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%); z-index: 2000;
    background: var(--color-primary); color: #fff; padding: 12px 22px;
    border-radius: 0 0 var(--radius-button) var(--radius-button);
    font-size: 14px; font-weight: 600; transition: transform var(--t);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ── Typography ── */
.display, h1, h2, h3, h4 { font-family: var(--font-display); }

.display {
    font-size: clamp(2.25rem, 1.35rem + 3.4vw, var(--scale-display));
    font-weight: 800; line-height: 1.12; letter-spacing: var(--tracking-display);
}
.h1 { font-size: clamp(1.75rem, 1.25rem + 1.9vw, 2.5rem);  font-weight: 800; line-height: 1.2;  letter-spacing: -.02em; }
.h2 { font-size: clamp(1.5rem,  1.15rem + 1.4vw, 2.05rem); font-weight: 700; line-height: 1.25; letter-spacing: -.018em; }
.h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem);      font-weight: 700; line-height: 1.3;  letter-spacing: -.012em; }
.h4 { font-size: 1rem; font-weight: 700; line-height: 1.4; }

.lede  { font-size: clamp(.98rem, .94rem + .25vw, 1.08rem); line-height: 1.72; color: var(--ink-70); }
.muted { color: var(--ink-55); }
.tight { max-width: 56ch; }
.body-copy p + p { margin-top: 1em; }

/* Section eyebrow — small maroon caps, as designed */
.eyebrow {
    font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
    color: var(--color-primary);
}
.eyebrow--light { color: color-mix(in srgb, #fff 82%, transparent); }
.eyebrow--gold  { color: var(--color-accent); }

/* ── Layout ── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 900px; }

.section { padding-block: var(--space-section-sm); position: relative; }
@media (min-width: 720px)  { .section { padding-block: var(--space-section-md); } }
@media (min-width: 1080px) { .section { padding-block: var(--space-section); } }
.section--tight { padding-block: clamp(44px, 6vw, 76px); }
.section--alt  { background: var(--color-bg); }
.section--warm { background: var(--color-warm); }
.section--deep { background: var(--color-primary); color: #fff; }

.section__head { margin-bottom: clamp(32px, 4.5vw, 56px); }
.section__head--center { text-align: center; max-width: 720px; margin-inline: auto; }
.section__head--center .section__title { margin-top: 14px; }
.section__head--center .section__sub { margin-top: 14px; }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.grid { display: grid; gap: var(--space-gap); }

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

/* ── Media ── */
.media {
    position: relative; overflow: hidden;
    border-radius: var(--radius-image);
    aspect-ratio: var(--ratio, 4/3);
    background: var(--color-warm);
}
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder plate — a composed architectural field, never a broken-image box */
.media--plate {
    display: grid; place-items: end start; padding: 16px;
    background:
        repeating-linear-gradient(-45deg,
            color-mix(in srgb, var(--color-slate) 8%, transparent) 0 1px, transparent 1px 12px),
        var(--color-warm);
    border: 1px solid var(--line-soft);
}
.media__caption {
    font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
    color: color-mix(in srgb, var(--color-slate) 88%, transparent);
    background: color-mix(in srgb, #fff 74%, transparent);
    padding: 5px 9px; border-radius: 5px;
}

/* ── Buttons ── */
.btn {
    --btn-bg: var(--color-primary); --btn-fg: #fff; --btn-bd: var(--color-primary);
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 24px;
    background: var(--btn-bg); color: var(--btn-fg);
    border: 1px solid var(--btn-bd); border-radius: var(--radius-button);
    font-size: 14.5px; font-weight: 600;
    white-space: nowrap;
    transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0); }
.btn .ico { transition: transform var(--t); }
.btn:hover .ico { transform: translateX(3px); }

/* Teal is the CTA colour throughout the design */
.btn--cta { --btn-bg: var(--color-secondary); --btn-bd: var(--color-secondary); }
.btn--cta:hover { --btn-bg: var(--teal-deep); --btn-bd: var(--teal-deep); }

.btn--maroon { --btn-bg: var(--color-primary); --btn-bd: var(--color-primary); }
.btn--maroon:hover { --btn-bg: var(--color-secondary); --btn-bd: var(--color-secondary); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--color-text); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bg: var(--color-text); --btn-fg: #fff; --btn-bd: var(--color-text); }

.btn--light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: color-mix(in srgb, #fff 55%, transparent); }
.btn--light:hover { --btn-bg: #fff; --btn-fg: var(--color-primary); --btn-bd: #fff; }

.btn--white { --btn-bg: #fff; --btn-fg: var(--color-primary); --btn-bd: #fff; }
.btn--white:hover { --btn-bg: var(--color-accent); --btn-fg: var(--color-primary); --btn-bd: var(--color-accent); }

/* Student Portal button — colour comes from the --color-portal token so the shade can be tuned
   from the admin without a code change.
   Contrast note: white on #FFC600 is 1.6:1. WCAG AA wants 4.5:1, so this text will be hard to
   read on a bright screen. Switching --btn-fg to var(--color-text) on this rule alone would
   give 11:1 and keep the yellow exactly as-is. */
.btn--portal {
    --btn-bg: var(--color-portal, #FFC600);
    --btn-fg: #fff;
    --btn-bd: var(--color-portal, #FFC600);
}
.btn--portal:hover {
    --btn-bg: color-mix(in srgb, var(--color-portal, #FFC600) 84%, #000);
    --btn-bd: color-mix(in srgb, var(--color-portal, #FFC600) 84%, #000);
    --btn-fg: #fff;
}
.btn--portal .ico { opacity: .95; }
.btn--portal:hover .ico { transform: none; }

.btn--pill { border-radius: 999px; padding: 10px 20px; font-size: 13.5px; }
.btn--sm { padding: 10px 18px; font-size: 13.5px; }

/* Inline brand marks (see brand_icon()) */
.brand-ico { display: block; flex: none; }

.link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 14px; font-weight: 600; color: var(--color-secondary);
    transition: gap var(--t), color var(--t);
}
.link:hover { gap: 11px; color: var(--color-primary); }

/* ── Cards ── */
.card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-1);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card--lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--line); }

/* ── Forms ── */
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; }
.input, .textarea, .select {
    width: 100%; padding: 13px 15px;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-input); font-size: 15px;
    transition: border-color var(--t), box-shadow var(--t);
}
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--color-slate) 80%, transparent); }
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-secondary) 14%, transparent);
}
.textarea { min-height: 130px; resize: vertical; }

.form-msg { font-size: 14px; font-weight: 600; display: none; }
.form-msg.is-ok  { display: block; color: var(--color-secondary); }
.form-msg.is-err { display: block; color: #b91c1c; }

/* ── Icons ── */
.ico { flex: none; stroke-width: 1.75; }
i[data-lucide] { display: inline-block; }

/* ============================================================
   MASTHEAD — solid maroon, crest left, flat nav, search, teal pill CTA
   ============================================================ */
.mast {
    position: sticky; top: 0; z-index: 900;
    background: var(--color-primary); color: #fff;
    box-shadow: 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
    transition: box-shadow var(--t);
}
.mast.is-stuck { box-shadow: 0 2px 18px rgba(0,0,0,.22); }
.mast__inner { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); height: var(--mast-h); }

.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.crest { display: block; width: 38px; height: 43px; color: var(--color-primary); flex: none; }
.crest svg { width: 100%; height: 100%; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.brand__sub  { font-size: 10.5px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; opacity: .8; }
.brand__logo { height: 46px; width: auto; }

.mast__nav { display: none; align-items: center; gap: clamp(2px, .6vw, 10px); }
@media (min-width: 1100px) { .mast__nav { display: flex; } }
.mast__item { position: relative; }
.mast__link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 26px 12px; font-size: 14px; font-weight: 500;
    color: color-mix(in srgb, #fff 88%, transparent);
    transition: color var(--t);
}
.mast__link:hover { color: #fff; }
/* Current-page underline, as designed */
.mast__link.is-current { color: #fff; font-weight: 600; }
.mast__link.is-current::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 18px;
    height: 2px; background: #fff; border-radius: 2px;
}
.mast__caret { opacity: .7; transition: transform var(--t); }
.mast__item:hover .mast__caret { transform: rotate(180deg); }

.submenu {
    position: absolute; top: 100%; left: 0; min-width: 216px;
    display: grid; padding: 8px;
    background: #fff; color: var(--color-text);
    border-radius: var(--radius-card); box-shadow: var(--shadow-3);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.mast__item:hover .submenu, .mast__item:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { padding: 10px 14px; border-radius: 7px; font-size: 14px; transition: background var(--t), color var(--t); }
.submenu a:hover { background: var(--primary-tint); color: var(--color-primary); }

.mast__actions { display: flex; align-items: center; gap: 8px; }
.mast__icon {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px;
    color: #fff; transition: background var(--t);
}
.mast__icon:hover { background: color-mix(in srgb, #fff 14%, transparent); }
.mast__cta, .mast__portal { display: none; }
@media (min-width: 560px)  { .mast__cta { display: inline-flex; } }
@media (min-width: 1100px) { .mast__portal { display: inline-flex; } }

/* Seven nav links plus search, Student Portal and Apply Now is a lot of bar. Between the
   nav's breakpoint and a comfortable width, tighten the spacing rather than drop a button. */
@media (min-width: 1100px) and (max-width: 1399px) {
    .mast__inner { gap: 14px; }
    .mast__link { padding-inline: 8px; font-size: 13.2px; }
    .mast__link.is-current::after { left: 8px; right: 8px; }
    .btn--pill { padding: 9px 14px; font-size: 12.5px; }
    .brand__name { font-size: 16px; }
}
.mast__burger { display: grid; }
@media (min-width: 1100px) { .mast__burger { display: none; } }

/* ── Mobile drawer ── */
.drawer {
    position: fixed; inset: 0; z-index: 1000;
    display: grid; grid-template-rows: auto 1fr;
    background: #fff;
    transform: translateX(100%); visibility: hidden;
    transition: transform 400ms var(--ease), visibility 400ms;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--mast-h); padding-inline: var(--gutter);
    background: var(--color-primary); color: #fff;
}
.drawer__body { overflow-y: auto; padding: 12px var(--gutter) 56px; }
.drawer__group + .drawer__group { border-top: 1px solid var(--line-soft); }
.drawer__toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; padding: 17px 0; text-align: left;
    font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
}
.drawer__toggle .ico { color: var(--color-slate); transition: transform var(--t); }
.drawer__group.is-open .drawer__toggle .ico { transform: rotate(180deg); }
.drawer__panel { display: grid; overflow: hidden; max-height: 0; transition: max-height 400ms var(--ease); }
.drawer__group.is-open .drawer__panel { max-height: 480px; }
.drawer__sub { display: grid; gap: 2px; padding: 6px 0 18px; }
.drawer__sub a { padding: 10px 13px; border-radius: 8px; font-size: 15px; color: var(--ink-70); transition: background var(--t), color var(--t); }
.drawer__sub a:hover { background: var(--primary-tint); color: var(--color-primary); }
.drawer__actions { display: grid; gap: 10px; margin-top: 26px; }

/* ── Modals ── */
.modal {
    position: fixed; inset: 0; z-index: 1200;
    display: grid; place-items: center; padding: 20px;
    opacity: 0; visibility: hidden;
    transition: opacity 280ms var(--ease), visibility 280ms;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--primary-deep) 55%, rgba(10,8,8,.6)); backdrop-filter: blur(5px); }
.modal__box {
    position: relative; z-index: 1; width: 100%; max-width: 430px;
    padding: clamp(26px, 3.5vw, 36px);
    background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-3);
    transform: translateY(16px) scale(.98); transition: transform 320ms var(--ease);
}
.modal__box--search { max-width: 640px; }
.modal.is-open .modal__box { transform: none; }
.modal__close {
    position: absolute; top: 14px; right: 14px;
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
    color: var(--color-slate); transition: background var(--t), color var(--t);
}
.modal__close:hover { background: var(--primary-tint); color: var(--color-primary); }
.modal__title { margin-top: 12px; }
.modal__note { margin-top: 6px; font-size: 14px; }
.modal__form { display: grid; gap: 15px; margin-top: 22px; }

.search-form { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--line); padding-bottom: 12px; }
.search-form .ico { color: var(--color-slate); }
.search-form__input { flex: 1; border: 0; outline: none; font-size: 1.1rem; padding: 6px 0; background: none; }
.search-form__hint { margin-top: 14px; font-size: 13px; color: var(--ink-55); }

/* ── Portal chooser ── */
.portal-picker { display: grid; gap: 8px; margin-top: 22px; }
.portal-pick {
    display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line-soft); border-radius: var(--radius-card);
    transition: border-color var(--t), background var(--t), transform var(--t), box-shadow var(--t);
}
a.portal-pick:hover { border-color: var(--color-secondary); background: var(--teal-tint); transform: translateX(3px); box-shadow: var(--shadow-1); }
.portal-pick__ico {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: var(--primary-tint); color: var(--color-primary);
    transition: background var(--t), color var(--t);
}
a.portal-pick:hover .portal-pick__ico { background: var(--color-secondary); color: #fff; }
.portal-pick__title { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.portal-pick__text { display: block; font-size: 12.5px; color: var(--ink-55); margin-top: 2px; }
.portal-pick__go { color: var(--color-slate); transition: transform var(--t), color var(--t); }
a.portal-pick:hover .portal-pick__go { color: var(--color-secondary); transform: translateX(3px); }
/* Not yet built — shown so the set reads complete, but visibly inert */
.portal-pick.is-soon { opacity: .58; cursor: not-allowed; }
.portal-pick__soon {
    padding: 4px 10px; border-radius: 999px;
    background: var(--color-warm); color: var(--color-slate);
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ============================================================
   FLOATING WIDGET DOCK — WhatsApp · Live Chat · Back to Top
   Stacked bottom-right, newest action nearest the thumb.
   ============================================================ */
.dock {
    position: fixed; right: clamp(14px, 2.6vw, 26px); bottom: clamp(14px, 2.6vw, 26px); z-index: 880;
    display: flex; flex-direction: column; gap: 12px;
}
.dock__btn {
    position: relative;
    display: grid; place-items: center;
    width: 52px; height: 52px; border-radius: 50%;
    color: #fff; box-shadow: var(--shadow-3);
    transition: transform var(--t), background var(--t), box-shadow var(--t);
}
.dock__btn:hover { transform: translateY(-3px) scale(1.05); }
.dock__btn--wa   { background: #25D366; }
.dock__btn--wa:hover { background: #1EBE5A; }
.dock__btn--chat { background: var(--color-secondary); }
.dock__btn--chat:hover { background: var(--teal-deep); }
.dock__btn--top  { background: var(--color-primary); }
.dock__btn--top:hover { background: var(--primary-deep); }

/* Back-to-top only earns its place once there is something to go back to */
.dock__btn--top { opacity: 0; visibility: hidden; transform: translateY(10px) scale(.9); }
.dock__btn--top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Chat button swaps its glyph while the panel is open */
.dock__icon-close { display: none; }
.dock__btn--chat.is-open .dock__icon-open  { display: none; }
.dock__btn--chat.is-open .dock__icon-close { display: block; }

.dock__tip {
    position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(6px);
    padding: 7px 12px; border-radius: 7px; white-space: nowrap;
    background: var(--color-text); color: #fff;
    font-size: 12.5px; font-weight: 600;
    opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
}
.dock__tip::after {
    content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
    border: 5px solid transparent; border-left-color: var(--color-text);
}
.dock__btn:hover .dock__tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (hover: none) { .dock__tip { display: none; } }

/* ── Live chat panel ── */
.chat {
    position: fixed; right: clamp(14px, 2.6vw, 26px); bottom: calc(clamp(14px, 2.6vw, 26px) + 64px);
    z-index: 890; width: min(370px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 140px));
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 14px; box-shadow: var(--shadow-3);
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transform-origin: bottom right;
    transition: opacity 280ms var(--ease), transform 280ms var(--ease), visibility 280ms;
}
.chat.is-open { opacity: 1; visibility: visible; transform: none; }

.chat__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; background: var(--color-primary); color: #fff;
}
.chat__head-brand { display: flex; align-items: center; gap: 12px; }
.chat__avatar {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    background: color-mix(in srgb, #fff 16%, transparent); color: var(--color-accent);
}
.chat__title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.chat__status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: color-mix(in srgb, #fff 76%, transparent); }
.chat__dot { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; }
.chat__close { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: #fff; transition: background var(--t); }
.chat__close:hover { background: color-mix(in srgb, #fff 16%, transparent); }

.chat__body { padding: 18px; overflow-y: auto; }
.chat__bubble {
    padding: 13px 15px; border-radius: 4px 12px 12px 12px;
    background: var(--color-bg); border: 1px solid var(--line-soft);
    font-size: 13.5px; line-height: 1.6; color: var(--ink-70);
}
.chat__label { margin: 18px 0 9px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-55); }
.chat__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chat__chip {
    padding: 7px 13px; border-radius: 999px;
    border: 1px solid var(--line); font-size: 12.5px; font-weight: 500;
    transition: background var(--t), border-color var(--t), color var(--t);
}
.chat__chip:hover { background: var(--teal-tint); border-color: var(--color-secondary); color: var(--color-secondary); }

.chat__form { display: grid; gap: 9px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.chat__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.chat__form .input, .chat__text { padding: 10px 12px; font-size: 13.5px; }
.chat__text { min-height: 76px; }
.chat__form .btn { justify-self: start; }
.chat__wa {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 16px; padding: 11px; border-radius: var(--radius-button);
    background: color-mix(in srgb, #25D366 12%, transparent); color: #128C4A;
    font-size: 13px; font-weight: 600;
    transition: background var(--t);
}
.chat__wa:hover { background: color-mix(in srgb, #25D366 22%, transparent); }

/* ============================================================
   FOOTER — maroon, brand + link columns + contact, bottom legal bar
   ============================================================ */
.foot { background: var(--color-primary); color: #fff; }
.foot .crest { color: var(--color-primary); }
.foot__top { padding-block: clamp(44px, 6vw, 72px); }
.foot__grid { display: grid; gap: clamp(30px, 4vw, 44px); }
@media (min-width: 700px)  { .foot__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .foot__grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, .85fr)) minmax(0, 1.15fr); } }

.foot__blurb { margin-top: 18px; font-size: 14px; line-height: 1.75; color: color-mix(in srgb, #fff 72%, transparent); max-width: 34ch; }
.foot__socials { display: flex; gap: 9px; margin-top: 22px; }
.foot__socials a {
    display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid color-mix(in srgb, #fff 32%, transparent);
    color: color-mix(in srgb, #fff 86%, transparent);
    transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}
.foot__socials a:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-primary); transform: translateY(-2px); }

.foot__col-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.foot__list { display: grid; gap: 11px; font-size: 14px; }
.foot__list a { color: color-mix(in srgb, #fff 74%, transparent); transition: color var(--t), padding-left var(--t); }
.foot__list a:hover { color: var(--color-accent); padding-left: 4px; }

.foot__contact { display: grid; gap: 15px; font-size: 14px; color: color-mix(in srgb, #fff 76%, transparent); }
.foot__contact li { display: flex; gap: 11px; align-items: flex-start; }
.foot__contact .ico { color: var(--color-accent); margin-top: 3px; }
.foot__contact a:hover { color: var(--color-accent); }

.foot__bottom {
    display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between;
    padding-block: 20px;
    border-top: 1px solid color-mix(in srgb, #fff 16%, transparent);
    font-size: 13px; color: color-mix(in srgb, #fff 62%, transparent);
}
.foot__bottom nav { display: flex; gap: 12px; align-items: center; }
.foot__bottom a:hover { color: #fff; }

/* ============================================================
   RESPONSIVE — mobile-first corrections
   This site has no separate mobile build: one codebase, tuned at real device widths.
   Breakpoints below are ordered small → large.
   ============================================================ */

/* ── Touch input ──
   Pointer-coarse devices get 44px minimum targets (WCAG 2.5.5) regardless of the visual size of
   the glyph inside, and 16px form text so iOS Safari doesn't zoom the page on focus. */
@media (pointer: coarse) {
    .mast__icon, .modal__close, .chat__close, .foot__socials a, .quotes__btn {
        min-width: 44px; min-height: 44px;
    }
    .foot__socials { gap: 6px; }
    .input, .textarea, .select, .search-form__input, .chat__form .input, .chat__text {
        font-size: 16px;
    }
    .btn { padding-block: 14px; }          /* comfortable thumb height */
    .dock__btn { width: 56px; height: 56px; }
    /* Hover-only affordances never fire on touch, so show them outright */
    .life-card__text { max-height: 90px; }
    .shot__label { opacity: 1; transform: none; }
}

/* Kill the grey flash on tap, and stop double-tap zoom on controls */
a, button, [role="button"], input, select, textarea, label {
    -webkit-tap-highlight-color: transparent;
}
a, button, [role="button"] { touch-action: manipulation; }

/* Long unbroken strings (emails, URLs) must never push the layout sideways */
.foot__contact, .contact__value, .eventrow__title, .card__text, .chat__bubble {
    overflow-wrap: anywhere;
}

/* ── Notch / home-indicator safe areas ── */
.dock { bottom: max(clamp(14px, 2.6vw, 26px), env(safe-area-inset-bottom, 0px)); }
.chat { bottom: calc(max(clamp(14px, 2.6vw, 26px), env(safe-area-inset-bottom, 0px)) + 68px); }
.drawer__body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
.container { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
             padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

/* ── Phones (≤ 600px) ── */
@media (max-width: 600px) {
    :root { --mast-h: 64px; }

    body { font-size: 15.5px; }
    .display { line-height: 1.16; }
    .lede { font-size: .98rem; }

    .brand__name { font-size: 16px; }
    .brand__sub  { font-size: 9.5px; letter-spacing: .3em; }
    .crest { width: 32px; height: 36px; }

    /* Full-bleed sheet reads better than a floating card at this width */
    .chat {
        left: 0; right: 0; bottom: 0; width: 100%;
        max-height: min(86svh, 640px);
        border-radius: 16px 16px 0 0;
        transform: translateY(100%); transform-origin: bottom center;
    }
    .chat.is-open { transform: none; }
    .chat__body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
    .chat__row { grid-template-columns: 1fr; }

    .modal { padding: 14px; }
    .modal__box { padding: 24px 20px; }
    .search-form__input { font-size: 1rem; }

    .foot__bottom { justify-content: flex-start; }
}

/* ── Small phones (≤ 380px) ── */
@media (max-width: 380px) {
    .brand__sub { display: none; }
    .btn { padding-inline: 18px; font-size: 14px; }
    .dock { gap: 10px; }
    .dock__btn { width: 50px; height: 50px; }
}

/* ── Landscape phones: never let a banner eat the whole viewport ── */
@media (orientation: landscape) and (max-height: 520px) {
    .hero__stage { min-height: 100svh; }
    .chat { max-height: 88svh; }
    .drawer__body { padding-block: 8px 40px; }
}

/* ── Scroll reveal base state ── */
.js-reveal-ready [data-reveal],
.js-reveal-ready [data-reveal-group] > * { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    [data-reveal], [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
}

/* ── The footer on a phone ─────────────────────────────────────────────────
   The full footer is five stacked blocks — brand, blurb, three link columns,
   contact — which on a phone becomes the better part of a screen of maroon
   that somebody has to scroll past to reach the bottom of every page.

   On small screens it keeps the crest and the credit and drops the rest. The
   links are all in the header menu and the contact details are on the Contact
   page, so nothing here is the only way to reach anything. */
@media (max-width: 699px) {
    .foot__top { padding-block: 22px; }
    .foot__grid { gap: 0; }

    /* Every column except the brand. */
    .foot__col { display: none; }

    .foot__blurb,
    .foot__socials { display: none; }

    .foot__brand { margin: 0; }
    .foot__brand .crest { width: 44px; height: 44px; }

    .foot__bottom {
        justify-content: center; text-align: center;
        gap: 8px; padding-block: 16px;
        font-size: 12px; line-height: 1.55;
    }
    .foot__bottom nav { justify-content: center; }
}
