/* =====================================================================
   Level Health — shared styles for subpages (book, privacy, terms, hipaa, disclaimer)
   The homepage (index.html) retains its own inlined stylesheet.
   ===================================================================== */

/* ----- Reset & root ----- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
:root {
    --bg-primary: #1c2333;
    --bg-dark: #151b28;
    --bg-card: #1e2840;
    --gold: #c9a84c;
    --gold-grad: linear-gradient(135deg, #d4a843, #b8860b, #c9952a);
    --white: #ffffff;
    --muted: #a4b3c6;
    --transition: all 0.4s ease-in-out;
}
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--white);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; font-weight: 600; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.4rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bg-dark { background: var(--bg-dark); }
.section-heading {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ----- Navbar ----- */
.navbar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.navbar.scrolled {
    background: rgba(21, 27, 40, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(201, 168, 76, 0.45);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    transition: height 0.4s ease;
}
.navbar.scrolled .container { height: 60px; }
.nav-logo { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo img {
    height: 52px;
    width: auto;
    display: block;
    mix-blend-mode: lighten;
    transition: height 0.4s ease;
}
.navbar.scrolled .nav-logo img { height: 40px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.nav-links li { list-style: none; }
.nav-links a {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    transition: color 0.4s ease;
    white-space: nowrap;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 1.5px;
    background: var(--gold);
    transition: width 0.4s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    padding: 10px 22px;
    border: 1.5px solid var(--gold);
    border-radius: 50px;
    color: var(--gold) !important;
    background: transparent;
    transition: var(--transition);
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--gold); color: var(--bg-dark) !important; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none; border: none;
    padding: 4px; z-index: 1001;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21, 27, 40, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--white);
    transition: color 0.3s ease;
}
.mobile-nav a:hover { color: var(--gold); }

/* ----- Page hero (subpage title block) ----- */
.page-hero {
    padding: 140px 0 60px;
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}
.page-hero .container { text-align: center; }
.page-hero h1 {
    font-size: clamp(2.2rem, 4.4vw, 3.4rem);
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 auto 0.8rem;
}
.page-hero .updated {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ----- Long-form content (legal pages) ----- */
.content-section { padding: 72px 0 96px; }
.content-section .container { max-width: 820px; }
.content-section h2 {
    font-size: 1.6rem;
    color: var(--gold);
    margin: 2.6rem 0 1rem;
    letter-spacing: -0.01em;
}
.content-section h2:first-of-type { margin-top: 0; }
.content-section h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin: 1.6rem 0 0.6rem;
}
.content-section p {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}
.content-section ul, .content-section ol {
    color: var(--muted);
    margin-bottom: 1.2rem;
    line-height: 1.8;
}
.content-section li { margin-bottom: 0.5rem; }
.content-section a { color: var(--gold); border-bottom: 1px solid rgba(201, 168, 76, 0.4); transition: border-color 0.3s ease; }
.content-section a:hover { border-bottom-color: var(--gold); }
.content-section strong { color: var(--white); font-weight: 600; }
.content-section .callout {
    border-left: 2px solid var(--gold);
    background: rgba(201, 168, 76, 0.05);
    padding: 18px 22px;
    margin: 1.4rem 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.75;
}
.content-section .callout strong { color: var(--gold); }
.toc {
    background: var(--bg-card);
    border-top: 3px solid var(--gold);
    padding: 24px 28px;
    margin-bottom: 2.4rem;
}
.toc h4 {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.toc ol { padding-left: 1.2rem; margin: 0; }
.toc li { color: var(--muted); margin-bottom: 4px; }
.toc a { color: var(--muted); border: none; transition: color 0.3s ease; }
.toc a:hover { color: var(--gold); }

/* ----- Buttons ----- */
.btn-gold {
    display: inline-block;
    padding: 15px 36px;
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
}
.btn-outline {
    display: inline-block;
    padding: 15px 36px;
    background: transparent;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 50px;
    border: 1.5px solid var(--gold);
    cursor: pointer;
    transition: var(--transition);
}
.btn-outline:hover { background: rgba(201, 168, 76, 0.1); transform: translateY(-2px); }

/* ----- Form (book.html) ----- */
.contact-form { max-width: 680px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid rgba(201, 168, 76, 0.4);
    border-radius: 8px;
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}
.form-group input.invalid,
.form-group select.invalid { border-color: #e05a5a; }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a84c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.form-submit {
    width: 100%;
    padding: 18px;
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}
.form-submit:hover { box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-disclaimer {
    text-align: center;
    margin-top: 24px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.7;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.form-success { display: none; text-align: center; padding: 40px 24px; }
.form-success.show { display: block; }
.form-success h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    background: var(--gold-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.form-success p { color: var(--muted); }

/* ----- Footer ----- */
.footer {
    background: var(--bg-dark);
    padding: 48px 0 28px;
    border-top: 1px solid rgba(201, 168, 76, 0.3);
}
.footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding-bottom: 36px;
}
.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    width: 100%;
}
.footer-logo img {
    height: 80px;
    width: auto;
    mix-blend-mode: lighten;
}
.footer-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px;
}
.footer-nav a {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s ease;
}
.footer-nav a:hover { color: var(--gold); }
.footer-right p { color: var(--muted); font-size: 0.85rem; margin: 0; }
.footer-bottom {
    text-align: center;
    padding-top: 26px;
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    color: var(--muted);
    font-size: 0.78rem;
}

/* ----- Responsive ----- */
@media (max-width: 1080px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-nav { display: flex; }
}
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .footer-meta { flex-direction: column; gap: 28px; text-align: center; }
    .footer-logo { display: flex; justify-content: center; }
    .page-hero { padding: 110px 0 48px; }
    .content-section { padding: 48px 0 72px; }
}
