/* Surface polish + button shine tokens (cream vs white consistency).
 * Loaded first so any later .bg-white / .surface-card rules inherit the
 * canonical warm-tinted shadow + hairline border. */
@import url('surface-polish.css');

/*
 * public-design.css — editorial luxury design system for the public site.
 *
 * Same tokens as css/portal-login.css and css/booking-design.css. This file
 * extends those primitives with section-level patterns the marketing pages
 * need (hero, eyebrows, lede, stats, quote cards, two-column reveals,
 * service grids, testimonial cards, CTA blocks, FAQ accordions, footer).
 *
 * Scoped by body[data-public="1"] so the rules don't leak into the portals.
 *
 * Reference: Aman Resorts, Aesop, Le Labo. Quiet luxury. Generous whitespace.
 * Cormorant Garamond carries display. Inter for body. Sage spine + cream +
 * gold accent. Tasteful motion, never fussy.
 */

/* =========================================================================
   Tokens (mirror)
   ========================================================================= */
body[data-public="1"] {
    --sage-50:  #F2F4ED;
    --sage-100: #E3E8DA;
    --sage-200: #C7D1B5;
    --sage-300: #A7B594;
    --sage-400: #859673;
    --sage-500: #5E7259;
    --sage-600: #556855;
    --sage-700: #445344;
    --sage-800: #384438;
    --sage-900: #2F3830;
    --sage-950: #1A201B;

    --cream-50:  #FBFAF6;
    --cream-100: #F5F0E8;
    --cream-200: #E8DFD0;
    --cream-300: #D3C5AE;
    --cream-400: #B39C7B;

    --gold-400: #D2B48C;
    --gold-500: #C4A882;
    --gold-600: #A88B5E;

    --ease-soft:   cubic-bezier(0.22, 1, 0.36, 1);
    --ease-snappy: cubic-bezier(0.4, 0, 0.2, 1);

    --radius-card: 24px;
    --radius-pill: 999px;

    --shadow-soft: 0 30px 80px -20px rgba(20,28,22,0.18),
                   0 8px 24px -8px rgba(20,28,22,0.10);
}

body[data-public="1"] {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--sage-900);
    background: var(--cream-50);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body[data-public="1"] .serif {
    font-family: 'Cormorant Garamond', 'Times New Roman', serif;
    font-weight: 300;
    letter-spacing: -0.02em;
}

/* =========================================================================
   Section rhythm
   ========================================================================= */
body[data-public="1"] .pub-section {
    padding: clamp(64px, 9vw, 144px) clamp(20px, 4vw, 64px);
    position: relative;
}
body[data-public="1"] .pub-wrap {
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
}
body[data-public="1"] .pub-wrap--narrow { max-width: 880px; }
body[data-public="1"] .pub-wrap--reading { max-width: 720px; }

/* Section eyebrow + display title pattern */
body[data-public="1"] .pub-eyebrow {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--sage-500);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}
body[data-public="1"] .pub-eyebrow::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--sage-300);
}

body[data-public="1"] .pub-display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(36px, 5vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0;
    color: var(--sage-900);
}
body[data-public="1"] .pub-display em {
    font-style: italic;
    color: var(--gold-600);
}
body[data-public="1"] .pub-display-dark em { color: var(--gold-400); }

body[data-public="1"] .pub-lede {
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.65;
    color: var(--sage-700);
    opacity: 0.85;
    max-width: 60ch;
    margin: 28px 0 0;
}

/* Editorial divider with serif ornament */
body[data-public="1"] .pub-divider {
    margin: 56px auto;
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 420px;
    color: var(--gold-500);
    opacity: 0.75;
}
body[data-public="1"] .pub-divider::before,
body[data-public="1"] .pub-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.45;
}
body[data-public="1"] .pub-divider span {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 14px;
    letter-spacing: 0.04em;
}

/* =========================================================================
   Hero (homepage, about, services, etc.)
   ========================================================================= */
