/* ==========================================================================
   Hyperborean Meadery — shared stylesheet
   One file for every page. Edit here, it changes everywhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

:root {
    color-scheme: light dark;

    /* Surfaces & ink — warm parchment and deep roasted brown */
    --bg:            #faf7f0;
    --bg-tint:       #f2ece0;
    --surface:       #ffffff;
    --ink:           #2b1a12;
    --ink-soft:      #6d584a;
    --ink-faint:     #79685e;
    --line:          rgba(43, 26, 18, 0.10);
    --line-strong:   rgba(43, 26, 18, 0.16);

    /* Brand accents.
       --gold is a TEXT color: it clears WCAG AA 4.5:1 on every surface it
       lands on (page, tint, card, announcement pill). --gold-bright is
       decorative only - medal chips, borders, the hero glow - never text. */
    --gold:          #8b6414;
    --gold-bright:   #d4af37;
    --brown:         #5d4037;
    --brown-soft:    #8d6e63;

    /* Chrome */
    --header-bg:     rgba(250, 247, 240, 0.72);
    --glow-a:        rgba(212, 175, 55, 0.22);
    --glow-b:        rgba(141, 110, 99, 0.16);

    /* Elevation — short, soft, layered. Never a hard drop shadow. */
    --shadow-sm:  0 1px 2px rgba(43, 26, 18, 0.05),
                  0 2px 6px rgba(43, 26, 18, 0.05);
    --shadow-md:  0 2px 4px rgba(43, 26, 18, 0.05),
                  0 8px 24px rgba(43, 26, 18, 0.08);
    --shadow-lg:  0 4px 8px rgba(43, 26, 18, 0.05),
                  0 20px 48px rgba(43, 26, 18, 0.12);

    /* Type */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;

    /* Rhythm */
    --page-max:    1080px;
    --prose-max:   680px;
    --radius-sm:   10px;
    --radius:      16px;
    --radius-lg:   22px;

    /* Motion — one easing curve for the whole site */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:          #14100d;
        --bg-tint:     #1a1512;
        --surface:     #1e1815;
        --ink:         #f2ece2;
        --ink-soft:    #b6a696;
        --ink-faint:   #8d7f71;
        --line:        rgba(242, 236, 226, 0.12);
        --line-strong: rgba(242, 236, 226, 0.20);

        --gold:        #e3bd63;
        --gold-bright: #e3bd63;
        --brown:       #c9a68e;
        --brown-soft:  #a98b76;

        --header-bg:   rgba(20, 16, 13, 0.72);
        --glow-a:      rgba(212, 175, 55, 0.14);
        --glow-b:      rgba(141, 110, 99, 0.12);

        --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md:  0 2px 4px rgba(0, 0, 0, 0.3),
                      0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-lg:  0 4px 8px rgba(0, 0, 0, 0.3),
                      0 20px 48px rgba(0, 0, 0, 0.5);
    }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 100px; /* clears the sticky header on anchor jumps */
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Page has to fill the viewport so the footer sits at the bottom on
       short pages — replaces the old fixed-footer + <br> spacer trick. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.022em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s var(--ease), opacity 0.2s var(--ease);
}
a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

img { max-width: 100%; height: auto; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 3rem 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 200;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--bg);
    font-weight: 600;
    transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: 24px;
}

.prose { max-width: var(--prose-max); }
.prose-center { max-width: var(--prose-max); margin-inline: auto; }

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--tinted { background: var(--bg-tint); }

main { flex: 1 0 auto; }

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

/* Older browsers with no blur support get a solid bar instead of a
   half-transparent one that text would show through. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-header { background: var(--bg); }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 60px;
    padding-block: 8px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    color: var(--ink);
}
.brand:hover { color: var(--ink); opacity: 0.72; }

.brand__mark {
    width: 40px;
    height: 40px;
    display: block;
    border-radius: 50%;
}

.brand__name {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    white-space: nowrap;
}
.brand__sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: 7px 13px;
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--line); }

.site-nav a[aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
    background: var(--line);
}

/* Phones: the brand sits above the nav, and the pills wrap onto as many
   rows as they need. Nothing scrolls sideways and nothing gets clipped —
   every link is visible without the visitor having to discover a swipe. */
@media (max-width: 860px) {
    .site-header__inner {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding-block: 10px;
    }

    .brand__mark { width: 34px; height: 34px; }

    .site-nav { width: 100%; }
    .site-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .site-nav a {
        padding: 6px 13px;
        font-size: 0.82rem;
        background: var(--line);
    }

    /* The stacked header is taller here, so anchor jumps need more clearance. */
    html { scroll-padding-top: 150px; }
}

/* Very narrow phones: trim the pills a little further so the nav stays
   at two rows instead of spilling into three. */
@media (max-width: 400px) {
    .site-nav a { padding: 6px 11px; font-size: 0.79rem; }
    .site-nav ul { gap: 5px; }
}

