/* ============================================================
   FOOTER - Herb & House
   Mobile-first, one breakpoint (1024px). Mobile runs a compact,
   clamp-scaled layout (Canva-like smooth sizing between phones);
   desktop is the calm 5-column grid.
   ============================================================ */

.main-footer {
    background:var(--cream);
}

/* -- Inner shell: tighter at the bottom of the phone screen ---------- */
.footer-inner {
    padding: clamp(28px, 7vw, 48px) clamp(16px, 4.5vw, 20px) 0;
}

/* -- Main grid --------------------------------------------------------- */
.footer-grid {
    display: grid;
    /* minmax(0,1fr) instead of plain 1fr: plain 1fr = minmax(auto,1fr),
       where the LEFT track's min-content (brand email word + newsletter
       form) always forced it wider than the right. With 0 minimums both
       tracks are exactly 50/50 and long content wraps inside its own
       column instead of stealing width. */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 5vw, 32px);
}

.footer-logo {
    width: clamp(96px, 26vw, 120px);
    display: block;
    margin-bottom: clamp(14px, 3.5vw, 20px);
}

@media (min-width: 1024px) {
    .footer-inner { padding: 56px 32px 0; }

    .footer-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 24px;
    }

    .footer-logo {
        width: 120px;
        margin-bottom: 20px;
    }
}

/* -- Contact ----------------------------------------------------------- */
.footer-contact { margin-bottom: clamp(10px, 2.5vw, 14px); }

.footer-contact-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.footer-contact-label i { font-size: 0.7rem; width: 14px; }

/* 20px = label icon (14px) + gap (6px), so the value lines up under the
   label's text. Reset on desktop where the label keeps its own rhythm. */
.footer-contact-value {
    display: block;
    margin-left: 20px;
    font-size: 0.9rem;
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-value:hover { color: var(--ink); }

/* -- Social ------------------------------------------------------------ */
.footer-social {
    display: flex;
    gap: clamp(8px, 2vw, 10px);
    margin-top: clamp(16px, 4vw, 24px);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(34px, 9vw, 38px);
    height: clamp(34px, 9vw, 38px);
    border-radius: 50%;
    background:var(--ink);
    color: var(--on-ink);
    font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background:var(--ink-hover);
    transform: translateY(-2px);
    color: var(--on-ink);
}

/* -- Newsletter (compact, sits under the social icons) ---------------- */
.footer-newsletter {
    margin-top: clamp(14px, 3.5vw, 20px);
    max-width: 260px;
}

.footer-newsletter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.footer-newsletter-label i { font-size: 0.7rem; width: 14px; }

.footer-newsletter-group {
    display: flex;
    align-items: center;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    margin-right: 28px;
}

.footer-nl-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0 14px;
    font-size: 0.85rem;
    color: var(--text-body);
}

.footer-nl-input::placeholder { color: var(--text-faint); }

.footer-nl-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 100%;
    border: 0;
    background: var(--ink);
    color: var(--on-ink);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.footer-nl-btn:hover { background: var(--ink-hover); }

.footer-newsletter-group:focus-within { border-color: var(--ink); }

@media (min-width: 1024px) {
    .footer-contact-value { margin-left: 0; }
}

/* -- Dissolve the wrapper - its children join the parent grid directly -- */
.footer-links-wrapper {
    display: contents;
}

/* -- Link columns ------------------------------------------------------- */
.footer-col-heading {
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink);
    margin-bottom: clamp(12px, 3vw, 16px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: clamp(8px, 2vw, 10px); }

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--ink); }

/* -- App column --------------------------------------------------------- */
.footer-app-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

@media (min-width: 1024px) {
    .footer-app-col {
        align-items: flex-start;
        text-align: left;
    }
}

/* -- Phone mockup -------------------------------------------------------- */
/* One float definition only. The mockup scales with the viewport on
   phones so it never crowds the newsletter above it. */
