/* Gori Snack landing page. Colours and rules come from the Master Logo, red and white edition:
 *   Merah Gori #CE1126, Kuning Percikan #F5B30C, Putih #FFFFFF; text #3B2A2A, neutral #F3F1ED, line #E7DCDA, muted #6B5F5F.
 * The logo is never recoloured, stretched, shadowed or placed on yellow; the wordmark is at least 100 px wide, the symbol at least 16 px. */

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
    --red: #CE1126;
    --red-deep: #AB0E20;
    --yellow: #F5B30C;
    --white: #FFFFFF;
    --ink: #3B2A2A;
    --muted: #6B5F5F;
    --cream: #F3F1ED;
    --line: #E7DCDA;
    --radius: 20px;
    --gutter: 20px;
    --max: 1120px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--red); }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-red :focus-visible { outline-color: var(--white); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.top__logo img { width: 100px; height: auto; }
.top nav { display: flex; gap: 4px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink); text-decoration: none; }
.top nav a:hover { background: var(--cream); color: var(--red); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #E3A400; color: var(--ink); }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-deep); color: var(--white); }

/* header cart button */
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--red); color: var(--white); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.cart-btn[hidden] { display: none; }
.cart-btn:hover { background: var(--red-deep); }
.cart-btn__count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--white); color: var(--red); font-size: .8rem; }
.top nav { align-items: center; }

/* hero */
.hero { position: relative; background: var(--red); color: var(--white); padding: 56px 0 120px; overflow: hidden; }
.hero .wrap { display: grid; gap: 28px; justify-items: start; }
.hero__logo { width: min(320px, 78vw); height: auto; }
.hero h1 { margin: 0; max-width: 18ch; font-size: clamp(1.9rem, 6.5vw, 3.2rem); line-height: 1.12; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.hero p { margin: 0; max-width: 46ch; font-size: 1.1rem; font-weight: 500; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; }

/* sections */
.section { padding: 64px 0; }
.section--cream { background: var(--cream); }
.eyebrow { margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.section h2 { margin: 0 0 16px; font-size: clamp(1.6rem, 4.5vw, 2.3rem); line-height: 1.2; font-weight: 800; color: var(--red); text-wrap: balance; }
.lead { max-width: 62ch; margin: 0 0 8px; font-size: 1.05rem; }

/* about + families */
.families { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr; }
.family { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--white); }
.family h3 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; color: var(--red); }
.family p { margin: 0; color: var(--muted); }
.claims { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.claims li { border: 1.5px solid var(--red); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .9rem; color: var(--red); }

/* catalogue */
.tabs { display: none; flex-wrap: wrap; gap: 10px; margin: 8px 0 26px; }
.js .tabs { display: flex; }
.tab { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font: inherit; font-weight: 800; color: var(--ink); cursor: pointer; }
.tab:hover { border-color: var(--red); color: var(--red); }
.tab[aria-pressed='true'] { background: var(--red); border-color: var(--red); color: var(--white); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.card { display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.card[hidden] { display: none; }
.card__photo { aspect-ratio: 4 / 3; background: var(--cream); display: grid; place-items: center; }
.card__photo img { width: 100%; height: 100%; object-fit: cover; }
.card__photo .placeholder { width: 28%; height: auto; opacity: .3; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.card__tag { align-self: flex-start; border-radius: 999px; background: var(--red); color: var(--white); padding: 2px 12px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.card h3 { margin: 0; font-size: 1.05rem; line-height: 1.3; font-weight: 800; }
.card__size { margin: 0; font-weight: 700; color: var(--red); }
.card__text { margin: 0; font-size: .92rem; color: var(--muted); }

.card__price { margin: 2px 0 0; font-size: 1.1rem; font-weight: 800; color: var(--ink); }
.card__ask { font-weight: 700; font-size: .9rem; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: .9rem; margin-top: 6px; }
.js .btn--small[hidden] { display: inline-flex; }

.empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); }

/* cart */
.cart { width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 24px); margin: auto; padding: 0; border: 0; border-radius: var(--radius); color: var(--ink); background: var(--white); overflow: auto; }
.cart::backdrop { background: rgba(59, 42, 42, .55); }
.cart > * { margin-left: 20px; margin-right: 20px; }
.cart__head { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.cart__head h2 { margin: 0; font-size: 1.4rem; color: var(--red); }
.cart__close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--cream); font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; }
.cart__lines { list-style: none; padding: 0; margin-top: 8px; margin-bottom: 0; }
.cart__line { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart__info { display: grid; }
.cart__meta { color: var(--muted); font-size: .85rem; }
.cart__stepper { display: inline-flex; align-items: center; gap: 4px; }
.cart__step { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); font-size: 1.2rem; font-weight: 800; color: var(--ink); cursor: pointer; }
.cart__step:hover { border-color: var(--red); color: var(--red); }
.cart__qty { min-width: 28px; text-align: center; font-weight: 800; }
.cart__line-total { grid-column: 1 / -1; justify-self: end; font-weight: 800; }
.cart form { display: grid; gap: 12px; margin-top: 14px; margin-bottom: 20px; }
.cart label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.cart input, .cart textarea { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: var(--white); }
.cart input:focus-visible, .cart textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.cart__total { display: flex; justify-content: space-between; margin: 0; font-size: 1.1rem; }
.cart__note { margin: 0; color: var(--muted); font-size: .85rem; }
.cart__error { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FDE3E5; color: #8C101F; font-weight: 700; font-size: .9rem; }
[data-cart-empty] { margin-top: 12px; margin-bottom: 20px; color: var(--muted); }

/* contact */
.contact { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 26px; }
.contact__item { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.contact__item dt { margin: 0 0 2px; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact__item dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* footer */
.foot { background: var(--red); color: var(--white); padding: 34px 0; }
.foot .wrap { display: grid; gap: 14px; justify-items: start; }
.foot img { width: 140px; height: auto; }
.foot p { margin: 0; font-size: .9rem; }
.foot a { color: var(--white); font-weight: 700; }

@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .families { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hero { padding: 84px 0 150px; }
    .hero__wave { height: 100px; }
}

@media (max-width: 520px) {
    /* the logo, the cart button and one link fit a phone header; the other links are one tap away in the page */
    .top nav a:not([href='#produk']) { display: none; }
    .top .wrap { gap: 8px; }
}

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