body[data-public="1"] .pub-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: var(--cream-50);
    min-height: clamp(520px, 70vh, 760px);
    display: flex;
    align-items: center;
}
body[data-public="1"] .pub-hero-photo {
    position: absolute; inset: -2%;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: pubDrift 42s var(--ease-soft) infinite alternate;
    z-index: -2;
}
@keyframes pubDrift {
    0%   { transform: scale(1.04) translate(0,0); }
    100% { transform: scale(1.10) translate(-1.2%, -0.8%); }
}

body[data-public="1"] .pub-hero-veil {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 14%, rgba(212,180,140,0.10), transparent 38%),
        linear-gradient(160deg, rgba(56,68,56,0.86) 0%, rgba(26,32,27,0.94) 100%);
    z-index: -1;
}

body[data-public="1"] .pub-hero-grain {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
    opacity: 0.42;
    mix-blend-mode: overlay;
    pointer-events: none;
}

/* Gold L-bracket corners — matches portal-login + booking */
body[data-public="1"] .pub-corner {
    position: absolute;
    width: 96px; height: 96px;
    color: var(--gold-400);
    opacity: 0.45;
    z-index: 2;
    pointer-events: none;
}
body[data-public="1"] .pub-corner svg {
    width: 100%; height: 100%;
    stroke: currentColor; fill: none; stroke-width: 1;
}
body[data-public="1"] .pub-corner.tl { top: 40px; left: 40px; }
body[data-public="1"] .pub-corner.br { bottom: 40px; right: 40px; transform: rotate(180deg); }
@media (max-width: 1023px) {
    body[data-public="1"] .pub-corner { display: none; }
}

body[data-public="1"] .pub-hero-inner {
    position: relative; z-index: 2;
    max-width: 980px;
    margin: 0 auto;
    padding: 96px 32px;
    text-align: center;
}
body[data-public="1"] .pub-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--cream-200);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    margin-bottom: 28px;
    opacity: 0.88;
}
body[data-public="1"] .pub-hero-eyebrow::before,
body[data-public="1"] .pub-hero-eyebrow::after {
    content: '';
    width: 32px;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
}
body[data-public="1"] .pub-hero-display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(44px, 7vw, 104px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
    color: var(--cream-50);
}
body[data-public="1"] .pub-hero-display em {
    font-style: italic;
    color: var(--gold-400);
}
body[data-public="1"] .pub-hero-lede {
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.55;
    max-width: 620px;
    margin: 0 auto;
    color: var(--cream-100);
    opacity: 0.92;
}
body[data-public="1"] .pub-hero-actions {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* =========================================================================
   Pill buttons (primary, ghost, light)
   ========================================================================= */
body[data-public="1"] .pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 36px;
    background: var(--sage-900);
    color: var(--cream-50);
    border: 0;
    border-radius: var(--radius-pill);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: transform 300ms var(--ease-soft),
                background 300ms var(--ease-soft),
                box-shadow 300ms var(--ease-soft),
                color 300ms var(--ease-soft);
}
body[data-public="1"] .pub-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(212,180,140,0.22) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 600ms var(--ease-soft);
}
body[data-public="1"] .pub-btn:hover {
    background: var(--sage-800);
    transform: translateY(-1px);
    box-shadow: 0 20px 40px -12px rgba(20,28,22,0.35);
}
body[data-public="1"] .pub-btn:hover::before { transform: translateX(100%); }
body[data-public="1"] .pub-btn .arrow {
    width: 16px; height: 16px;
    transition: transform 300ms var(--ease-soft);
}
body[data-public="1"] .pub-btn:hover .arrow { transform: translateX(4px); }

body[data-public="1"] .pub-btn--ghost {
    background: transparent;
    color: var(--cream-50);
    border: 1px solid rgba(255,255,255,0.4);
}
body[data-public="1"] .pub-btn--ghost:hover {
    background: rgba(255,255,255,0.10);
    color: var(--cream-50);
    border-color: rgba(255,255,255,0.6);
}

body[data-public="1"] .pub-btn--light {
    background: var(--cream-50);
    color: var(--sage-900);
    border: 1px solid var(--sage-200);
}
body[data-public="1"] .pub-btn--light:hover {
    background: #fff;
    color: var(--sage-900);
    border-color: var(--sage-400);
}

/* =========================================================================
   Service / feature cards — ghost border, hover lift
   ========================================================================= */