@keyframes phone-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
@keyframes shadow-breathe {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.35; }
    50%      { transform: translateX(-50%) scale(0.85); opacity: 0.2; }
}

.phone-mockup {
    position: relative;
    width: clamp(140px, 38vw, 180px);
    max-width: 100%;
    height: clamp(216px, 58vw, 280px);
    animation: phone-float 3s ease-in-out infinite;
}
.phone-mockup::after {
    content: "";
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 14px;
    background: rgba(4, 61, 47, 0.25);
    border-radius: 50%;
    filter: blur(4px);
    animation: shadow-breathe 3s ease-in-out infinite;
}
.phone-mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* -- App buttons --------------------------------------------------------- */
.app-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: clamp(10px, 2.5vw, 12px);
}

@media (min-width: 1024px) {
    .app-btns { justify-content: flex-start; }
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background:var(--ink);
    color: var(--on-ink);
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.2s, transform 0.15s;
}

.app-store-btn:hover {
    background:var(--ink-hover);
    transform: translateY(-1px);
    color: var(--on-ink);
}

.app-store-btn i { font-size: 0.95rem; }

/* -- Watermark ------------------------------------------------------------ */
.footer-watermark-row {
    overflow: hidden;
    text-align: center;
    line-height: 1;
}

@media (min-width: 1024px) {
    .footer-watermark-row {
        margin-top: -64px;
        padding-left: 40px;
    }
}

.footer-watermark {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: var(--fw-semibold);
    font-size: clamp(2rem, 7.5vw, 5rem);
    color: rgba(4, 61, 47, 0.14);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* -- Bottom bar ----------------------------------------------------------- */
.footer-bottom {
    border-top: 1px solid var(--line);
    padding: clamp(16px, 4vw, 20px) 0 clamp(28px, 7vw, 36px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(10px, 2.5vw, 12px);
    text-align: center;
}

@media (min-width: 1024px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        align-items: center;
        flex-wrap: wrap;
    }
}

.footer-bottom .copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    order: 1;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .footer-bottom .copyright {
        flex: 0 0 auto;
    }
}

.footer-bottom .copyright span {
    color: var(--ink-deep);
    font-weight: 600;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    order: 2;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

@media (min-width: 1024px) {
    .footer-bottom-links {
        justify-content: center;
    }
}

.footer-bottom-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover { color: var(--ink); }

.footer-bottom-links .sep {
    color: var(--line-strong);
    font-size: 0.7rem;
    user-select: none;
}

.payment-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    order: 3;
    flex-shrink: 0;
}

.payment-icons i {
    font-size: 1.5rem;
    color: var(--text-faint);
    transition: color 0.2s;
}

.payment-icons i:hover { color: var(--ink-deep); }

/* -- Small screens: app column spans the full width -------------------- */
@media (max-width: 1023px) {
    .footer-app-col {
        grid-column: 1 / -1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* -- Small screens: right-hand link column reads right-aligned ----------
   Below 1024px the footer grid runs two columns; the wrapper dissolves
   (display: contents), so its three link columns auto-place into the
   parent grid: SHOP lands in column 2 of row 1, COMPANY in column 2 of
   row 2 (HELP takes column 1 under the brand). Mirrors the layout so
   the right edge lines up on phones while the brand/HELP column keeps
   its left alignment. Headings inherit the same alignment, so the SHOP
   and COMPANY labels track their links. Desktop is untouched: the
   5-column grid keeps everything left-aligned as before. */
@media (max-width: 1023px) {
    .footer-links-wrapper .footer-links-col:nth-child(1),
    .footer-links-wrapper .footer-links-col:nth-child(3) {
        text-align: right;
    }
}

/* -- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .phone-mockup,
    .phone-mockup::after { animation: none; }
    .footer-social a,
    .footer-links a,
    .app-store-btn,
    .payment-icons i { transition: none; }
}
