/* ==========================================================================
   Our Stores - shared stylesheet (hub, subpages, clMap control)
   Brand green #92c849. Scoped under .os-* / .store* to avoid clobbering the
   platform's global styles. Font is intentionally inherited from the platform
   so store content stays cohesive with the site header and footer.
   ========================================================================== */
:root {
    /* brand green + shades (only #92c849 and derivatives, per brief) */
    --brand:        #92c849;
    --brand-soft:   #b4dc80;  /* light shade - tints, subtle fills */
    --brand-dark:   #78a53c;  /* darker shade - buttons, borders */
    --brand-ink:    #6e9737;  /* darkest shade - headings / ink text */
    --brand-edge:   #4f6b1f;  /* deep green - visible button border on hover */
    --brand-tint:   #f3f8ec;  /* whisper of green - section wash */

    /* neutrals (warm, faintly green to sit with the brand) */
    --ink:    #23291c;
    --muted:  #5a6250;
    --line:   #e3e7dd;
    --panel:  #f4f6f1;
    --white:  #ffffff;

    /* system */
    --radius:    10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 2px rgba(31, 45, 15, .05), 0 1px 3px rgba(31, 45, 15, .06);
    --shadow-md: 0 6px 18px rgba(31, 45, 15, .07), 0 2px 6px rgba(31, 45, 15, .05);
    --shadow-lg: 0 18px 40px rgba(31, 45, 15, .10), 0 6px 14px rgba(31, 45, 15, .06);
    --ease:      cubic-bezier(.22, .61, .36, 1);

    /* fluid rhythm */
    --space-section: clamp(2.25rem, 4.5vw, 3.5rem);
}

html { scroll-behavior: smooth; }
#os-find { scroll-margin-top: 90px; } /* offset for platform header; tune if needed */
::selection { background: var(--brand-soft); color: var(--brand-ink); }

/* ---- shared primitives -------------------------------------------------- */
.os-section { padding: var(--space-section) 0; }

.os-band {
    background: linear-gradient(180deg, var(--brand-tint) 0%, var(--white) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 3vw, 2.5rem);
    margin-top: var(--space-section);
}

.os-h2,
.os-hero__text h1,
.os-find__aside h2,
.os-split__text h2,
.os-closer h2 {
    letter-spacing: -.015em;
    text-wrap: balance;
}
.os-h2 { color: var(--brand-ink); text-align: center; margin: 0 0 2.5rem; font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; }

/* ---- buttons ------------------------------------------------------------ */
.os-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 1.6rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .98rem;
    letter-spacing: .01em;
    text-decoration: none;
    border: 2px solid var(--brand-dark);
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s var(--ease),
                border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.os-btn:hover { transform: translateY(-2px); }
.os-btn:active { transform: translateY(0); }
.os-btn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 3px; }

