/* Beercounter – landing page styles (index.html only; subpages keep style.css) */

@font-face {
    font-family: "Rye";
    src: url("./fonts/rye.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Archivo";
    src: url("./fonts/archivo.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-display: swap;
}

:root {
    --black: #000;           /* the app's background */
    --stout: #15120c;        /* raised surfaces */
    --brass: #a8822a;        /* the app's outline gold */
    --gold: #ffde59;         /* brand yellow */
    --amber: #e9a619;        /* beer */
    --foam: #f5efe0;         /* text */
    --muted: #a39a85;

    --display: "Rye", Georgia, serif;
    --body: "Archivo", system-ui, sans-serif;

    --gutter: clamp(16px, 5vw, 72px);
    --max: 1240px;

    /* honeycomb, same as the app background */
    --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 0v34' fill='none' stroke='%23a8822a' stroke-width='1'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--black);
    color: var(--foam);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.05;
    margin: 0;
    color: var(--gold);
}
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
p { margin: 0; }

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

section {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(64px, 9vw, 120px) var(--gutter);
}

/* ---------- Top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px var(--gutter);
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(168, 130, 42, .35);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--display);
    font-size: 1.25rem;
    color: var(--gold);
}
.topbar nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); }
.topbar nav a {
    text-decoration: none;
    font-size: .95rem;
    color: var(--muted);
    transition: color .15s;
}
.topbar nav a:hover { color: var(--foam); }
.topbar nav .nav-cta {
    color: var(--black);
    background: var(--gold);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
}
.topbar nav .nav-cta:hover { color: var(--black); background: #ffe88a; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding-top: clamp(48px, 8vw, 110px);
    padding-bottom: clamp(64px, 9vw, 120px);
    max-width: none;
    isolation: isolate;
}
/* honeycomb that fades out towards the edges */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--hex);
    background-size: 56px 100px;
    opacity: .45;
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 45%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 60% 70% at 70% 45%, #000 0%, transparent 75%);
}
.hero > * { max-width: calc(var(--max) * .6); }
.hero-copy { justify-self: end; width: 100%; }
.hero-phone { justify-self: start; }

.hero h1 {
    font-size: clamp(2.7rem, 6.2vw, 6.3rem);
    letter-spacing: -.01em;
    margin-left: -.04em;
    white-space: nowrap;
}
.lede {
    margin-top: 20px;
    max-width: 30em;
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    color: var(--foam);
}

