/* ============================================================
   Charein's Fascial Healing — styles
   Palette: warm ivory, deep sage, charcoal
   ============================================================ */

:root {
    --ivory: #f6f3ee;
    --ivory-deep: #eee9e0;
    --sage: #3f6b48;
    --sage-dark: #33573a;
    --charcoal: #2c2a26;
    --stone: #6d685c;
    --line: #ddd6c8;
    --white: #ffffff;
    --taken-bg: #fbeae6;
    --taken-border: #eccec6;
    --taken-text: #b0665a;
    --radius: 14px;
    --shadow: 0 4px 24px rgba(44, 42, 38, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--charcoal);
    background: var(--ivory);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    line-height: 1.2;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--sage);
    color: var(--white);
    text-decoration: none;
    border: none;
    border-radius: 99px;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: var(--sage-dark); transform: translateY(-1px); }
.btn-small { padding: 9px 20px; font-size: 0.9rem; }
.btn-large { padding: 15px 34px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 243, 238, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}
.brand {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--charcoal);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(160deg, #4a5d4e 0%, #33573a 55%, #2a4530 100%);
    background-size: cover;
    background-position: center 30%;
    color: var(--white);
    text-align: center;
    padding: 96px 0 104px;
}
.hero-inner { max-width: 720px; }
.hero h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.7rem);
    margin-bottom: 18px;
}
.hero.has-photo h1,
.hero.has-photo .hero-sub {
    text-shadow: 0 1px 12px rgba(20, 18, 14, 0.45);
}
.hero-sub {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 300;
    opacity: 0.92;
    margin-bottom: 34px;
}

/* ---------- Intro / benefits ---------- */
.intro { padding: 64px 0 56px; }
.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}
.benefit h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--sage-dark); }
.benefit p { font-size: 0.95rem; color: var(--stone); }
.guide {
    background: var(--white);
    border-left: 4px solid var(--sage);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow);
    padding: 22px 26px;
    max-width: 680px;
    margin: 0 auto;
    font-size: 1rem;
}

/* ---------- Booking ---------- */
.booking {
    background: var(--white);
    padding: 64px 0 72px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.booking h2, .contact h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    text-align: center;
    margin-bottom: 30px;
}
.price-card {
    background: var(--ivory);
    border-radius: var(--radius);
    padding: 24px 28px;
    text-align: center;
    max-width: 460px;
    margin: 0 auto 40px;
}
.price-line {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.price-now {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--sage-dark);
}
.price-was {
    font-size: 1.3rem;
    color: var(--stone);
    text-decoration: line-through;
}
.price-len { font-size: 1rem; color: var(--stone); }
.price-note { font-size: 0.88rem; color: var(--stone); margin-top: 8px; }

#booking-app { max-width: 560px; margin: 0 auto; }
.step { margin-bottom: 30px; }
.step h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    margin-bottom: 12px;
    font-weight: 600;
}
.hidden { display: none !important; }
.loading { color: var(--stone); font-size: 0.95rem; display: block; padding: 20px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
    padding: 10px 18px;
    border: 1.5px solid var(--line);
    border-radius: 99px;
    background: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover:not(:disabled) { border-color: var(--sage); }
.chip.selected {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--white);
    font-weight: 500;
}
.chip.taken {
    background: var(--taken-bg);
    border-color: var(--taken-border);
    color: var(--taken-text);
    text-decoration: line-through;
    cursor: default;
}

/* ---------- Calendar ---------- */
.cal {
    background: var(--ivory);
    border-radius: var(--radius);
    padding: 18px;
    touch-action: pan-y;
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.cal-month-label {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
}
.cal-nav {
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--charcoal);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, opacity 0.15s;
}
.cal-nav:hover:not(:disabled) { border-color: var(--sage); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }

