/* =============================================================================
   The Barber Shop Austin 35 — main stylesheet
   Theme colors are driven entirely by the CSS variables in :root below, so a
   whole site re-themes by editing this block (tools/new_site.py fills them from
   the category theme preset). Everything else is theme-agnostic.
   ========================================================================== */

:root {
    --primary:      #6d3b6e;      /* brand primary (headings, buttons, footer) */
    --primary-700:  #552c56;  /* darker primary (hovers) */
    --primary-600:  #8c5a8d;  /* brighter primary (links, accents) */
    --accent:       #d98fae;       /* warm accent (CTA chip, highlights) */
    --accent-dark:  #b76a8a;
    --bg:           #f8f1f6;           /* tinted section background */
    --bg-2:         #fdf8fb;         /* lighter tinted background */

    /* Neutral, theme-independent tokens */
    --ink:          #1f2933;
    --muted:        #6b7785;
    --line:         #e3e8ee;
    --white:        #ffffff;

    --radius:       14px;
    --radius-sm:    9px;
    --shadow:       0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg:    0 24px 50px rgba(15, 23, 42, 0.13);
    --maxw:         1180px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--ink);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text {
    font-family: 'Poppins', 'Inter', sans-serif;
    line-height: 1.15;
    color: var(--primary);
    letter-spacing: -0.01em;
}

a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 5%; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-700); color: var(--white); box-shadow: var(--shadow); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-light { background: var(--white); color: var(--primary); }
.btn-light:hover { background: var(--bg); color: var(--primary); }

.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.btn-text { background: none; color: var(--primary-600); padding: 0.4rem 0; font-weight: 600; }
.btn-text:hover { color: var(--accent-dark); transform: none; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-badge {
    background: var(--primary);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}
.brand-text {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
    max-width: 11em;
}

.nav-links { list-style: none; display: flex; align-items: center; gap: 1.8rem; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 0.97rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active { font-weight: 700; }
.nav-links .nav-cta {
    background: var(--accent);
    color: var(--primary) !important;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    white-space: nowrap;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: var(--white) !important; }

.nav-toggle {
    display: none;
    background: none; border: none;
    font-size: 1.6rem; color: var(--primary);
    cursor: pointer;
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section--cream { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.8rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 0.6rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

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

/* ---------- Hero ---------- */
.hero {
    background:
        radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 45%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--white) 100%);
    padding: 4rem 0 4.5rem;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}
.hero-copy h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.3rem);
    margin-bottom: 1.1rem;
}
.hero-copy h1 span { color: var(--accent-dark); }
.lead { font-size: 1.12rem; color: var(--muted); margin-bottom: 1.8rem; max-width: 38em; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.1rem; font-size: 0.9rem; color: var(--muted); }

/* ---------- Branded media panels (used in place of photos) ---------- */
/* A polished gradient tile with a big icon — looks intentional with zero
   photos, so a freshly generated demo site is presentable immediately.
   Swap in a real photo later by replacing the .media-art block with an
   <img class="site-photo"> (see static/images/README.md). */
.media-art {
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 28% 18%, color-mix(in srgb, var(--accent) 38%, transparent) 0%, transparent 58%),
        linear-gradient(140deg, var(--primary) 0%, var(--primary-700) 100%);
    box-shadow: var(--shadow-lg);
    border: 6px solid #fff;
    outline: 1px solid var(--line);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: var(--white);
    text-align: center;
    padding: 2rem;
}
.media-art--hero { min-height: 360px; }
.media-art-icon { font-size: 5rem; line-height: 1; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.28)); }
.media-art-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.01em;
    color: rgba(255,255,255,0.96);
}

/* ---------- Image placeholders (service cards without a photo yet) ---------- */
.img-placeholder {
    background:
        repeating-linear-gradient(45deg, var(--bg) 0 18px, var(--bg-2) 18px 36px);
    border: 2px dashed var(--accent);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--accent-dark);
    text-align: center;
    padding: 1.5rem;
    min-height: 220px;
}
.img-placeholder .ph-icon { font-size: 3rem; line-height: 1; }
.img-placeholder .ph-text { font-size: 0.85rem; font-weight: 600; opacity: 0.85; max-width: 18em; }

