/* CookkiCookki by Theresia – concept demo.
   World: a pantry shelf. Cookies come by the jar (two real sizes), kueh lapis by the slab;
   red jar lids mark everything you can press. Each part of the page sits on a different shelf colour. */
@font-face { font-family: "Bespoke Serif"; src: url(../fonts/bespoke-serif-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url(../fonts/cabinet-grotesk-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url(../fonts/cabinet-grotesk-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url(../fonts/cabinet-grotesk-800.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --pandan: #e4ecd6;    /* page ground */
  --pandan-d: #213820;  /* deep pandan */
  --gold: #f4d68e;      /* butter */
  --paper: #fbfaf5;
  --choc: #27190c;      /* ink */
  --soft: #5b4a38;
  --red: #b3261e;       /* jar lids, actions */
  --shelf: #8a5a2b;
  --small: 15px;
  --body: clamp(17px, 0.3vw + 16px, 19px);
  --lead: 21px;
  --sub: 28px;
  --display: clamp(40px, 3.6vw + 12px, 72px);
  --m: clamp(18px, 3.4vw, 48px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--pandan); color: var(--choc); font: 500 var(--body)/1.55 "Cabinet Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, .logo, .foot-name { font-family: "Bespoke Serif", Georgia, serif; font-weight: 500; letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: var(--display); }
h3 { font-size: var(--lead); font-weight: 700; line-height: 1.25; }
.demo { background: var(--choc); color: #ece3cf; font-size: var(--small); text-align: center; padding: 8px var(--m); }

/* ---------- top ---------- */
.top { display: flex; align-items: center; gap: 28px; padding: 18px var(--m); }
.logo { font-size: 26px; text-decoration: none; margin-right: auto; }
.top nav { display: flex; gap: 26px; }
.top nav a, .top-ig { text-decoration: none; padding: 10px 0; }
.top nav a:hover, .top-ig:hover { text-decoration: underline; }
.top-ig { font-weight: 700; color: var(--red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--red); color: #fff;
  font-weight: 700; font-size: var(--body); text-decoration: none; cursor: pointer; transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.btn:hover { background: #951d17; }
.btn-alt { background: transparent; color: var(--choc); box-shadow: inset 0 0 0 2px var(--choc); }
.btn-alt:hover { background: var(--choc); color: var(--paper); }
.link-btn { background: none; border: 0; padding: 10px 4px; font-weight: 700; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.btn:active, .link-btn:active, .add:active, .ask:active, .switch button:not([disabled]):active, .size-jar:active, .l-qty button:active { transform: scale(0.97); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px); padding: 20px var(--m) 72px; align-items: end; }
.hero h1 { font-size: clamp(44px, 4.6vw + 6px, 78px); margin-bottom: 22px; }
.lead { font-size: var(--lead); max-width: 34ch; margin-bottom: 18px; }
.batch-line { display: inline-block; background: var(--gold); padding: 8px 14px; border-radius: 10px; font-weight: 700; margin-bottom: 26px; }
.closed .batch-line { background: var(--paper); }
.jar-sizes { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.size-jar { display: grid; justify-items: start; gap: 2px; min-height: 64px; padding: 10px 18px; border: 2px solid var(--choc); background: transparent; cursor: pointer; border-radius: 16px; text-align: left; transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.size-jar span { font-weight: 800; } .size-jar small { color: var(--soft); font-size: var(--small); }
.size-jar[aria-checked="true"] { background: var(--choc); color: var(--paper); }
.size-jar[aria-checked="true"] small { color: #e6dcc6; }
.hero-shelf { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; padding-bottom: 24px; }
.hero-shelf::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: 0; height: 24px; background: var(--shelf); border-radius: 4px; }
.hero-shelf img { width: 100%; height: clamp(260px, 30vw, 420px); object-fit: cover; border-radius: 999px 999px 12px 12px; }
.hero-shelf figure:nth-child(2) img { height: clamp(320px, 36vw, 520px); }
.hero-shelf figcaption { font-weight: 700; font-size: var(--small); margin: 8px 4px 0; }

/* ---------- section heads ---------- */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: 48px; }
.sec-head p { max-width: 44ch; color: var(--soft); }

/* ---------- cookie jars: her real jars beside a printed menu ---------- */
.jars { padding: 96px var(--m) 110px; }
.jar-layout { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.jar-photos { position: sticky; top: 18px; display: grid; gap: 14px; }
.jar-photos img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.jar-photos figure:first-child img { aspect-ratio: 1 / 0.95; }
.jar-photos figcaption { font-size: var(--small); color: var(--soft); margin-top: 8px; }
.menu { background: var(--paper); border-radius: 22px; padding: 8px 26px; border-top: 14px solid var(--red); }
.menu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 2px dotted #d9cdb8; transition: background-color 300ms var(--ease); }
.menu-row:last-child { border-bottom: 0; }
.menu-head { padding: 18px 0 6px; font-size: var(--small); font-weight: 700; color: var(--soft); border-bottom: 2px dotted #d9cdb8; }
.menu-head .prices { font-weight: 700; }
.menu-row h3 { font-size: var(--lead); }
.menu-row .desc { margin-top: 2px; }
.menu-row .pick-col { justify-items: end; }
.menu-row.picked h3::after { content: " ●"; color: var(--red); }
.desc { color: var(--soft); }
.prices { font-weight: 700; }
.price-batch { display: block; font-weight: 500; font-size: var(--small); color: var(--soft); }
.price-closed { display: none; color: var(--soft); }
.price-closed.always, .closed .price-closed { display: block; }
.closed .prices { display: none; }
.menu-label { font-size: var(--small); font-weight: 700; color: var(--pandan-d); }
/* size switch with a sliding knob, a price sticker that flips, a +1 when you add */
.pick-col { display: grid; gap: 8px; justify-items: start; }
.pick { display: flex; align-items: center; gap: 16px; }
.switch { position: relative; display: inline-grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--pandan); isolation: isolate; }
.switch button { position: relative; z-index: 1; display: grid; justify-items: center; min-height: 52px; min-width: 76px; padding: 4px 12px; border: 0; border-radius: 999px; background: none; color: var(--choc); cursor: pointer; line-height: 1.1; transition: color 220ms var(--ease), transform 160ms var(--ease); }
.switch button b { font-weight: 800; font-size: 16px; }
.switch button small { font-size: 13px; opacity: 0.85; }
.switch button[aria-checked="true"] { color: var(--paper); }
.switch button[disabled] { cursor: not-allowed; color: #9a8c7a; }
.switch button[disabled] b { text-decoration: line-through; }
.switch .knob { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 999px; background: var(--choc);
  transform: translateX(calc(var(--i) * 100%)); transition: transform 280ms cubic-bezier(0.34, 1.4, 0.64, 1); }
.tag { position: relative; flex: none; display: grid; place-content: center; justify-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--red); color: #fff;
  transform: rotate(-8deg); outline: 2px dashed rgba(255, 255, 255, 0.75); outline-offset: -7px; line-height: 1.05; text-align: center; }
.tag-price { font-family: "Bespoke Serif", Georgia, serif; font-size: 23px; }
.tag-unit { font-size: 13px; font-weight: 700; }
.tag.flip { animation: tagflip 320ms var(--ease); }
@keyframes tagflip { 0% { transform: rotate(-8deg); } 45% { transform: rotate(-8deg) rotateY(90deg) scale(0.94); } 100% { transform: rotate(-8deg); } }
.tag-count { position: absolute; top: -8px; right: -10px; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 15px; background: var(--choc); color: var(--gold); display: grid; place-items: center;
  font-size: 14px; font-weight: 800; transform: rotate(8deg); }
.tag-count.bump { animation: bump 300ms var(--ease); }
@keyframes bump { 40% { transform: rotate(8deg) scale(1.25); } }
.add { position: relative; }
.plus1 { position: absolute; left: 50%; top: -6px; pointer-events: none; font-weight: 800; color: var(--red); animation: plus1 700ms var(--ease) forwards; }
@keyframes plus1 { from { opacity: 0; transform: translate(-50%, 4px) scale(0.9); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -30px) scale(1); } }
.hint { font-size: var(--small); font-weight: 700; color: var(--pandan-d); min-height: 1.4em; }
.closed .tag { background: var(--soft); }
.closed .hint { display: none; }
.add, .ask { min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; cursor: pointer; transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.add:hover, .ask:hover { background: #951d17; }
.in-order { min-height: 1.5em; font-size: var(--small); font-weight: 800; color: var(--red); }

/* ---------- layer cakes ---------- */
.cakes { background: var(--gold); padding: 110px var(--m); }
.cake-list { display: grid; gap: 28px; }
.cake-card { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 48px); align-items: center; background: var(--paper); border-radius: 22px; padding: 22px; }
.cake-pic img { width: 100%; height: 260px; object-fit: cover; border-radius: 14px; }
.cake-card.no-pic { grid-template-columns: 1fr; }
.cake-text { display: grid; gap: 8px; }
.cake-text h3 { font-family: "Bespoke Serif", Georgia, serif; font-weight: 500; font-size: var(--sub); }

/* ---------- order ---------- */
.order { background: var(--paper); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: clamp(28px, 4vw, 64px); padding: 110px var(--m); align-items: start; }
.order-main h2 { margin-bottom: 14px; }
.order-intro { color: var(--soft); max-width: 50ch; margin-bottom: 28px; }
.lines { display: grid; gap: 10px; margin-bottom: 12px; }
.lines li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; background: var(--pandan); border-radius: 14px; padding: 10px 12px; }
.lines li.fresh { animation: fresh 700ms var(--ease); }
@keyframes fresh { from { background: var(--gold); } }
.l-name { font-weight: 800; }
.lines select { min-height: 44px; border: 2px solid #c9d5b5; border-radius: 10px; background: var(--paper); padding: 0 8px; }
.l-qty { display: inline-flex; align-items: center; gap: 4px; }
.l-qty button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--paper); font-size: 20px; cursor: pointer; transition: transform 160ms var(--ease); }
.l-qty input { width: 3ch; text-align: center; border: 0; background: none; font-weight: 800; font-size: var(--lead); }
.l-qty input[aria-invalid="true"] { color: var(--red); }
.l-price { font-weight: 800; min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.l-remove { border: 0; background: none; text-decoration: underline; cursor: pointer; min-height: 44px; color: var(--soft); }
.empty { color: var(--soft); margin-bottom: 18px; }
.pickups { border: 0; padding: 0; margin: 28px 0 0; }
.pickups legend { font-family: "Bespoke Serif", Georgia, serif; font-size: var(--sub); margin-bottom: 12px; }
.pk-day { margin-bottom: 14px; }
.pk-date { font-weight: 800; margin-bottom: 8px; }
.pk-day { display: block; }
.pk-day .pk { display: inline-flex; align-items: center; gap: 10px; margin: 0 8px 8px 0; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--pandan); cursor: pointer; min-height: 48px; transition: background-color 160ms var(--ease); }
.pk input { width: 20px; height: 20px; accent-color: var(--red); }
.pk-place { font-weight: 800; } .pk-time { color: var(--soft); font-variant-numeric: tabular-nums; }
.pk:has(input:checked) { background: var(--gold); }
.pickup-notes { margin-top: 6px; display: grid; gap: 4px; color: var(--soft); font-size: var(--small); }
.pickup-notes li::before { content: "– "; }
.closed-note { margin-top: 24px; background: var(--gold); border-radius: 14px; padding: 16px 18px; font-weight: 700; max-width: 60ch; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.field { display: grid; gap: 6px; } .field.wide { grid-column: 1 / -1; }
.field > span { font-weight: 700; font-size: var(--small); }
.field input, .field textarea { min-height: 48px; padding: 10px 12px; border: 2px solid #d7dcc9; border-radius: 12px; background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--choc); outline: none; }

.slip { position: sticky; top: 18px; background: #fff; border-radius: 22px; padding: 0 24px 24px; border: 3px solid var(--choc); }
.slip-lid { height: 22px; margin: -3px -27px 18px; background: var(--red); border-radius: 18px 18px 0 0; }
.slip h3 { font-family: "Bespoke Serif", Georgia, serif; font-weight: 500; font-size: var(--sub); margin-bottom: 12px; }
.slip-lines { display: grid; gap: 6px; margin-bottom: 8px; }
.slip-lines li { display: flex; justify-content: space-between; gap: 12px; } .slip-lines b { font-variant-numeric: tabular-nums; }
.slip-empty { color: var(--soft); margin-bottom: 8px; }
.slip-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 12px 0; border-top: 2px dashed #d8cbb6; margin-top: 8px; }
.slip-meta dt { color: var(--soft); } .slip-meta dd { font-weight: 800; text-align: right; }
#slip-total { font-size: var(--sub); font-variant-numeric: tabular-nums; }
.slip-fine { color: var(--soft); font-size: var(--small); margin: 6px 0; }
.status { min-height: 1.5em; color: var(--red); font-weight: 800; }
.send { display: grid; gap: 8px; margin: 10px 0; }
.preview summary { cursor: pointer; color: var(--soft); min-height: 44px; display: flex; align-items: center; }
.preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 500 var(--small)/1.55 "Cabinet Grotesk", sans-serif; background: var(--pandan); padding: 14px; border-radius: 12px; }

/* ---------- also baked ---------- */
.more { padding: 110px var(--m); }
.more h2 { margin-bottom: 36px; }
.more-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.more-card { background: var(--paper); border-radius: 22px; padding: 24px; display: grid; gap: 10px; align-content: start; border-top: 14px solid var(--red); }
.more-card p { color: var(--soft); }
.ask[aria-pressed="true"] { background: var(--choc); }
.more-card .ask { justify-self: start; }

/* ---------- kitchen ---------- */
.kitchen { background: var(--choc); color: #f3ead8; padding: 110px var(--m); }
.kitchen .sec-head p, .kitchen .ingredients { color: #d9ccb4; }
.ingredients { display: grid; gap: 8px; }
.ingredients li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: var(--red); }
.kitchen-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.kitchen-row img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; }
.kitchen-row figcaption { font-size: var(--small); color: #d9ccb4; margin-top: 10px; }

/* ---------- how ---------- */
.how { background: var(--gold); padding: 110px var(--m); }
.how h2 { margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--paper); border-radius: 22px; padding: 26px; font-size: var(--lead); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; }

/* ---------- footer ---------- */
.foot { background: var(--pandan-d); color: #e9efdd; padding: 90px var(--m) 40px; }
.foot-name { font-size: var(--display); margin-bottom: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; font-weight: 700; }
.foot-links a { overflow-wrap: anywhere; }
.imprint { margin-top: 56px; font-size: var(--small); color: #bccbb0; max-width: 72ch; }

/* ---------- small bar on phones ---------- */
.bar { position: fixed; z-index: 10; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--choc); color: var(--paper); border-radius: 999px; text-decoration: none; font-weight: 700; box-shadow: 0 10px 30px rgba(39, 25, 12, 0.35); }
.bar b { color: var(--gold); }
@media (min-width: 861px) { .bar { display: none !important; } }

/* ---------- background: each part of the page a different icing colour, joined by a scalloped
   pastry edge like the rim of a pineapple tart; a few tart flowers scattered at the top and the end ---------- */
.top, .hero { background-color: #cfe2b4; }
.hero, .foot { isolation: isolate; }
.hero::before, .hero::after, .foot > .foot-main::before { content: ""; position: absolute; left: 0; right: 0; height: 84px; z-index: -1; pointer-events: none;
  background: url(tart-band.svg) repeat-x 0 0 / 720px 84px; }
.hero { position: relative; padding-top: 96px; padding-bottom: 110px; }
.hero::before { top: 0; }
.hero::after { bottom: 6px; transform: scaleY(-1); background-position: 360px 0; }
.foot { padding-top: 120px; }
.foot > .foot-main::before { top: 22px; }
.jars { background: #f6d3da; }
.more { background: var(--pandan); }
.jars, .cakes, .order, .more, .kitchen, .how, .foot { position: relative; }
.jars::before, .cakes::before, .order::before, .more::before, .kitchen::before, .how::before, .foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 20px; background-repeat: repeat-x; background-size: 40px 20px; pointer-events: none; }
.jars::before { background-image: url(scallop-pink.svg); }
.cakes::before, .how::before { background-image: url(scallop-gold.svg); }
.order::before { background-image: url(scallop-paper.svg); }
.more::before { background-image: url(scallop-pandan.svg); }
.kitchen::before { background-image: url(scallop-choc.svg); }
.foot::before { background-image: url(scallop-green.svg); }

/* ---------- entrances ---------- */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--d, 0ms); }
.js .rise.in { opacity: 1; transform: none; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1100px) { .kitchen-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .top nav { display: none; } .logo { font-size: 21px; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 84px var(--m) 100px; }
  .hero-shelf { order: -1; } .hero-shelf img { height: 210px; } .hero-shelf figure:nth-child(2) img { height: 250px; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 32px; }
  .jars, .cakes, .order, .more, .kitchen, .how { padding-top: 80px; padding-bottom: 80px; }
  .jar-layout { grid-template-columns: minmax(0, 1fr); }
  .jar-photos { position: relative; top: 0; grid-template-columns: 1fr 1fr; }
  .menu-row { grid-template-columns: 1fr; gap: 12px; }
  .menu-row .pick-col { justify-items: start; }
  .pick { flex-wrap: wrap; gap: 12px; }
  .tag { width: 76px; height: 76px; }
  .switch button { min-width: 68px; }
  .cake-card { grid-template-columns: 1fr; }
  .order { grid-template-columns: minmax(0, 1fr); }
  .slip { position: relative; top: 0; }
  .lines li { grid-template-columns: 1fr auto; } .lines select { grid-column: 1 / -1; } .l-price { text-align: left; }
  .who { grid-template-columns: 1fr; }
  .kitchen-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *:not(.rise), *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js .rise { transform: none; transition: opacity 400ms linear; transition-delay: var(--d, 0ms); }
}