/* --------------------------------------------------------------------------
   5. Hero (home) & page headers (interior pages)
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-block: clamp(3.5rem, 10vw, 7rem);
}

/* Warm honey glow behind the hero. Radii are given as percentages of this
   box so the gradients always fade to zero *before* the edge — at any
   aspect ratio — instead of getting cut off by the overflow clip. */
.hero::before {
    content: "";
    position: absolute;
    inset: -25% -15%;
    background:
        radial-gradient(ellipse 42% 44% at 50% 42%, var(--glow-a) 0%, transparent 100%),
        radial-gradient(ellipse 30% 32% at 34% 64%, var(--glow-b) 0%, transparent 100%);
    pointer-events: none;
}

.hero > * { position: relative; }

.hero__logo {
    width: clamp(150px, 30vw, 220px);
    margin: 0 auto 1.75rem;
    display: block;
    filter: drop-shadow(0 18px 40px rgba(43, 26, 18, 0.18));
}

.hero__title { margin-bottom: 0.35em; }

.hero__tagline {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.hero__lede {
    max-width: 620px;
    margin: 0 auto 2.25rem;
    font-size: clamp(1.05rem, 2.1vw, 1.3rem);
    line-height: 1.5;
    color: var(--ink-soft);
}

.page-header {
    text-align: center;
    padding-block: clamp(2.75rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.page-header__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.9rem;
}

.page-header__lede {
    max-width: 620px;
    margin: 0 auto;
    font-size: clamp(1.02rem, 2vw, 1.2rem);
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn--primary {
    background: var(--ink);
    color: var(--bg);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}
.btn--secondary:hover {
    color: var(--ink);
    background: var(--surface);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:active { transform: translateY(0); }

/* Inline "Learn more ›" style link */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.95rem;
}
.link-arrow::after {
    content: "›";
    font-size: 1.2em;
    line-height: 1;
    transition: transform 0.2s var(--ease);
}
.link-arrow:hover::after { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   7. Cards & grids
   -------------------------------------------------------------------------- */

.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card--lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); }

/* Lets a card heading take whatever rank the document structure calls for
   while still looking like a card heading - so screen-reader users get a
   correct outline and nobody has to skip a heading level for looks. */
.card__title {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    margin-bottom: 0.5rem;
}

.card__icon {
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

/* Section headings that sit above a grid */
.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.section-head p {
    color: var(--ink-soft);
    font-size: 1.08rem;
}

/* --------------------------------------------------------------------------
   8. Announcement banner
   -------------------------------------------------------------------------- */

.announcement {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    margin: 0 auto;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.42);
    background: rgba(212, 175, 55, 0.13);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
}

.announcement__tag {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
}

/* --------------------------------------------------------------------------
   9. Detail rows (events, contact, stores)
   -------------------------------------------------------------------------- */

.detail-list {
    display: grid;
    gap: 0;
    margin: 1.5rem 0 0;
    padding: 0;
}

.detail-list div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.detail-list div:last-child { border-bottom: 1px solid var(--line); }

.detail-list dt {
    flex: 0 0 90px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding-top: 3px;
}

.detail-list dd {
    flex: 1 1 240px;
    margin: 0;
    font-size: 1.02rem;
}

/* --------------------------------------------------------------------------
   10. Maps
   -------------------------------------------------------------------------- */

.map {
    margin-top: 1.75rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    line-height: 0;
}

.map iframe {
    display: block;
    width: 100%;
    height: clamp(280px, 42vw, 420px);
    border: 0;
}

/* --------------------------------------------------------------------------
   11. Awards
   -------------------------------------------------------------------------- */

.medal {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px 5px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--line-strong);
    color: var(--ink);
}
.medal::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.25);
}
.medal--gold::before   { background: linear-gradient(160deg, #f5d97a, #c99a1e); }
.medal--silver::before { background: linear-gradient(160deg, #eef0f2, #a3aab1); }
.medal--bronze::before { background: linear-gradient(160deg, #e0a878, #a3652f); }

.award-card__meta {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin: 0.35rem 0 1.2rem;
}

/* --------------------------------------------------------------------------
   12. Store / shop blocks
   -------------------------------------------------------------------------- */

.store + .store,
.event + .event { margin-top: clamp(2.5rem, 6vw, 4rem); }

.store__address {
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

/* Vinoshipper injects its own markup here; we only give it room to breathe. */
.shop-embed {
    min-height: 120px;
    margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--bg-tint);
    padding-block: 2.5rem;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }

.site-footer__note { margin: 0; }

@media (max-width: 620px) {
    .site-footer__inner { flex-direction: column; text-align: center; }
    .site-footer ul { justify-content: center; }
}

/* --------------------------------------------------------------------------
   14. Scroll reveal
   -------------------------------------------------------------------------- */

/* Only applied once JS confirms it can run — without the class on <html>,
   content is visible by default and nothing can get stuck hidden. */
.js-reveal .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
    .js-reveal .reveal { opacity: 1; transform: none; }
}