/* Real photos (framed), for when you drop images in static/images/. */
.site-photo {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 6px solid #fff;
    outline: 1px solid var(--line);
}

/* ---------- Value props ---------- */
.value-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.value-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.value-icon { font-size: 2.2rem; margin-bottom: 0.7rem; }
.value-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.value-card p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Card / product grid ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
    margin-bottom: 2.5rem;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    color: var(--ink);
}
a.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.product-card-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border: none;
    border-radius: 0;
    min-height: 190px;
}
.product-card .img-placeholder.product-card-img { border-left: 0; border-right: 0; border-top: 0; }
.product-card-body { padding: 1.3rem 1.4rem 1.5rem; }
.product-card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.product-card-body p { color: var(--muted); font-size: 0.94rem; }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.tag-list li {
    background: var(--bg);
    color: var(--primary-700);
    border: 1px solid var(--line);
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---------- Split section ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.split-copy h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.split-copy p { color: var(--muted); margin-bottom: 1rem; }

.check-list { list-style: none; margin: 1.2rem 0; }
.check-list li { position: relative; padding-left: 1.9rem; margin-bottom: 0.6rem; color: var(--ink); }
.check-list li::before {
    content: '✓';
    position: absolute; left: 0; top: 0;
    color: var(--white);
    background: var(--primary-600);
    width: 1.3rem; height: 1.3rem;
    border-radius: 50%;
    font-size: 0.8rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Notice ---------- */
.notice {
    background: var(--bg);
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.6rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.notice p { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band {
    background:
        radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 50%),
        var(--primary);
    color: var(--white);
    padding: 3.5rem 0;
}
.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.4rem; }
.cta-band p { color: rgba(255,255,255,0.85); }
.cta-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    background: linear-gradient(180deg, var(--bg-2) 0%, var(--white) 100%);
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.8rem; }
.page-hero .lead { margin-left: auto; margin-right: auto; }

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3rem;
    align-items: start;
}
.info-block { margin-bottom: 1.6rem; }
.info-block h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.info-block p { color: var(--muted); }
.hours-list { list-style: none; }
.hours-list li { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); padding: 0.15rem 0; max-width: 22rem; }

.contact-form-wrap {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.contact-form-wrap h2 { font-size: 1.4rem; margin-bottom: 1.3rem; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--primary); }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.97rem;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.contact-form textarea { resize: vertical; }
.contact-form .btn { margin-top: 0.4rem; }
.errorlist { list-style: none; color: #b3261e; font-size: 0.85rem; margin-top: 0.3rem; }

/* ---------- Map ---------- */
.map-section { line-height: 0; }
.map-section iframe { display: block; filter: grayscale(0.1); }

/* ---------- Alerts ---------- */
.alert { padding: 1rem 1.3rem; border-radius: var(--radius-sm); margin: 1.5rem 0; font-weight: 500; }
.alert-success { background: #e7f4ec; color: #1c5638; border: 1px solid #bfe3cd; }
.alert-error { background: #fbeae8; color: #b3261e; border: 1px solid #f3cfcb; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.82); padding: 3.5rem 0 1.5rem; margin-top: 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
}
.brand--footer .brand-text { color: var(--white); }
.brand--footer .brand-badge { border-color: var(--accent); }
.footer-tagline { margin-top: 1rem; font-size: 0.92rem; color: rgba(255,255,255,0.72); max-width: 26em; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.site-footer p { font-size: 0.88rem; margin-bottom: 0.6rem; }
.site-footer a { color: rgba(255,255,255,0.82); }
.site-footer a:hover { color: var(--accent); }
.footer-hours, .footer-links { list-style: none; }
/* Stack day + time so the hours never wrap awkwardly in the narrow column. */
.footer-hours li { display: flex; flex-direction: column; font-size: 0.85rem; line-height: 1.35; padding: 0.3rem 0; }
.footer-hours li span:last-child { color: rgba(255, 255, 255, 0.55); }
.footer-links li { padding: 0.28rem 0; font-size: 0.88rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.3rem; }
.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin: 0; }

/* =============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-media { order: -1; }
    .value-grid { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem 5% 1rem;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; padding: 0.5rem 0; }
    .nav-links .nav-cta { display: inline-block; margin-top: 0.4rem; }

    .split { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .value-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; text-align: center; }
}