body[data-public="1"] .pub-card {
    background: #fff;
    border: 1px solid var(--sage-100);
    border-radius: var(--radius-card);
    padding: 36px 32px;
    transition: border-color 300ms var(--ease-soft),
                transform 300ms var(--ease-soft),
                box-shadow 300ms var(--ease-soft);
    position: relative;
    overflow: hidden;
}
body[data-public="1"] .pub-card:hover {
    border-color: var(--sage-300);
    transform: translateY(-3px);
    box-shadow: 0 22px 50px -18px rgba(20,28,22,0.18);
}
body[data-public="1"] .pub-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(22px, 2.3vw, 30px);
    line-height: 1.12;
    color: var(--sage-900);
    margin: 0 0 12px;
}
body[data-public="1"] .pub-card p {
    color: var(--sage-700);
    opacity: 0.82;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}
body[data-public="1"] .pub-card .pub-card-price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 18px;
    color: var(--sage-700);
    font-size: 13px;
    letter-spacing: 0.08em;
}
body[data-public="1"] .pub-card .pub-card-price strong {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 500;
    color: var(--sage-900);
    letter-spacing: -0.01em;
}

/* Card cluster (services, features) */
body[data-public="1"] .pub-grid {
    display: grid;
    gap: clamp(16px, 1.8vw, 28px);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
body[data-public="1"] .pub-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
    body[data-public="1"] .pub-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
   Stats row (Cormorant numerals, refined)
   ========================================================================= */
body[data-public="1"] .pub-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    text-align: center;
}
@media (min-width: 768px) {
    body[data-public="1"] .pub-stats { grid-template-columns: repeat(4, 1fr); }
}
body[data-public="1"] .pub-stats dt {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--sage-900);
}
body[data-public="1"] .pub-stats dt small {
    font-size: 0.5em;
    margin-left: 2px;
    color: var(--gold-600);
}
body[data-public="1"] .pub-stats dd {
    margin: 12px 0 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--sage-600);
    font-weight: 600;
}

/* =========================================================================
   Quote / testimonial card
   ========================================================================= */
body[data-public="1"] .pub-quote {
    background: #fff;
    border: 1px solid var(--sage-100);
    border-radius: var(--radius-card);
    padding: clamp(28px, 4vw, 56px);
    position: relative;
}
body[data-public="1"] .pub-quote::before {
    content: '\201C';
    font-family: 'Cormorant Garamond', serif;
    font-size: 120px;
    font-weight: 300;
    line-height: 1;
    color: var(--gold-400);
    opacity: 0.4;
    position: absolute;
    top: 14px;
    left: 24px;
}
body[data-public="1"] .pub-quote blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.45;
    color: var(--sage-900);
    margin: 0 0 24px;
    position: relative;
    z-index: 1;
}
body[data-public="1"] .pub-quote .pub-quote-stars {
    color: var(--gold-500);
    letter-spacing: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}
body[data-public="1"] .pub-quote figcaption {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--sage-600);
}

/* =========================================================================
   Process steps (numbered, refined)
   ========================================================================= */
body[data-public="1"] .pub-steps {
    display: grid;
    gap: clamp(20px, 2vw, 32px);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
body[data-public="1"] .pub-step {
    text-align: left;
}
body[data-public="1"] .pub-step-num {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 56px;
    line-height: 1;
    color: var(--gold-500);
    margin-bottom: 16px;
}
body[data-public="1"] .pub-step h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 24px;
    color: var(--sage-900);
    margin: 0 0 10px;
}
body[data-public="1"] .pub-step p {
    color: var(--sage-700);
    opacity: 0.82;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
}

/* =========================================================================
   FAQ accordion
   ========================================================================= */
