/* KM Card's & Keepsakes site styles. Colours and fonts are set once in :root below. */
/* Layout: sticky brand bar, then one view at a time (home / shop / product / about / contact) routed on the hash.
   Single light look on purpose: this previews her real storefront, which is light. */
:root {
  --paper: #fffdfc;
  --blush: #fbeceb;
  --blush-deep: #f3d6d3;
  --ink: #2a2426;
  --muted: #6e6466;
  --line: #eadfdc;
  --red: #c4303d;
  --red-ink: #ffffff;
  --warn-bg: #fff3d1;
  --warn-ink: #634400;
  --ok-bg: #e5f3ea;
  --ok-ink: #1f5c37;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--paper); color: var(--ink); }
body { font: 17px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .45em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 3.6vw + 1rem, 3.3rem); }
h2 { font-size: clamp(1.5rem, 1.8vw + 1rem, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.script { font-family: var(--script); color: var(--red); font-size: 1.7rem; line-height: 1; margin-bottom: .3em; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }

body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--ink); }
.preview-bar { background: var(--ink); color: #f6eeec; font-size: .85rem; }
.preview-bar .wrap { padding-block: 7px; display: flex; gap: 8px; justify-content: center; text-align: center; flex-wrap: wrap; }
.preview-bar b { color: #fff; }

header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(255,253,252,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: auto; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--body); font-weight: 600; font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
nav.main { display: flex; gap: 2px; }
nav.main a { color: var(--ink); text-decoration: none; padding: 9px 11px; border-radius: 999px; font-weight: 700; font-size: .95rem; }
nav.main a:hover { background: var(--blush); }
nav.main a[aria-current="page"] { background: var(--blush-deep); }
@media (max-width: 600px) {
  .brand span { display: none; }
  nav.main a { padding: 8px 8px; font-size: .9rem; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px; border-radius: 999px;
  background: var(--red); color: var(--red-ink); border: 0; font: 800 1rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(.94); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn[disabled] { background: #d9cfcc; color: #5d5355; cursor: not-allowed; filter: none; }

section { padding-block: 40px; }

/* Home */
.hero .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; padding-block: 28px 8px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.reveal { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 24px; overflow: hidden; background: var(--blush); box-shadow: 0 18px 50px -20px rgba(42,36,38,.45); }
.reveal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reveal figcaption { position: absolute; left: 14px; bottom: 14px; right: 14px; background: rgba(255,253,252,.93); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: .92rem; }
.reveal figcaption b { font-family: var(--display); font-weight: 600; }
.hero .figure-wrap { position: relative; }
.hero .heart { position: absolute; right: -10px; top: -14px; width: 92px; height: 92px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: 0 6px 20px -8px rgba(42,36,38,.4); }
.hero .heart img { width: 64px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } .hero .heart { right: 8px; } }

.how { background: var(--blush); }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: s; }
.how li { counter-increment: s; }
.how li::before { content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--red); font: 600 1.1rem var(--display); margin-bottom: 10px; }
.how li p { color: var(--muted); font-size: .97rem; }
@media (max-width: 860px) { .how ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .how ol { grid-template-columns: 1fr; } }

.row-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.row-head h2 { margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card .ph { aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--blush); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .ph img { transform: scale(1.04); }
.card h3 { margin: 12px 0 2px; }
.card .meta { color: var(--muted); font-size: .92rem; }

.wall { columns: 4 200px; column-gap: 14px; }
.wall figure { margin: 0 0 14px; break-inside: avoid; border-radius: 12px; overflow: hidden; background: var(--blush); }
.wall img { width: 100%; height: auto; }

.quote { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; max-width: 820px; }
.quote img { width: 110px; }
.quote blockquote { margin: 0; font-family: var(--script); font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); line-height: 1.25; }
.quote cite { display: block; font: 600 .9rem var(--body); color: var(--muted); font-style: normal; margin-top: 8px; }
@media (max-width: 520px) { .quote { grid-template-columns: 1fr; } .quote img { width: 80px; } }

/* Product */
.crumb { padding-top: 22px; font-weight: 700; }
.crumb a { text-decoration: none; }
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding-block: 18px 40px; }
.product > * { min-width: 0; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.main-img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: var(--r); background: var(--blush); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 3px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--red); }
.thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 9px; }
.tbd { display: inline-block; background: var(--blush); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .9rem; margin-bottom: 14px; }

.field { margin-bottom: 18px; }
.lbl { display: block; font-weight: 800; margin-bottom: 7px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; }
.opts span { display: inline-block; padding: 9px 16px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; cursor: pointer; background: var(--paper); }
.opts input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); background: var(--blush); }
.opts input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); }
.stepper button { width: 46px; height: 46px; border: 0; background: none; font: 800 1.3rem var(--body); color: var(--ink); cursor: pointer; border-radius: 999px; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.drop { border: 2px dashed #d6c6c2; border-radius: var(--r); padding: 18px; background: #fff; }
.drop input { width: 100%; font: inherit; }
.drop .hint { font-size: .88rem; color: var(--muted); margin: 8px 0 0; }
.pv { display: none; gap: 14px; align-items: center; margin-top: 14px; }
.pv.show { display: flex; }
.pv img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; flex: none; }
.pv div { min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.note { border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: .95rem; }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); }
.note.info { background: var(--blush); color: var(--ink); }
textarea { width: 100%; min-height: 92px; font: inherit; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 3px; accent-color: var(--red); }
.fine { font-size: .85rem; color: var(--muted); margin-top: 12px; }

