/* ============================================================
   SHERI BOELTER — MOBILE CSS
   Loaded after main.css. Focused, deliberate overrides.
   Breakpoints: 1024px tablet | 768px large mobile | 480px small
   ============================================================ */

/* ── CONTACT PAGE ────────────────────────────────── */
.contact-hero { padding-bottom: 2rem; }

.contact-body {
    padding: 3rem 0 4rem;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    align-items: start;
}

/* Aside — photo + note + list */
.contact-aside__photo-wrap {
    margin-bottom: 1.5rem;
}
.contact-aside__photo,
.contact-aside__photo.post-author__photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid var(--plum-100);
}
.contact-aside__note {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.78;
    color: var(--text-mid);
    margin-bottom: 2rem;
}
.contact-aside__label {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--plum-400);
    margin-bottom: 0.9rem;
}
.contact-aside__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.contact-aside__list li {
    font-size: 0.88rem;
    color: var(--text-light);
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.contact-aside__list li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rose-400);
    flex-shrink: 0;
}

/* Form elements */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-label {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.form-required {
    color: var(--rose-400);
    font-size: 0.9rem;
}
.form-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--cream);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.75rem 1rem;
    transition: border-color var(--ease), box-shadow var(--ease);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--plum-300);
    box-shadow: 0 0 0 3px rgba(100, 80, 160, 0.1);
    background: var(--white);
}
.form-field.has-error .form-input,
.form-field.has-error .form-select,
.form-field.has-error .form-textarea {
    border-color: #C0392B;
}
.form-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.65;
}
.form-select {
    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='%239080A8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-top: 0.25rem;
}
.form-error-msg {
    font-size: 0.78rem;
    color: #C0392B;
    margin-top: 0.25rem;
}
.form-submit {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.form-privacy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Alert / success states */
.contact-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.contact-alert--error {
    background: #FDF0EF;
    border: 1px solid #F0C0BB;
    color: #8B2020;
}
.contact-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--plum-50);
    border-radius: var(--r-lg);
}
.contact-success__icon {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--rose-400);
    margin-bottom: 1rem;
}
.contact-success h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 600;
    color: var(--plum-900);
    margin-bottom: 0.75rem;
}
.contact-success p {
    color: var(--text-mid);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── GLOBAL MOBILE IMPROVEMENTS ──────────────────── */

/* Sticky header height fix for anchor jumps */
:target { scroll-margin-top: 80px; }

/* Prevent horizontal scroll on all screens */
body { overflow-x: hidden; }

/* Better tap targets on mobile */
a, button { min-height: 44px; display: inline-flex; align-items: center; }
.writing-feed__item { min-height: 44px; }
.filter-btn { min-height: 36px; display: inline-flex; align-items: center; }
.form-label { min-height: auto; display: flex; }
p a, li a { min-height: auto; display: inline; }

/* ── TABLET: 1024px ──────────────────────────────── */
@media (max-width: 1024px) {

    .contact-grid {
        grid-template-columns: 300px 1fr;
        gap: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .home-featured__inner {
        gap: 2.5rem;
    }

    .wwm-ghost__inner {
        gap: 3rem;
    }

}

/* ── LARGE MOBILE: 768px ─────────────────────────── */
@media (max-width: 768px) {

  /* Logo — constrain the branding wrapper, image fills naturally */
  .site-branding {
    max-width: 200px !important;
  }
  .site-header.is-scrolled .site-branding {
    max-width: 160px !important;
  }

    /* Nav */
    .site-header { position: sticky; top: 0; z-index: 100; }
    .nav-toggle { display: flex; }

    .primary-nav {
        display: none;
        width: 100%;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid var(--border);
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: flex-start;
    }
    .primary-nav a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.65rem 0.5rem;
        border-radius: 0;
        min-height: 44px;
    }
    .primary-nav .menu-cta {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
        width: 100%;
    }
    .primary-nav .menu-cta a {
        display: inline-flex;
        width: auto;
        border-radius: var(--r-pill);
    }

    /* Hero */
    .home-hero { padding: 2.5rem 0 2rem; }
    .home-hero h1 { font-size: 2rem; }
    .home-hero__intro { font-size: 1.05rem; }
    .home-hero__actions { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .home-hero__actions .btn { width: 100%; justify-content: center; }

    /* Featured essay */
    .home-featured { padding: 2.5rem 0; }
    .home-featured__inner {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    .home-featured__title { font-size: 1.5rem; }
    .home-featured__opener .big-quote { font-size: 3.5rem; }
    .home-featured__opener p { font-size: 1rem; }

    /* Writing feed */
    .home-writing { padding: 2.5rem 0; }
    .writing-feed__item {
        grid-template-columns: 90px 1fr;
        gap: 0;
        padding: 0.85rem 0;
    }
    .writing-feed__date { display: none; }
    .writing-feed__title { font-size: 0.95rem; padding-left: 1rem; }
    .writing-feed__cat { font-size: 0.62rem; padding-right: 1rem; }

    /* Values */
    .home-values { padding: 2rem 0; }
    .home-values__grid { grid-template-columns: 1fr; gap: 0; }
    .home-values__item {
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border);
        text-align: left;
        display: grid;
        grid-template-columns: 32px 1fr;
        gap: 0 1rem;
        align-items: start;
    }
    .home-values__item .glyph { font-size: 1.2rem; margin-bottom: 0; padding-top: 4px; }
    .home-values__item h3 { grid-column: 2; margin-bottom: 0.25rem; }
    .home-values__item p { grid-column: 2; font-size: 0.85rem; }

    /* WWM teaser */
    .home-wwm { padding: 2.5rem 0; }
    .home-wwm__inner { text-align: left; }
    .home-wwm__tags { justify-content: flex-start; }
    .home-wwm .btn { width: 100%; justify-content: center; }

    /* Contact page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .contact-aside {
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border);
    }
    .contact-aside__photo,
    .contact-aside__photo.post-author__photo {
        width: 72px;
        height: 72px;
    }
    .form-submit { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .form-submit .btn { width: 100%; justify-content: center; }

    /* Work With Me page */
    .wwm-hero { padding: 2.5rem 0 2rem; }
    .wwm-hero h1 { font-size: 1.8rem; }
    .wwm-hero__sub { font-size: 0.95rem; }
    .wwm-services { padding: 2.5rem 0; }
    .services-grid { gap: 1rem; }
    .service-card { padding: 1.5rem; }

    .wwm-ghost { padding: 2.5rem 0; }
    .wwm-ghost__inner { grid-template-columns: 1fr; gap: 2rem; }
    .wwm-ghost__heading { font-size: 1.6rem; }
    .wwm-ghost__body { font-size: 0.95rem; }

    .wwm-process { padding: 2.5rem 0; }
    .process-steps { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .process-step { padding: 1.25rem 0.75rem; }
    .process-step__number { font-size: 2rem; }

    .wwm-cta { padding: 2.5rem 0; }
    .wwm-cta .btn { width: 100%; justify-content: center; max-width: 320px; }

    /* Single post */
    .post-hero { padding: 2.5rem 0 1.5rem; }
    .post-hero h1 { font-size: 1.9rem; }
    .post-body { padding: 2rem 0; }
    .entry-content { font-size: 1.02rem; }
    .post-author {
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }
    .post-nav__inner { grid-template-columns: 1fr; gap: 1rem; }
    .post-nav__link--next { text-align: left; }

    /* Archive */
    .archive-hero { padding: 2.5rem 0 1.5rem; }
    .archive-hero h1 { font-size: 2rem; }
    .archive-filter { top: 56px; }
    .archive-filter__inner { gap: 0.15rem; }
    .filter-btn { font-size: 0.68rem; padding: 0.35rem 0.65rem; }
    .archive-feed { padding: 2rem 0; }

    /* Footer */
    .site-footer { padding: 2.5rem 0 1.5rem; }
    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
    }
    .footer-brand p { max-width: 100%; }
    .site-footer__bottom { flex-direction: column; text-align: center; gap: 0.5rem; }

    /* Page generic */
    .page-hero { padding: 2.5rem 0 1.5rem; }
    .page-hero h1 { font-size: 1.8rem; }
    .page-content { padding: 2rem 0; }

}

/* ── SMALL MOBILE: 480px ─────────────────────────── */
@media (max-width: 480px) {

    .container { padding-left: 1rem; padding-right: 1rem; }

    /* Typography scale down */
    .home-hero h1 { font-size: 1.65rem; line-height: 1.2; }
    .home-featured__title { font-size: 1.3rem; }
    .wwm-hero h1 { font-size: 1.55rem; }
    .post-hero h1 { font-size: 1.6rem; }
    .wwm-ghost__heading { font-size: 1.4rem; }

    /* Process: stack to single column */
    .process-steps { grid-template-columns: 1fr; }

    /* Service cards full edge-to-edge feel */
    .service-card { border-radius: var(--r-md); }

    /* Nav brand tighten */
    .site-branding__name { font-size: 1.3rem; }

    /* Ghost services tight */
    .ghost-service { padding-left: 1rem; }
    .ghost-services { gap: 1rem; }

    /* Writing feed: hide category on very small */
    .writing-feed__cat { display: none; }
    .writing-feed__item { grid-template-columns: 1fr; }
    .writing-feed__title { padding-left: 0; }
    .writing-feed__item { padding: 0.7rem 0; }

    /* Contact aside list tighten */
    .contact-aside__list li { font-size: 0.83rem; padding: 0.45rem 0; }

    /* Buttons full width on very small */
    .wwm-hero .btn,
    .home-hero .btn--primary { width: 100%; justify-content: center; }

}

/* ── PRINT ───────────────────────────────────────── */
@media print {
    .site-header,
    .site-footer,
    .home-wwm,
    .post-nav,
    .nav-toggle { display: none; }

    .entry-content {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
    }
    .post-hero h1 { font-size: 20pt; }
}

/* ── ABOUT PAGE RESPONSIVE ───────────────────────── */
@media (max-width: 960px) {
    .about-hero__inner { grid-template-columns: 260px 1fr; gap: 2.5rem; }
    .competencies-grid { grid-template-columns: repeat(2, 1fr); }
    .about-memoir__inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .career-item { grid-template-columns: 220px 1fr; gap: 1.5rem; }
}

@media (max-width: 768px) {
    .about-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
    .about-hero__photo { aspect-ratio: 1 / 1; max-width: 280px; }
    .about-hero__photo-placeholder { aspect-ratio: 1/1; max-width: 280px; }
    .about-hero h1 { font-size: 2rem; }
    .about-narrative__lead { font-size: 1.1rem; }
    .competencies-grid { grid-template-columns: 1fr; }
    .career-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .career-item__org { margin-bottom: 0.5rem; }
    .presentations-grid { grid-template-columns: 1fr; }
    .credentials-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-cta__actions { flex-direction: column; align-items: center; }
    .about-cta__actions .btn { width: 100%; max-width: 280px; justify-content: center; }
    .speaking-cta { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .speaking-cta .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .about-memoir__title { font-size: 1.6rem; }
    .about-section-header h2 { font-size: 1.6rem; }
    .presentation-card { padding: 1.5rem; }
}