body[data-public="1"] .pub-faq-item {
    border-bottom: 1px solid var(--sage-100);
}
body[data-public="1"] .pub-faq-q {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    background: transparent;
    border: 0;
    padding: 28px 0;
    cursor: pointer;
    text-align: left;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 300;
    color: var(--sage-900);
    line-height: 1.25;
    transition: color 200ms var(--ease-soft);
}
body[data-public="1"] .pub-faq-q:hover { color: var(--sage-700); }
body[data-public="1"] .pub-faq-q .pub-faq-mark {
    color: var(--gold-500);
    font-size: 20px;
    font-family: 'Cormorant Garamond', serif;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 4px;
    transition: transform 300ms var(--ease-soft);
}
body[data-public="1"] .pub-faq-item.is-open .pub-faq-mark { transform: rotate(45deg); }
body[data-public="1"] .pub-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms var(--ease-soft);
}
body[data-public="1"] .pub-faq-item.is-open .pub-faq-a { max-height: 800px; }
body[data-public="1"] .pub-faq-a p {
    margin: 0 0 28px;
    color: var(--sage-700);
    font-size: 15.5px;
    line-height: 1.7;
    opacity: 0.88;
}

/* =========================================================================
   CTA block (dark sage with gold accent)
   ========================================================================= */
body[data-public="1"] .pub-cta-band {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: var(--cream-50);
    background:
        radial-gradient(circle at 14% 18%, rgba(212,180,140,0.12), transparent 36%),
        linear-gradient(160deg, var(--sage-800) 0%, var(--sage-950) 100%);
    padding: clamp(64px, 9vw, 120px) 32px;
    text-align: center;
}
body[data-public="1"] .pub-cta-band .pub-display { color: var(--cream-50); }
body[data-public="1"] .pub-cta-band .pub-display em { color: var(--gold-400); }
body[data-public="1"] .pub-cta-band .pub-lede { color: var(--cream-200); opacity: 0.9; max-width: 56ch; margin-left: auto; margin-right: auto; }

/* =========================================================================
   Forms (contact, lead capture) — ghost-bottom-border like portal-login
   ========================================================================= */
body[data-public="1"] .pub-field {
    position: relative;
    margin-bottom: 28px;
}
body[data-public="1"] .pub-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--sage-600);
    margin-bottom: 10px;
}
body[data-public="1"] .pub-field input,
body[data-public="1"] .pub-field textarea,
body[data-public="1"] .pub-field select {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--sage-200);
    padding: 10px 0 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--sage-900);
    border-radius: 0;
    transition: border-color 200ms var(--ease-soft);
}
body[data-public="1"] .pub-field input::placeholder,
body[data-public="1"] .pub-field textarea::placeholder {
    color: var(--sage-300);
}
body[data-public="1"] .pub-field input:hover,
body[data-public="1"] .pub-field textarea:hover,
body[data-public="1"] .pub-field select:hover {
    border-bottom-color: var(--sage-400);
}
body[data-public="1"] .pub-field input:focus,
body[data-public="1"] .pub-field textarea:focus,
body[data-public="1"] .pub-field select:focus {
    outline: none;
    border-bottom-color: var(--sage-700);
    box-shadow: 0 1px 0 0 var(--sage-700);
}

/* =========================================================================
   Image-text two-col
   ========================================================================= */
body[data-public="1"] .pub-split {
    display: grid;
    gap: clamp(32px, 4vw, 72px);
    align-items: center;
    grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
    body[data-public="1"] .pub-split { grid-template-columns: 1fr 1fr; }
    body[data-public="1"] .pub-split--imgleft .pub-split-img { order: -1; }
}
body[data-public="1"] .pub-split-img {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 4 / 5;
}
body[data-public="1"] .pub-split-img img,
body[data-public="1"] .pub-split-img > div {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* =========================================================================
   Motion — staggered reveal (Apple-style restraint)
   ========================================================================= */
body[data-public="1"] .pub-reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: pubReveal 900ms var(--ease-soft) forwards;
}
body[data-public="1"] .pub-reveal[data-delay="1"]  { animation-delay: 80ms; }
body[data-public="1"] .pub-reveal[data-delay="2"]  { animation-delay: 160ms; }
body[data-public="1"] .pub-reveal[data-delay="3"]  { animation-delay: 240ms; }
body[data-public="1"] .pub-reveal[data-delay="4"]  { animation-delay: 320ms; }
body[data-public="1"] .pub-reveal[data-delay="5"]  { animation-delay: 400ms; }
body[data-public="1"] .pub-reveal[data-delay="6"]  { animation-delay: 480ms; }
@keyframes pubReveal { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    body[data-public="1"] .pub-reveal { animation: none !important; opacity: 1; transform: none; }
    body[data-public="1"] .pub-hero-photo { animation: none !important; }
}