.stores {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.store {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 16px;
    border: 1px solid var(--brass);
    border-radius: 12px;
    text-decoration: none;
    background: var(--stout);
    transition: border-color .15s, background .15s;
}
.store:hover { border-color: var(--gold); background: #211b0f; }
.store span {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.15;
}
.store small { font-weight: 400; font-size: .72rem; color: var(--muted); }

/* the little playable counter */
.tally {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 44px;
    max-width: 30rem;
    padding: 16px 16px 16px 20px;
    border: 1px dashed rgba(168, 130, 42, .6);
    border-radius: 18px;
}
.glass { width: 44px; height: 58px; flex: none; color: var(--foam); }
.glass-beer { fill: var(--amber); transition: y .45s cubic-bezier(.3, 1.4, .6, 1), height .45s cubic-bezier(.3, 1.4, .6, 1); }
.glass-foam { fill: var(--foam); transition: y .45s cubic-bezier(.3, 1.4, .6, 1); }
.tally-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tally-count {
    font-family: var(--display);
    font-size: 2.2rem;
    line-height: 1;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}
.tally-note { font-size: .9rem; color: var(--muted); margin-top: 4px; }

/* bottle cap, like the big button in the app */
.cap {
    flex: none;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: var(--black);
    background: var(--gold);
    clip-path: polygon(50% 0%, 59% 6%, 69% 4%, 75% 13%, 85% 15%, 87% 25%, 96% 31%, 94% 41%, 100% 50%, 94% 59%, 96% 69%, 87% 75%, 85% 85%, 75% 87%, 69% 96%, 59% 94%, 50% 100%, 41% 94%, 31% 96%, 25% 87%, 15% 85%, 13% 75%, 4% 69%, 6% 59%, 0% 50%, 6% 41%, 4% 31%, 13% 25%, 15% 15%, 25% 13%, 31% 4%, 41% 6%);
    transition: background .15s;
}
.cap svg { width: 30px; height: 30px; }
.cap:hover { background: #ffe88a; }
.cap:focus-visible { outline: none; background: var(--foam); }
.cap.pop { animation: pop .3s ease-out; }
@keyframes pop {
    0% { transform: scale(1) rotate(0); }
    40% { transform: scale(.88) rotate(-12deg); }
    100% { transform: scale(1) rotate(0); }
}

/* phone frame */
.phone {
    border-radius: 34px;
    padding: 8px;
    background: #1d1a14;
    border: 1px solid #3a3122;
    box-shadow: 0 40px 70px -30px rgba(233, 166, 25, .18);
}
.phone img { border-radius: 26px; width: 100%; height: auto; }
.hero-phone .phone {
    width: clamp(240px, 26vw, 330px);
    transform: rotate(3deg);
}

/* ---------- Features ---------- */

.features {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(40px, 7vw, 110px);
    align-items: start;
    border-top: 1px solid rgba(168, 130, 42, .3);
}
.features-intro p {
    margin-top: 24px;
    max-width: 34em;
    color: var(--muted);
    font-size: 1.1rem;
}

/* written like the "Sum" list on the home screen: label ...... value */
.menu { margin: 0; }
.menu div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(168, 130, 42, .25);
}
.menu div:first-child { padding-top: 6px; }
.menu dt {
    font-family: var(--display);
    color: var(--gold);
    font-size: 1.2rem;
    white-space: nowrap;
}
.menu dt::after {
    content: "";
    display: inline-block;
    width: 0;
}
.menu div::before {
    content: "";
    order: 1;
    flex: 1;
    min-width: 24px;
    border-bottom: 2px dotted rgba(168, 130, 42, .55);
    transform: translateY(-5px);
}
.menu dd {
    order: 2;
    margin: 0;
    text-align: right;
    color: var(--foam);
    max-width: 18em;
}

/* ---------- Screenshots ---------- */

.screens { max-width: none; padding-left: 0; padding-right: 0; }
.screens h2 { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.strip {
    display: flex;
    gap: clamp(16px, 2.4vw, 32px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 48px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--brass) transparent;
}
.strip figure {
    flex: 0 0 clamp(200px, 19vw, 240px);
    margin: 0;
    scroll-snap-align: center;
}
.strip figure:nth-child(even) { margin-top: 48px; }
.strip .phone { box-shadow: none; }
.strip figcaption {
    margin-top: 14px;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
}

/* ---------- Reviews ---------- */

.reviews-head p { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }
.review-grid {
    margin-top: 48px;
    columns: 3 280px;
    column-gap: 20px;
}
.review-grid img {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 16px;
    border: 1px solid #2c2820;
    break-inside: avoid;
}
/* one review screenshot is from a light-mode device – flip it to match */
.review-grid img.light { filter: invert(.9) hue-rotate(180deg); border-color: #d6d2c8; }

/* ---------- Merch ---------- */

.merch { padding-top: 0; }
.merch a { display: block; border-radius: 20px; overflow: hidden; border: 1px solid #2c2820; }
.merch img { width: 100%; height: auto; transition: transform .4s ease; }
.merch a:hover img { transform: scale(1.015); }

/* ---------- Feedback + socials ---------- */

.contact {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: end;
    border-top: 1px solid rgba(168, 130, 42, .3);
}
.contact p { margin-top: 16px; color: var(--muted); font-size: 1.1rem; max-width: 30em; }
.btn {
    display: inline-block;
    margin-top: 28px;
    padding: 14px 26px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--black);
    font-weight: 600;
    text-decoration: none;
}
.btn:hover { background: #ffe88a; }

.socials { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.socials a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s;
}
.socials a:hover { background: var(--stout); }
.socials img { width: 28px; height: 28px; }

/* ---------- Footer ---------- */

footer {
    max-width: var(--max);
    margin: 0 auto;
    padding: 48px var(--gutter) 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px 48px;
    align-items: center;
    border-top: 1px solid rgba(168, 130, 42, .3);
    font-size: .95rem;
}
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand img { border-radius: 14px; }
.foot-brand p { font-family: var(--display); color: var(--gold); line-height: 1.2; }
.foot-brand span { font-family: var(--body); color: var(--muted); font-size: .85rem; }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; }
footer nav a { color: var(--muted); text-decoration: none; }
footer nav a:hover { color: var(--foam); text-decoration: underline; }
.foot-note { grid-column: 1 / -1; color: #6f685a; font-size: .85rem; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero > * { max-width: none; }
    .hero-copy, .hero-phone { justify-self: stretch; }
    .hero-phone { display: flex; justify-content: center; }
    .hero::before {
        -webkit-mask-image: radial-gradient(ellipse 90% 50% at 50% 75%, #000 0%, transparent 75%);
                mask-image: radial-gradient(ellipse 90% 50% at 50% 75%, #000 0%, transparent 75%);
    }
    .features, .contact { grid-template-columns: 1fr; }
    footer { grid-template-columns: 1fr; }
    footer nav { justify-content: flex-start; }
}

@media (max-width: 600px) {
    .topbar nav a:not(.nav-cta) { display: none; }
    .menu div { flex-wrap: wrap; gap: 2px 12px; }
    .menu div::before { display: none; }
    .menu dt { width: 100%; }
    .menu dd { text-align: left; color: var(--muted); }
    .strip figure:nth-child(even) { margin-top: 0; }
    .tally { gap: 14px; padding: 14px; }
    .cap { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .glass-beer, .glass-foam, .merch img { transition: none; }
    .cap.pop { animation: none; }
}