.os-btn--primary { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-sm); }
.os-btn--primary:hover { background: var(--brand-ink); border: 2px solid var(--brand-edge); color: #fff; box-shadow: var(--shadow-md); }

.os-btn--ghost { background: transparent; color: var(--brand-dark); }
.os-btn--ghost:hover { background: var(--brand-dark); border: 2px solid var(--brand-edge); color: #fff; box-shadow: var(--shadow-md); }

/* ---- hero --------------------------------------------------------------- */
.os-hero {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}
.os-hero__text { flex: 1 1 360px; }
.os-hero__text h1 {
    color: var(--brand-ink);
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    line-height: 1.03;
    margin: 0 0 1rem;
}
.os-hero__sub {
    color: var(--brand-dark);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 1.1rem;
}
.os-hero__body {
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.65;
    margin: 0 0 1.75rem;
    max-width: 52ch;
}
.os-hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.os-hero__img {
    flex: 1.3 1 520px;
    align-self: stretch;
    min-height: clamp(380px, 52vw, 640px);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-lg);
}

/* ---- why visit (4-up feature row) --------------------------------------- */
.os-why { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.os-why__item {
    flex: 1 1 200px;
    text-align: center;
    padding: 1.75rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.os-why__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.os-why__item svg {
    width: 34px; height: 34px;
    stroke: var(--brand-dark);
    margin-bottom: 1rem;
    padding: 15px;               /* glyph sits well inside the round badge, no corner crop */
    box-sizing: content-box;
    background: var(--brand-tint);
    border-radius: 50%;
    transition: transform .25s var(--ease), background-color .25s var(--ease), stroke .25s var(--ease);
}
.os-why__item:hover svg { background: var(--brand); stroke: #fff; transform: scale(1.06); }
.os-why__item h3 { color: var(--brand-ink); font-size: 1.05rem; margin: 0 0 .5rem; letter-spacing: -.01em; }
.os-why__item p { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 0; }

/* ---- find your nearest (list + map) ------------------------------------- */
/* Grid with minmax(0,..) tracks: deterministic widths that the map's intrinsic
   content can't blow out (which crushed the aside in a plain flex row). */
.os-find {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: stretch;
    clear: both; /* store pages float the banner blocks above; drop below them */
}
.stores { clear: both; }
.os-find__aside { min-width: 0; }
.os-find__aside h2 { color: var(--brand-ink); font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 1rem; line-height: 1.15; }
.os-find__aside p { color: var(--muted); line-height: 1.65; margin: 0 0 1.75rem; }
.os-find__map { min-width: 0; }

.os-storelist { list-style: none; margin: 0; padding: 0; }
.os-storelist li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    margin: 0 -1rem;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    color: var(--brand-ink);
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
    transition: background-color .2s var(--ease);
}
.os-storelist li:last-child { border-bottom: 0; }
.os-storelist li:hover,
.os-storelist li.is-active { background: var(--brand-tint); }
.os-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    flex: 0 0 32px;
    background: var(--brand-dark);
    color: #fff;
    border-radius: 50%;
    font-size: .95rem;
    font-weight: 700;
    transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.os-storelist li:hover .os-num,
.os-storelist li.is-active .os-num { background: var(--brand-ink); transform: scale(1.1); }
.os-store-name { flex: 1 1 auto; }
.os-list-cta {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand-dark);
    background: transparent;
    border: 1.5px solid var(--brand-dark);
    border-radius: 100px;
    padding: .3rem .75rem;
    white-space: nowrap;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.os-storelist li:hover .os-list-cta,
.os-storelist li.is-active .os-list-cta { background: var(--brand-dark); color: #fff; border: 1.5px solid var(--brand-edge); }
.os-storelist li.is-active .os-list-cta { background: var(--brand-ink); }

/* map hover-card (InfoWindow content) */
.os-mapcard { max-width: 240px; padding: .35rem .5rem .5rem; }
.os-mapcard h3 { color: var(--brand-ink); margin: 0 0 .2rem; font-size: 1.15rem; letter-spacing: -.01em; }
.os-mapcard__tag { color: var(--brand-dark); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .5rem; }
.os-mapcard__desc { color: var(--muted); font-size: .85rem; line-height: 1.5; margin: 0 0 .7rem; }
.os-mapcard__links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.os-mapcard__link { display: inline-block; color: var(--brand-dark); font-weight: 600; font-size: .88rem; text-decoration: none; }
.os-mapcard__link:hover { text-decoration: underline; }

/* ---- split image + text feature ---------------------------------------- */
.os-split { display: flex; flex-wrap: wrap; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.os-split__img {
    flex: 1 1 340px;
    align-self: stretch;
    min-height: clamp(260px, 34vw, 380px);
    border-radius: var(--radius);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-md);
}
.os-split__text { flex: 1 1 360px; }
.os-split__text h2 { color: var(--brand-ink); font-size: clamp(1.5rem, 2.8vw, 1.9rem); margin: 0 0 1.1rem; line-height: 1.18; }
.os-split__text p { color: var(--muted); line-height: 1.7; margin: 0 0 1rem; }

/* ---- closing CTA band --------------------------------------------------- */
.os-closer { text-align: center; }
.os-closer h2 { color: var(--brand-ink); margin: 0 0 .85rem; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
.os-closer p { color: var(--muted); max-width: 62ch; margin: 0 auto 1.75rem; line-height: 1.65; }
.os-closer__cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---- subpage info card -------------------------------------------------- */
.os-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-md);
    margin-top: var(--space-section);
}
.os-info__meta {
    flex: 1 1 300px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--panel);
}
.os-info__meta p { margin: 0 0 .9rem; line-height: 1.55; color: var(--ink); }
.os-info__meta a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.os-info__meta a:hover { text-decoration: underline; }
.os-info__hours { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.os-info__hours div { display: flex; justify-content: space-between; padding: .3rem 0; color: var(--muted); font-size: .92rem; }
.os-info__desc { flex: 2 1 400px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.os-info__desc p { line-height: 1.7; margin: 0 0 1rem; color: var(--muted); }

/* ==========================================================================
   clMap control - map + store cards
   ========================================================================== */
.stores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.75rem;
    width: 100%;
    padding: 0;
    margin-top: var(--space-section);
    background: transparent !important;
}
.store {
    display: flex;
    flex-flow: column;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.store:hover { transform: translateY(-6px); border: 1px solid var(--brand); box-shadow: var(--shadow-lg); }
.store__media { display: block; }
.store__media img {
    width: 100%; height: 190px; object-fit: cover; display: block;
    transition: transform .5s var(--ease);
}
.store:hover .store__media img { transform: scale(1.05); }
.store__body { display: flex; flex-flow: column; align-items: center; gap: .7rem; padding: 1.5rem 1.4rem; flex: 1 1 auto; }
.store__title { text-decoration: none; }
.store__body h3 { color: var(--brand-ink); text-align: center; margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.store__tag {
    align-self: center;
    background: var(--brand-tint);
    color: var(--brand-dark);
    font-weight: 700; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
    padding: .32rem .8rem; border-radius: 100px; margin: 0;
}
.store__desc { color: var(--muted); font-size: .9rem; line-height: 1.55; margin: 0; text-align: center; }
.store__addr {
    display: flex; gap: .5rem; align-items: flex-start;
    width: 100%;
    color: var(--muted); font-size: .85rem; line-height: 1.4;
    margin: 0; padding-top: 1rem; margin-top: auto;
    border-top: 1px solid var(--line);
    text-align: left;
}
.store__addr svg { width: 16px; height: 16px; flex: 0 0 16px; stroke: var(--brand-dark); margin-top: 2px; }
.store__actions { display: flex; flex-flow: column; gap: .5rem; width: 100%; }
.store__btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: .7rem;
    border: 2px solid var(--brand-dark);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
    transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.store__btn--primary { background: var(--brand-dark); color: #fff; }
.store__btn--primary:hover { background: var(--brand-ink); border: 2px solid var(--brand-edge); color: #fff; }
.store__btn--ghost { background: transparent; color: var(--brand-dark); }
.store__btn--ghost:hover { background: var(--brand-dark); border: 2px solid var(--brand-edge); color: #fff; }

#map_canvas {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* ---- scroll reveal ------------------------------------------------------ */
/* Applied per-section by JS (only when IntersectionObserver exists), so if JS
   is off nothing is hidden. Targets are section containers without their own
   hover transitions, so card hovers stay crisp. */
.os-reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.os-reveal.is-visible { opacity: 1; transform: none; }

/* ---- responsive --------------------------------------------------------- */
/* Tablet and below (<1024): stack every two-column layout into one column. */
@media (max-width: 1023px) {
    .os-hero, .os-split { flex-direction: column; align-items: stretch; }
    .os-hero__text, .os-hero__img,
    .os-split__img, .os-split__text { flex: 1 1 auto; width: 100%; }
    .os-hero__img, .os-split__img { min-height: clamp(300px, 55vw, 460px); }
    .os-info { flex-direction: column; }
    .os-find { grid-template-columns: 1fr; }
    .os-why__item { flex-basis: calc(50% - .75rem); } /* 2-up */
    .os-hero, .os-find { gap: 1.75rem; }
}

/* Phone (<768): single column throughout. */
@media (max-width: 767px) {
    .os-why__item { flex-basis: 100%; }
    .stores { grid-template-columns: 1fr; gap: 1.25rem; }
    .store { max-width: 420px; margin: 0 auto; width: 100%; }
    .store a img { height: 200px; }
    #map_canvas { height: 340px !important; } /* overrides the 500px inline height on phones */
}

/* ---- accessibility ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
    .os-reveal { opacity: 1 !important; transform: none !important; }
    .os-btn:hover, .os-why__item:hover, .store:hover { transform: none; }
    .store:hover .store__media img { transform: none; }
}