/* =========================================================================
   Footer (refined)
   ========================================================================= */
body[data-public="1"] .pub-foot {
    background: var(--sage-950);
    color: var(--cream-200);
    padding: clamp(64px, 8vw, 120px) clamp(20px, 4vw, 64px) 32px;
}
body[data-public="1"] .pub-foot a { color: var(--cream-200); text-decoration: none; transition: color 200ms; }
body[data-public="1"] .pub-foot a:hover { color: var(--gold-400); }
body[data-public="1"] .pub-foot h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 18px;
    color: var(--cream-50);
    margin: 0 0 18px;
    letter-spacing: 0.01em;
}
body[data-public="1"] .pub-foot ul { list-style: none; padding: 0; margin: 0; }
body[data-public="1"] .pub-foot li { margin-bottom: 10px; font-size: 14px; opacity: 0.85; }
body[data-public="1"] .pub-foot .pub-foot-meta {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(212,180,140,0.18);
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 16px;
    font-size: 12px; letter-spacing: 0.08em;
    color: var(--cream-300); opacity: 0.7;
}

/* ==========================================================================
   Accessibility / contrast patches for public site.
   ========================================================================== */

/* Nav links + body copy that uses Tailwind warm-300/400/500/600 on white
   fail WCAG AA (3.31:1 ratio, needs 4.5). Override to warm-800 (~9:1).
   This is the same fix applied in css/a11y.css for the admin/customer
   portals; duplicated here because public pages don't include a11y.css. */
.text-warm-300,
.text-warm-400,
.text-warm-500,
.text-warm-600 {
    color: #5C5347 !important;
}

/* Promo bar (top-of-page "$50 off" banner).
   index.php applies `class="promo-bar text-white ..."` but no rule defined
   `.promo-bar` background, so the white text rendered on the cream page
   background (~1.04 contrast = invisible). Dark sage matches the theme. */
.promo-bar {
    background-color: #2F3830;
    color: #ffffff;
}
.promo-bar a {
    color: #ffffff;
}
.promo-bar a:hover {
    color: #EDE5DB;
}
.promo-bar button[aria-label="Close"] {
    color: rgba(255, 255, 255, 0.85);
}
.promo-bar button[aria-label="Close"]:hover {
    color: #ffffff;
}

/* ==========================================================================
   Contrast regression patches (2026-06-02 wave 2).
   ========================================================================== */

/* The blanket .text-warm-300/400/500/600 -> #5C5347 override above is correct
   on light backgrounds (the nav, hero badges, body copy) but renders dark-on-
   dark inside the footer (.pub-foot bg = --sage-950 = #1A201B) and any other
   dark section. Re-light the warm text whenever it lives inside a dark
   container so it stays readable instead of disappearing. */
.pub-foot .text-warm-300,
.pub-foot .text-warm-400,
.pub-foot .text-warm-500,
.pub-foot .text-warm-600,
[class*="bg-warm-7"] .text-warm-300,
[class*="bg-warm-7"] .text-warm-400,
[class*="bg-warm-7"] .text-warm-500,
[class*="bg-warm-7"] .text-warm-600,
[class*="bg-warm-8"] .text-warm-300,
[class*="bg-warm-8"] .text-warm-400,
[class*="bg-warm-8"] .text-warm-500,
[class*="bg-warm-8"] .text-warm-600,
[class*="bg-warm-9"] .text-warm-300,
[class*="bg-warm-9"] .text-warm-400,
[class*="bg-warm-9"] .text-warm-500,
[class*="bg-warm-9"] .text-warm-600,
[class*="bg-sage-7"] .text-warm-300,
[class*="bg-sage-7"] .text-warm-400,
[class*="bg-sage-7"] .text-warm-500,
[class*="bg-sage-7"] .text-warm-600,
[class*="bg-sage-8"] .text-warm-300,
[class*="bg-sage-8"] .text-warm-400,
[class*="bg-sage-8"] .text-warm-500,
[class*="bg-sage-8"] .text-warm-600,
[class*="bg-sage-9"] .text-warm-300,
[class*="bg-sage-9"] .text-warm-400,
[class*="bg-sage-9"] .text-warm-500,
[class*="bg-sage-9"] .text-warm-600 {
    color: #EDE5DB !important; /* warm-200 — light tan readable on dark bg */
}

