/* ============================================================================
   Stringable design system
   Brand tokens and shared components, lifted verbatim from the generator's
   original inline stylesheet so the store and the app read as one product.
   Page-specific rules live in each page's own <style> block.
   ========================================================================= */

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

:root {
    --cream: #F6F2E4;
    --sage: #8FBFA8;
    --green: #216049;
    --forest: rgb(10, 51, 35);
    --danger: #B4453C;
    --warning: #C08A3E;

    --heading: 'Montserrat', 'Segoe UI Semibold', 'Segoe UI', sans-serif;
    --body: 'Lato', 'Segoe UI', Roboto, sans-serif;
    --radius: 24px;
    --radius-sm: 16px;
}

/* --------------------------------------------------------------- scrollbars */
/* every scroller on the site: a slim sage thumb on a faint track */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: rgba(143, 191, 168, .16); }
::-webkit-scrollbar-thumb {
    background: var(--sage); border-radius: 999px;
    border: 3px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--green); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

html { height: 100%; scroll-behavior: smooth; }
body {
    min-height: 100%;
    font-family: var(--body);
    color: var(--green);
    /* the soft sage glow from the brand background */
    background:
        radial-gradient(ellipse 75% 70% at 45% 38%, #FCFBF4 0%, #EDF2E7 42%, #D3E0D2 72%, #C2D3C3 100%),
        #C2D3C3;
    background-attachment: fixed;
    padding: 26px 24px 34px;
    overflow-y: auto;
}
.container { max-width: 1180px; margin: 0 auto; }
.container-narrow { max-width: 720px; margin: 0 auto; }

/* ------------------------------------------------------------------ site nav */
/* three columns so the logo stays optically centred no matter how wide the
   links on either side get */
.site-nav {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 16px; margin-bottom: 26px; padding: 4px 4px 0;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links.right { justify-content: flex-end; }
.nav-link {
    font-family: var(--heading); font-weight: 600; font-size: .86em;
    text-transform: uppercase; letter-spacing: .04em;
    color: var(--forest); text-decoration: none; opacity: .78;
    transition: opacity .2s, color .2s; white-space: nowrap;
}
.nav-link:hover { opacity: 1; color: var(--green); }
.nav-link.active { opacity: 1; border-bottom: 2px solid var(--sage); padding-bottom: 3px; }

.brand { display: flex; justify-content: center; }
/* logo-transparent.png has real alpha (a blend-mode trick breaks against the
   body's fixed-attachment gradient and shows the wordmark's white plate) */
.brand-logo { height: 118px; width: auto; }
.brand-logo-sm { height: 74px; }

/* a little hello when you point at the mark */
@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    15% { transform: rotate(-3.5deg) scale(1.03); }
    30% { transform: rotate(3deg) scale(1.03); }
    45% { transform: rotate(-2deg) scale(1.02); }
    60% { transform: rotate(1.5deg) scale(1.02); }
    80% { transform: rotate(-.75deg); }
}
.brand-logo:hover { animation: wobble .7s ease-in-out; cursor: pointer; }

/* cart pill in the nav, with a count bubble that hides itself at zero */
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-count {
    display: none; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; background: var(--green); color: var(--cream);
    font-family: var(--heading); font-weight: 700; font-size: .68em;
    line-height: 19px; text-align: center;
}
.cart-count.visible { display: inline-block; }

/* mobile: stack the nav and let the links wrap under a smaller mark */
@media (max-width: 860px) {
    .site-nav { grid-template-columns: 1fr; justify-items: center; gap: 12px; }
    .nav-links, .nav-links.right { justify-content: center; flex-wrap: wrap; gap: 16px; }
    .brand-logo { height: 92px; }
}

/* ------------------------------------------------------------------- panels */
.panel {
    background: var(--cream);
    border: 3px solid var(--sage);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 10px 30px rgba(10, 51, 35, .08);
    margin-bottom: 22px;
}
.panel-title {
    font-family: var(--heading); font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; font-size: .9em; color: var(--forest);
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
    justify-content: center;
}
.panel-lg { padding: 34px; }

/* ------------------------------------------------------------------ buttons */
.btn {
    font-family: var(--heading); font-weight: 700;
    padding: 13px 24px; border: none; border-radius: var(--radius-sm);
    font-size: .92em; cursor: pointer; transition: all .3s;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(to right, var(--sage), var(--green));
    color: var(--cream);
}
.btn-primary:hover:not(:disabled) { transform: scale(1.04); box-shadow: 0 10px 24px rgba(33, 96, 73, .3); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
    background: rgba(255, 255, 255, .5); color: var(--green);
    border: 2px solid var(--sage);
}
.btn-secondary:hover:not(:disabled) { transform: scale(1.04); box-shadow: 0 8px 20px rgba(10, 51, 35, .12); }
.btn-secondary:disabled { opacity: .4; cursor: not-allowed; }
.btn-danger { background: var(--danger); color: var(--cream); }
.btn-danger:hover:not(:disabled) { transform: scale(1.04); box-shadow: 0 8px 20px rgba(180, 69, 60, .3); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: .82em; border-radius: 12px; }
.btn-lg { padding: 16px 34px; font-size: 1.02em; }
/* buttons mid-request: keep the footprint, swap the label for a pulse */
.btn.is-busy { opacity: .7; pointer-events: none; }

/* -------------------------------------------------------------------- forms */
.field { margin-bottom: 16px; text-align: left; }
.field-label {
    display: block; font-family: var(--heading); font-weight: 700;
    font-size: .74em; text-transform: uppercase; letter-spacing: .05em;
    color: var(--forest); margin-bottom: 6px;
}
.input {
    width: 100%; padding: 13px 16px;
    font-family: var(--body); font-size: 1em;
    color: var(--forest); background: #fff;
    border: 2px solid var(--sage); border-radius: var(--radius-sm);
    outline: none; transition: border-color .2s;
}
.input:focus { border-color: var(--green); }
.input:disabled { opacity: .55; cursor: not-allowed; }
.input::placeholder { color: var(--green); opacity: .45; }
/* the access code is typed, not remembered — give it room and letter spacing */
.input-code { letter-spacing: .08em; font-size: 1.05em; text-align: center; }
.field-hint { font-size: .78em; color: var(--green); opacity: .7; margin-top: 6px; }

/* one shared message strip for every form on the site */
.form-message { min-height: 1.4em; margin-top: 14px; font-size: .9em; color: var(--green); }
.form-message-error { color: var(--danger); font-weight: 700; }
.form-message-success { color: var(--green); font-weight: 700; }

/* --------------------------------------------------------------------- misc */
.section-title {
    font-family: var(--heading); font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; font-size: 1.5em; color: var(--forest);
    text-align: center; margin-bottom: 10px;
}
.section-sub {
    text-align: center; font-size: 1.02em; color: var(--green);
    max-width: 620px; margin: 0 auto 28px; opacity: .9;
}
.pill {
    display: inline-block; padding: 5px 14px; border-radius: 999px;
    font-family: var(--heading); font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; font-size: .68em;
}
.pill-green { background: var(--green); color: var(--cream); }
.pill-sage { background: rgba(143, 191, 168, .35); color: var(--forest); }
.pill-warning { background: var(--warning); color: var(--cream); }
.pill-danger { background: var(--danger); color: var(--cream); }

.divider { height: 2px; background: rgba(143, 191, 168, .5); border: none; margin: 22px 0; }
.text-center { text-align: center; }
.muted { color: var(--green); opacity: .7; }
.link {
    color: var(--green); font-weight: 700; text-decoration: underline;
    text-decoration-color: var(--sage); text-underline-offset: 3px; cursor: pointer;
}
.link:hover { color: var(--forest); }

/* ------------------------------------------------------------------- footer */
.footer {
    margin-top: 26px; padding: 26px 24px 22px; text-align: center;
    background: var(--forest); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(10, 51, 35, .18);
}
.footer-title {
    font-family: var(--heading); font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; font-size: .9em; color: var(--cream); margin-bottom: 8px;
}
.footer-text { color: var(--sage); font-size: .88em; max-width: 480px; margin: 0 auto 14px; }
.footer-email {
    display: inline-block; font-family: var(--heading); font-weight: 700; font-size: 1.02em;
    color: var(--forest); text-decoration: none; cursor: pointer;
    background: linear-gradient(to right, var(--sage), #B9D9C6);
    padding: 11px 22px; border-radius: var(--radius-sm); transition: all .25s;
}
.footer-email:hover { transform: scale(1.04); box-shadow: 0 8px 20px rgba(143, 191, 168, .3); }
.footer-links {
    display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 18px;
}
.footer-links a {
    color: var(--sage); font-size: .82em; text-decoration: none; opacity: .85;
}
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-fine { margin-top: 16px; font-size: .74em; color: var(--sage); opacity: .65; }

/* -------------------------------------------------------------------- modal */
.modal {
    display: none; position: fixed; inset: 0; background: rgba(10, 51, 35, .5);
    z-index: 100; align-items: center; justify-content: center; padding: 24px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--cream); border: 4px solid var(--sage); border-radius: 28px;
    padding: 28px; max-width: 860px; width: 100%; max-height: 92vh; overflow-y: auto;
    box-shadow: 0 24px 60px rgba(10, 51, 35, .35);
}
/* inside a card the bar must also clear the 28px corner radius, or it spills
   over the curve — hence the transparent track and its top/bottom margin */
.modal-content::-webkit-scrollbar { width: 10px; }
.modal-content::-webkit-scrollbar-track { background: transparent; margin: 22px 0; }
.modal-content::-webkit-scrollbar-thumb { border-width: 2px; }
.modal-title {
    font-family: var(--heading); font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; font-size: 1.5em; color: var(--forest);
    text-align: center; margin-bottom: 22px;
}

/* ------------------------------------------------------------------ loading */
/* full-page cover used while we work out who you are; prevents a flash of
   signed-out UI on pages that require an account */
.page-loading {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(ellipse 75% 70% at 45% 38%, #FCFBF4 0%, #EDF2E7 42%, #D3E0D2 72%, #C2D3C3 100%),
        #C2D3C3;
}
.spinner {
    width: 42px; height: 42px; border-radius: 50%;
    border: 4px solid rgba(143, 191, 168, .35);
    border-top-color: var(--green);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* hidden until a script decides otherwise */
[hidden] { display: none !important; }