.cal-weekdays,
.cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
.cal-weekdays {
    margin-bottom: 8px;
    text-align: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone);
    font-weight: 600;
}
.cal-week { margin-bottom: 6px; }

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.15s;
}
.cal-day:hover:not(:disabled):not(.empty) { border-color: var(--sage); }
.cal-day.empty {
    background: transparent;
    cursor: default;
}
.cal-day.disabled {
    background: transparent;
    color: #c7c1b3;
    cursor: default;
}
.cal-day.fully-booked {
    background: var(--taken-bg);
    border-color: var(--taken-border);
    color: var(--taken-text);
}
.cal-day.is-today:not(.selected) { border-color: var(--stone); }
.cal-day.selected {
    background: var(--sage);
    border-color: var(--sage);
    color: var(--white);
    font-weight: 600;
}

/* Legend under the calendar */
.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 14px;
    font-size: 0.78rem;
    color: var(--stone);
}
.cal-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cal-legend i {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    display: inline-block;
}
.cal-legend .sw-open { background: var(--white); border: 1.5px solid var(--line); }
.cal-legend .sw-taken { background: var(--taken-bg); border: 1.5px solid var(--taken-border); }

.cal-time-panel {
    background: var(--white);
    border-radius: 10px;
    padding: 14px;
    margin: -2px 0 12px;
}
.cal-time-label {
    font-size: 0.85rem;
    color: var(--stone);
    margin-bottom: 10px;
}
.cal-empty {
    text-align: center;
    color: var(--stone);
    font-size: 0.9rem;
    margin-top: 10px;
}

.selected-slot {
    background: var(--ivory);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    margin-bottom: 18px;
}

#step-details label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--charcoal);
}
#step-details input[type="text"],
#step-details input[type="tel"],
#step-details input[type="email"] {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 13px 14px;
    font-family: inherit;
    font-size: 1rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--charcoal);
}
#step-details input:focus {
    outline: none;
    border-color: var(--sage);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.pay-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.pay-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.pay-option:has(input:checked) {
    border-color: var(--sage);
    background: #f2f6f2;
}
.pay-option input { accent-color: var(--sage); width: 18px; height: 18px; }
.pay-option span { display: flex; flex-direction: column; line-height: 1.35; }
.pay-option small { color: var(--stone); font-size: 0.82rem; }

#submit-btn { width: 100%; }
#submit-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.form-error {
    background: #fbe4e0;
    color: #a33d2e;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.92rem;
    margin-bottom: 16px;
}
.fine-print {
    font-size: 0.82rem;
    color: var(--stone);
    text-align: center;
    margin-top: 14px;
}
.success {
    text-align: center;
    background: var(--ivory);
    border-radius: var(--radius);
    padding: 40px 24px;
}
.success h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--sage-dark); }

.no-pressure {
    text-align: center;
    font-size: 0.9rem;
    color: var(--stone);
    font-style: italic;
    margin-top: 34px;
}

/* ---------- Contact ---------- */
.contact { padding: 64px 0 72px; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 36px;
    align-items: start;
}
.contact-item { margin-bottom: 16px; font-size: 1.02rem; }
.contact-item .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    font-weight: 600;
}
.contact-item a { color: var(--sage-dark); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }
.btn-insta {
    background: var(--charcoal);
    padding: 12px 22px;
    font-size: 0.95rem;
    margin-top: 8px;
}
.btn-insta:hover { background: #444038; }
.support-photo {
    display: block;
    width: 100%;
    max-width: 340px;
    border-radius: var(--radius);
    margin-top: 26px;
    box-shadow: var(--shadow);
}
.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--ivory-deep);
}
.map-wrap iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 90px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--stone);
}

/* ---------- Sticky mobile book bar ---------- */
.sticky-book {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(246, 243, 238, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    display: none;
}
.sticky-book .btn { width: 100%; }
.sticky-book.visible { display: block; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
    .hero { padding: 72px 0 80px; }
    .benefits { grid-template-columns: 1fr; gap: 22px; }
    .contact-grid { grid-template-columns: 1fr; }
    .map-wrap iframe { height: 300px; }
    .header-inner .btn { display: none; } /* sticky bar takes over on mobile */
}
@media (min-width: 761px) {
    .site-footer { padding-bottom: 26px; }
    .sticky-book { display: none !important; } /* header button covers desktop */
}