/* `.pub-hero-display` ships without a default color. On dark hero sections
   (luxury-brand style) it inherits cream from a parent — fine. On commercial-
   quote.php and several other pages it sits on the cream page background and
   inherits cream too, rendering ~1:1 contrast (the heading is invisible; only
   the gold <em> shows). Set an explicit dark-sage default so light-bg heroes
   stay readable; dark heroes can opt back in via .pub-display-dark. */
body[data-public="1"] .pub-hero-display {
    color: #2F3830;
}
body[data-public="1"] .pub-hero-display.pub-display-dark,
body[data-public="1"] .pub-display-dark .pub-hero-display,
body[data-public="1"] [class*="bg-sage-9"] .pub-hero-display,
body[data-public="1"] [class*="bg-sage-8"] .pub-hero-display,
body[data-public="1"] [class*="bg-warm-9"] .pub-hero-display,
body[data-public="1"] [class*="bg-warm-8"] .pub-hero-display,
/* Photo heroes carry a dark veil, so their headline must be light (fixes dark-on-dark
   first line on commercial-quote / location / reviews — wow-pass 2026-07-21). */
body[data-public="1"] .pub-hero .pub-hero-display,
body[data-public="1"] .pub-hero-inner .pub-hero-display {
    color: var(--cream-50);
}

/* ==========================================================================
   Wave-3 contrast patches (2026-06-02).
   Covers gaps that the wave-2 'descendant' selectors missed and a batch of
   pre-existing site-wide failures the cross-page Playwright audit surfaced.
   ========================================================================== */

/* Wave-2 used `[class*="bg-warm-9"] .text-warm-400` (descendant), but the
   site's <footer> uses both classes on the SAME element:
       <footer class="bg-warm-900 text-warm-400 py-20">
   so the descendant selector did not match. Children of the footer that
   omit text-warm-* inherit color from the footer element, which the blanket
   `.text-warm-400 { color: #5C5347 !important }` had darkened to dark-on-
   dark. Match the same-element compound classes here so the warm text
   stays light (#EDE5DB) on dark containers. */
[class*="bg-warm-7"].text-warm-300,
[class*="bg-warm-7"].text-warm-400,
[class*="bg-warm-7"].text-warm-500,
[class*="bg-warm-7"].text-warm-600,
[class*="bg-warm-8"].text-warm-300,
[class*="bg-warm-8"].text-warm-400,
[class*="bg-warm-8"].text-warm-500,
[class*="bg-warm-8"].text-warm-600,
[class*="bg-warm-9"].text-warm-300,
[class*="bg-warm-9"].text-warm-400,
[class*="bg-warm-9"].text-warm-500,
[class*="bg-warm-9"].text-warm-600,
[class*="bg-sage-7"].text-warm-300,
[class*="bg-sage-7"].text-warm-400,
[class*="bg-sage-7"].text-warm-500,
[class*="bg-sage-7"].text-warm-600,
[class*="bg-sage-8"].text-warm-300,
[class*="bg-sage-8"].text-warm-400,
[class*="bg-sage-8"].text-warm-500,
[class*="bg-sage-8"].text-warm-600,
[class*="bg-sage-9"].text-warm-300,
[class*="bg-sage-9"].text-warm-400,
[class*="bg-sage-9"].text-warm-500,
[class*="bg-sage-9"].text-warm-600 {
    color: #EDE5DB !important;
}

/* Cross-page audit surfaced pre-existing failures from these Tailwind shades
   used on light (cream / white) backgrounds:
   - text-warm-100 (#F5F0EB), text-warm-200 (#EDE5DB)  -> 1.09 - 1.26 ratio
   - text-gray-300 (#D1D5DB), text-gray-400 (#9CA3AF) -> 2.34 ratio
   - text-gray-500 (#6B7280) -> 4.6 borderline (OK on white, fails on cream)
   - text-red-400 (#F87171)  -> 3.31 ratio
   Boost each to an AA-passing tone but keep the visual hierarchy (red stays
   red, gray stays gray, warm stays warm). */