.prose { max-width: 40em; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.about-grid > * { min-width: 0; }
.about-grid img { border-radius: var(--r); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tips li { background: var(--blush); border-radius: 12px; padding: 12px 16px; }

.contact { max-width: 560px; }
.email { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--blush); border-radius: var(--r); padding: 16px 18px; margin: 18px 0; }
.email code { font: 700 1.05rem var(--body); user-select: all; overflow-wrap: anywhere; }
.email button { margin-left: auto; min-height: 42px; padding: 8px 18px; }

footer { margin-top: 30px; background: var(--ink); color: #eadfdc; }
footer .wrap { padding-block: 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; font-size: .95rem; }
footer b { color: #fff; font-family: var(--display); font-weight: 600; }
footer .addr { user-select: all; color: #fff; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Extra pieces used by the live (Square-connected) pages ---- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.demo-banner { background: var(--warn-bg); color: var(--warn-ink); text-align: center; padding: 8px 16px; font-size: .9rem; }
select, input[type="number"] { width: 100%; font: inherit; padding: 11px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 48px; }
.qty { max-width: 120px; }
.preview { display: none; gap: 14px; align-items: center; margin-top: 14px; }
.preview.show { display: flex; }
.preview img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; flex: none; }
.preview div { min-width: 0; overflow-wrap: anywhere; font-size: .92rem; }
.notice { border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: .95rem; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.error { background: #fde4e4; color: #8a1c1c; }
.notice.info { background: var(--blush); color: var(--ink); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }
.total { font-size: 1.15rem; font-weight: 800; margin: 6px 0 16px; }
.gallery-main { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: var(--r); background: var(--blush); }
.drop p.muted { font-size: .88rem; }
.skeleton { background: linear-gradient(90deg, #f3e7e4, #fbf3f1, #f3e7e4); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); min-height: 260px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.title { display: block; font-weight: 800; margin-bottom: 7px; }
.check label { font-weight: 600; }

/* ---- Heat-reveal mug animation (home page) ---- */
@property --fill { syntax: "<percentage>"; inherits: false; initial-value: -30%; }
.heat { position: relative; margin: 0; max-width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 24px; overflow: hidden;
  background: var(--paper); box-shadow: 0 18px 50px -20px rgba(42,36,38,.45); cursor: pointer; }
.heat .pane { position: relative; aspect-ratio: 1; overflow: hidden; background: #d8cbbd; }
.heat .pane + .pane .hot { transition-delay: .5s; }
.heat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heat .hot { --fill: -30%;
  -webkit-mask-image: linear-gradient(to top, #000 calc(var(--fill) - 18%), transparent calc(var(--fill) + 18%));
  mask-image: linear-gradient(to top, #000 calc(var(--fill) - 18%), transparent calc(var(--fill) + 18%));
  filter: saturate(.6) blur(3px); transition: --fill 3.6s cubic-bezier(.45,0,.25,1), filter 3.6s ease, opacity 1s ease; }
.heat.warm .hot { --fill: 140%; filter: none; }
.heat.cooling .hot { opacity: 0; }
.heat .steam { position: absolute; left: calc(var(--x, 50%) - 22%); width: 44%; top: -14%; height: 32%; pointer-events: none; }
.heat .steam span { position: absolute; bottom: 0; width: 34%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,0) 68%); filter: blur(6px); opacity: 0; }
.heat .steam span:nth-child(1) { left: 0; } .heat .steam span:nth-child(2) { left: 25%; } .heat .steam span:nth-child(3) { left: 50%; } .heat .steam span:nth-child(4) { left: 68%; }
/* steam starts as soon as the coffee goes in */
.heat.pouring .steam span, .heat.warm .steam span { animation: rise 2.6s ease-out infinite; }
.heat .steam span:nth-child(2) { animation-delay: .5s !important; } .heat .steam span:nth-child(3) { animation-delay: 1s !important; } .heat .steam span:nth-child(4) { animation-delay: 1.5s !important; }
@keyframes rise { 0% { transform: translateY(30%) scale(.5); opacity: 0; } 25% { opacity: .95; } 100% { transform: translateY(-90%) translateX(10%) scale(1.6); opacity: 0; } }
.heat .stream { position: absolute; top: 0; left: calc(var(--x, 50%) - 2.2%); width: 4.4%; height: 11%; border-radius: 0 0 40% 40%;
  background: linear-gradient(90deg, #3b2214, #6f4325 45%, #9a6a44 55%, #4a2a17); transform-origin: top; transform: scaleY(0);
  box-shadow: 0 0 6px rgba(255,240,220,.35) inset; transition: transform .45s cubic-bezier(.5,0,.8,.4); }
.heat.pouring .stream { transform: scaleY(1); }
.heat.poured .stream { transform-origin: bottom; transform: scaleY(0); transition-duration: .35s; }
.heat figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  background: rgba(255,253,252,.94); color: var(--ink); border-radius: 12px; padding: 10px 12px 10px 14px; font-size: .92rem; }
.heat figcaption b { font-family: var(--display); font-weight: 600; }
.heat figcaption { justify-content: space-between; }
.heat figcaption a { color: var(--ink); text-decoration: none; }
.heat .pour { border: 0; border-radius: 50%; background: transparent; color: var(--muted); font: 800 1.2rem var(--body); width: 40px; height: 40px; cursor: pointer; }
.heat .pour:hover { background: var(--blush); color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .heat .hot { transition: opacity .3s; } .heat .steam span { animation: none !important; } .heat .stream { display: none; }
}
@media (max-width: 600px) { .hero .heart { width: 64px; height: 64px; top: -10px; } .hero .heart img { width: 44px; } }
