/* Abu Nut landing page
   V1 light kitchen shell (hero + order builder) with V2's dark roast panel for story + why.
   The dark panel is ONE deliberate theme switch: a rounded sheet sliding over the cream page.
   Shape rule: cards/images 24px radius, buttons and steppers full pill. */

@font-face { font-family: "Bricolage"; src: url("assets/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Anton"; src: url("assets/fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #F9F0DF;
  --surface: #FFF8EC;
  --ink: #3A1F16;
  --ink-soft: #6A4A3A;
  --peanut: #E19D4A;
  --peanut-soft: #F6D49E;
  --line: rgba(58, 31, 22, .14);
  --btn-bg: #3A1F16;
  --btn-fg: #FFF8EC;
  --shadow: 0 24px 60px -24px rgba(108, 58, 24, .45);
  --r: 24px;
  /* dark roast panel */
  --d-bg: #160D09;
  --d-surface: #23150E;
  --d-ink: #F9F0DF;
  --d-soft: #C9B39A;
  --d-peanut: #E9A859;
  --d-on-peanut: #1C100A;
  --d-line: rgba(249, 240, 223, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1F120D;
    --surface: #2B1A12;
    --ink: #F9F0DF;
    --ink-soft: #CDB8A0;
    --peanut: #E9A859;
    --peanut-soft: #3E2618;
    --line: rgba(249, 240, 223, .14);
    --btn-bg: #E9A859;
    --btn-fg: #1F120D;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
    --d-bg: #120A07;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { font-family: "Bricolage", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.03em; font-weight: 750; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
section { scroll-margin-top: 90px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 767px) { .wrap { padding-inline: 16px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 650; text-decoration: none; white-space: nowrap; transition: transform .35s cubic-bezier(.16, 1, .3, 1), background-color .25s, box-shadow .35s, opacity .25s; }
.btn i { font-size: 1.25em; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn--sm { padding: .65rem 1.1rem; font-size: .95rem; }
.btn--block { width: 100%; }
.btn.is-disabled { opacity: .45; box-shadow: none; cursor: not-allowed; transform: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--peanut); outline-offset: 3px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav__inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav__brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__brand img { width: 48px; height: auto; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a { text-decoration: none; color: var(--ink-soft); font-weight: 550; }
.nav__links a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav__links { display: none; } }

/* Hero (V1, images swapped) */
.hero { min-height: calc(100dvh - 72px); display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; padding-block: 3rem 5rem; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); max-width: 12ch; }
.hero__sub { margin-top: 1.4rem; font-size: 1.2rem; color: var(--ink-soft); max-width: 40ch; }
.hero__ctas { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__art { position: relative; justify-self: end; width: min(100%, 560px); }
.hero__photo { width: 100%; aspect-ratio: 1080 / 1115; object-fit: cover; border-radius: var(--r); box-shadow: var(--shadow); }
.hero__sticker { position: absolute; width: 30%; top: -7%; left: -7%; filter: drop-shadow(0 14px 22px rgba(58, 31, 22, .3)); transform: rotate(-9deg); }
.hero__inset { position: absolute; width: 46%; bottom: -10%; left: -18%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 18px; border: 6px solid var(--bg); box-shadow: var(--shadow); transform: rotate(4deg); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 2rem 5rem; gap: 3.5rem; }
  .hero__art { justify-self: center; width: min(86%, 480px); }
  .hero__inset { left: auto; right: -10%; bottom: -10%; }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-load { animation: rise .9s cubic-bezier(.16, 1, .3, 1) both; }
  .reveal-load.d1 { animation-delay: .12s; }
  .reveal-load.d2 { animation-delay: .24s; }
  .hero__art { animation: rise 1.1s .15s cubic-bezier(.16, 1, .3, 1) both; }
  .hero__sticker { animation: wobble 6s ease-in-out infinite; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }
  @keyframes wobble { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(-4deg) translateY(-6px); } }
  [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
  [data-reveal].is-in { opacity: 1; transform: none; }
  .nudge { animation: nudge .45s cubic-bezier(.36, .07, .19, .97); }
  @keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
}

/* Dark roast sheet (V2) */
.sheet { background: var(--d-bg); color: var(--d-ink); border-radius: 40px; margin-inline: clamp(0px, 1.5vw, 20px); padding-bottom: clamp(3rem, 7vw, 6rem); }
.sheet h2 { font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; line-height: .95; letter-spacing: .005em; font-size: clamp(2.4rem, 5vw, 4.2rem); }
.sheet h3 { font-size: 1.2rem; font-weight: 750; letter-spacing: -0.01em; }
@media (max-width: 767px) { .sheet { border-radius: 28px; } }

.story { display: grid; grid-template-columns: 1fr minmax(260px, 360px) 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; padding-block: clamp(5rem, 10vw, 8rem) clamp(3rem, 7vw, 6rem); }
.story__num { display: grid; justify-items: end; text-align: right; }
.num { font-family: "Anton", sans-serif; font-size: clamp(8rem, 17vw, 15rem); line-height: .85; color: var(--d-peanut); }
.num__label { margin-top: 1rem; font-weight: 700; font-size: 1.15rem; color: var(--d-soft); }
.story__video { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 9 / 16; background: #000; box-shadow: 0 40px 90px -30px rgba(233, 168, 89, .35); }
.story__video video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: auto 0 1.25rem; margin-inline: auto; width: max-content; display: flex; align-items: center; gap: .6rem; padding: .85rem 1.3rem; border: 0; border-radius: 999px; background: var(--d-peanut); color: var(--d-on-peanut); font: inherit; font-weight: 750; cursor: pointer; transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
.play i { font-size: 1.3rem; }
.play:hover { transform: translateY(-2px); }
.play:active { transform: scale(.97); }
[data-video].is-playing .play { opacity: 0; pointer-events: none; }
.story__copy p { margin-top: 1.2rem; color: var(--d-soft); font-size: 1.1rem; max-width: 40ch; }
@media (max-width: 960px) {
  .story { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .story__num { justify-items: center; text-align: center; }
  .story__video { width: min(100%, 340px); }
  .story__copy p { margin-inline: auto; }
}

/* Why: living bento */

.why__grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: 300px 220px; gap: 1rem; }
.tile { position: relative; overflow: hidden; border-radius: 20px; background: var(--d-surface); border: 1px solid var(--d-line); transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .8s cubic-bezier(.16, 1, .3, 1); }
.tile:hover { transform: translateY(-4px); }

.tile--accent { grid-row: span 2; background: var(--d-peanut); color: var(--d-on-peanut); border: 0; padding: 2rem; display: flex; align-items: flex-end; }
.tile--accent h2 { position: relative; z-index: 1; max-width: 8ch; }

.tile--photo { margin: 0; }
.tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.tile--photo:first-of-type img { object-position: 0% 100%; transform: scale(1.7); transform-origin: 0% 100%; }
.tile--photo:first-of-type:hover img { transform: scale(1.8); }
.tile--tub img { object-position: 50% 62%; }
.tile--photo:hover img { transform: scale(1.06); }
.tile--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 13, 9, 0) 35%, rgba(22, 13, 9, .88)); }
.tile--photo figcaption { position: absolute; z-index: 1; left: 1.5rem; right: 1.5rem; bottom: 1.4rem; display: grid; gap: .2rem; color: var(--d-ink); }
.tile--photo figcaption i { width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; font-size: 1.4rem; background: var(--d-peanut); color: var(--d-on-peanut); margin-bottom: .5rem; }
.tile--photo figcaption strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.tile--photo figcaption span { color: var(--d-soft); }

.tile--fuel { grid-column: span 2; display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); padding: 2rem; background: linear-gradient(120deg, var(--d-surface), #3A2215); }
.fuel__icon { flex: none; width: clamp(88px, 10vw, 120px); height: clamp(88px, 10vw, 120px); border-radius: 999px; display: grid; place-items: center; font-size: clamp(2.6rem, 4vw, 3.4rem); background: var(--d-peanut); color: var(--d-on-peanut); }
.tile--fuel strong { font-family: "Anton", sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
.fuel__chips { list-style: none; padding: 0; margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.fuel__chips li { padding: .4rem .9rem; border-radius: 999px; border: 1.5px solid rgba(233, 168, 89, .5); color: var(--d-ink); font-weight: 600; font-size: .95rem; transition: background-color .25s, color .25s; }
.fuel__chips li:hover { background: var(--d-peanut); color: var(--d-on-peanut); }

@media (prefers-reduced-motion: no-preference) {
  .fuel__icon { animation: lift 2.4s ease-in-out infinite; }
  @keyframes lift { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-12deg); } }
  .why__grid [data-reveal]:nth-child(2) { transition-delay: .08s; }
  .why__grid [data-reveal]:nth-child(3) { transition-delay: .16s; }
  .why__grid [data-reveal]:nth-child(4) { transition-delay: .24s; }
}

@media (max-width: 960px) {
  .why__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 340px 260px auto; }
  .tile--accent { grid-row: auto; grid-column: span 2; }
}
@media (max-width: 600px) {
  .why__grid { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: auto; }
  .tile--accent, .tile--fuel { grid-column: auto; }
  .tile--accent { min-height: 220px; }
  .tile--photo { min-height: 260px; }
  .tile--fuel { flex-direction: column; align-items: flex-start; }
}

/* Order builder */
.order { padding-block: clamp(4rem, 9vw, 7rem); }
.order__intro { margin-top: 1rem; font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; }
.builder { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; align-items: start; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product:nth-child(1) img { object-position: 50% 55%; }
.product:nth-child(2) img { object-position: 50% 100%; }
.product__body { padding: 1.4rem 1.4rem 1.2rem; display: grid; gap: .25rem; }
.product__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.product__head h3 { font-size: 1.5rem; }
.size { padding: .3rem .8rem; border-radius: 999px; background: var(--peanut); color: #2A160F; font-weight: 750; font-size: .95rem; }
.product__desc { color: var(--ink-soft); margin-bottom: .8rem; }
.flavour { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .7rem .7rem 1rem; border-radius: 999px; border: 1.5px solid var(--line); margin-top: .5rem; transition: border-color .25s, background-color .25s; }
.flavour.is-active { border-color: var(--peanut); background: color-mix(in srgb, var(--peanut) 14%, transparent); }
.flavour__name { font-weight: 650; }
.stepper { display: flex; align-items: center; gap: .35rem; }
.stepper button { width: 38px; height: 38px; border-radius: 999px; border: 0; background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; font-size: 1.05rem; cursor: pointer; transition: transform .2s cubic-bezier(.16, 1, .3, 1), opacity .2s; }
.stepper button:active { transform: scale(.92); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 750; font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.summary { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; display: grid; gap: 1rem; box-shadow: var(--shadow); }
.summary h3 { font-size: 1.4rem; }
.summary__empty { color: var(--ink-soft); }
.summary__list { list-style: none; padding: 0; display: grid; gap: .55rem; }
.summary__list:empty { display: none; }
.summary__list li { display: flex; gap: .6rem; font-weight: 550; }
.summary__list .q { min-width: 2.4ch; color: var(--peanut); font-weight: 800; font-variant-numeric: tabular-nums; }
.summary__total { padding-top: .8rem; border-top: 1px solid var(--line); font-weight: 750; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 650; font-size: .95rem; }
.field label span { font-weight: 450; color: var(--ink-soft); }
.field input { font: inherit; padding: .8rem 1rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
.field input:focus { border-color: var(--peanut); outline: none; }
.field input[aria-invalid="true"] { border-color: #C0392B; }
.field__error { color: #B0301F; font-size: .9rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .field__error { color: #F08A7A; } .field input[aria-invalid="true"] { border-color: #F08A7A; } }
@media (max-width: 1080px) { .builder { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 680px) { .products { grid-template-columns: 1fr; } }

/* Footer */
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 2rem 6rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
.footer a { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer a:hover { color: var(--ink); }
@media (min-width: 768px) { .footer { padding-bottom: 2.5rem; } }

/* Mobile helpers */
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 60px; height: 60px; border-radius: 999px; display: none; place-items: center; background: var(--btn-bg); color: var(--btn-fg); font-size: 1.9rem; box-shadow: var(--shadow); text-decoration: none; }
.cartbar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; display: none; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.3rem; border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; font-weight: 600; box-shadow: var(--shadow); }
.cartbar span { display: inline-flex; align-items: center; gap: .45rem; }
.cartbar__go { font-weight: 750; }
@media (max-width: 1080px) { .cartbar { display: flex; } }
@media (max-width: 767px) { .fab { display: grid; } }