.text-warm-100,
.text-warm-200 {
    color: #5C5347 !important; /* warm-800, ~9:1 on white/cream */
}
.text-gray-300,
.text-gray-400 {
    color: #4B5563 !important; /* gray-600, ~7:1 on white */
}
.text-gray-500 {
    color: #374151 !important; /* gray-700, ~9:1 on white */
}
.text-red-400 {
    color: #B91C1C !important; /* red-700, ~6.3:1 on white */
}

/* Reverse the same dark-section escape for the gray / red shades when they
   sit on a dark background (rare on this site but possible in admin embeds
   pulled into public pages). */
[class*="bg-warm-7"] .text-gray-300, [class*="bg-warm-7"] .text-gray-400, [class*="bg-warm-7"] .text-gray-500,
[class*="bg-warm-8"] .text-gray-300, [class*="bg-warm-8"] .text-gray-400, [class*="bg-warm-8"] .text-gray-500,
[class*="bg-warm-9"] .text-gray-300, [class*="bg-warm-9"] .text-gray-400, [class*="bg-warm-9"] .text-gray-500,
[class*="bg-sage-7"] .text-gray-300, [class*="bg-sage-7"] .text-gray-400, [class*="bg-sage-7"] .text-gray-500,
[class*="bg-sage-8"] .text-gray-300, [class*="bg-sage-8"] .text-gray-400, [class*="bg-sage-8"] .text-gray-500,
[class*="bg-sage-9"] .text-gray-300, [class*="bg-sage-9"] .text-gray-400, [class*="bg-sage-9"] .text-gray-500,
.pub-foot .text-gray-300, .pub-foot .text-gray-400, .pub-foot .text-gray-500 {
    color: #E5E7EB !important; /* gray-200, light for dark bg */
}

/* ==========================================================================
   A11y (2026-07-20) — visible keyboard focus indicator for public pages.
   public-design.css loads on index + all /locations/ pages, which do NOT
   include css/a11y.css. Without this, keyboard users had no visible focus
   ring on location landing pages (WCAG 2.4.7 Focus Visible — a common ADA
   demand-letter citation). #556855 = 4.5:1 vs white; 3:1 non-text contrast.
   ========================================================================== */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #556855 !important;
    outline-offset: 2px;
    border-radius: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-offset: 0;
    box-shadow: 0 0 0 3px rgba(85, 104, 85, 0.25);
}

/* ===== THE INSTANT NUMBER — signature price seal (masterpiece 2026-07-21) ===== */
.qc-number {
    font-size: clamp(3rem, 2rem + 6vw, 5.25rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums lining-nums;
    transition: opacity 180ms cubic-bezier(0.16,1,0.3,1), transform 180ms cubic-bezier(0.16,1,0.3,1);
    will-change: opacity, transform;
}
.qc-number.is-updating { opacity: 0; transform: translateY(0.18em); }
.qc-utah { transition: opacity 220ms ease; }
.qc-utah.is-updating { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .qc-number, .qc-number.is-updating, .qc-utah, .qc-utah.is-updating { transition: none; opacity: 1; transform: none; }
}

/* ===== Hero legibility hardening (masterpiece 2026-07-21, B4/B6) =====
   Guarantee readable hero text over any image brightness. Deepen the veil floor
   and add a subtle text-shadow so cream headings never wash out where a bright
   photo bleeds through (commercial office hero + light location images). */
body[data-public="1"] .pub-hero-veil {
    background:
        radial-gradient(circle at 20% 14%, rgba(212,180,140,0.08), transparent 40%),
        linear-gradient(160deg, rgba(38,46,38,0.90) 0%, rgba(20,26,21,0.96) 100%);
}
body[data-public="1"] .pub-hero-display,
body[data-public="1"] .pub-hero-lede,
body[data-public="1"] .pub-hero-eyebrow {
    text-shadow: 0 1px 2px rgba(15,20,15,0.45), 0 2px 18px rgba(15,20,15,0.30);
}

/* ============================================================
   FRONTIER (masterpiece 2026-07-21, Ben-approved ≤3)
   ============================================================ */

/* 1) THE CLEAN SWEEP — a light gleam passes across the Instant Number
   each time it settles on a new price (the gleam of a just-cleaned surface). */
.qc-number { position: relative; overflow: hidden; }
.qc-number.gleam::after {
    content: ''; position: absolute; inset: -10% -8%;
    background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.42) 50%, transparent 58%);
    transform: translateX(-120%); pointer-events: none;
    animation: qcGleam 0.7s cubic-bezier(0.16,1,0.3,1);
}
@keyframes qcGleam { to { transform: translateX(120%); } }

/* 3) NEXT-AVAILABLE pulse (honest, real slot data) */
.qc-avail { display: inline-flex; align-items: center; gap: 0.45rem; }
.qc-avail .dot {
    width: 7px; height: 7px; border-radius: 999px; background: #8FBF7F;
    box-shadow: 0 0 0 0 rgba(143,191,127,0.7); animation: qcPulse 2.4s ease-out infinite;
}
@keyframes qcPulse {
    0% { box-shadow: 0 0 0 0 rgba(143,191,127,0.55); }
    70% { box-shadow: 0 0 0 7px rgba(143,191,127,0); }
    100% { box-shadow: 0 0 0 0 rgba(143,191,127,0); }
}

/* 2) THE DESCALE — a hard-water-spotted surface wipes clean on scroll.
   No new photos: a filter+overlay "grime" layer that recedes when in view. */
.descale { position: relative; overflow: hidden; border-radius: 24px; }
.descale img { display: block; width: 100%; height: 100%; object-fit: cover; }
.descale__grime {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 22% 30%, rgba(120,110,90,0.42) 0 3px, transparent 4px),
        radial-gradient(circle at 61% 52%, rgba(120,110,90,0.36) 0 2px, transparent 3px),
        radial-gradient(circle at 40% 74%, rgba(120,110,90,0.40) 0 3px, transparent 4px),
        linear-gradient(180deg, rgba(140,130,110,0.40), rgba(120,112,96,0.54));
    backdrop-filter: saturate(0.6) contrast(0.92) brightness(0.9);
    -webkit-backdrop-filter: saturate(0.6) contrast(0.92) brightness(0.9);
    clip-path: inset(0 0 0 0);
    transition: clip-path 1100ms cubic-bezier(0.22,1,0.36,1), opacity 900ms ease;
}
.descale.is-clean .descale__grime { clip-path: inset(0 0 100% 0); opacity: 0; }
.descale__squeegee {
    position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
    opacity: 0; transition: top 1100ms cubic-bezier(0.22,1,0.36,1), opacity 300ms ease;
}
.descale.is-clean .descale__squeegee { top: 100%; opacity: 1; }
.descale__label {
    position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
    font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
@media (prefers-reduced-motion: reduce) {
    .qc-number.gleam::after { display: none; }
    .qc-avail .dot { animation: none; }
    .descale__grime { transition: none; clip-path: inset(0 0 100% 0); opacity: 0; }
    .descale__squeegee { display: none; }
}

/* Carousel dot tap targets ≥24px (masterpiece 2026-07-21): expand the hit area
   with a transparent overlay without enlarging the small visual dot. */
#reviewsDots button, #testDots button { position: relative; }
#reviewsDots button::after, #testDots button::after {
    content: ''; position: absolute; inset: -9px; /* 8px dot + 18px = 26px tap zone */
}

/* ===== wow-pass mobile-chrome fixes (2026-07-21) ===== */
/* 1) Content clears the fixed booking bar on phones (was clipping the guarantee
   card / cookie text at 360px). Scoped to pages that actually render the bar. */
@media (max-width: 640px) {
  body:has(#stickyBar) { padding-bottom: 76px; }
}
/* 2) Upgrade 100vh heroes to the SMALL viewport unit on capable browsers so iOS
   Safari's URL bar can't mis-size them (progressive; falls back to 100vh). */
@supports (min-height: 100svh) {
  .min-h-screen { min-height: 100svh; }
  body[data-public="1"] .pub-hero { min-height: 100svh; }
}
