/* Shared look for the standalone kitchen pages: 404.html and /download/.
   Brand orange, floating SVG ingredients, cloche, white pill buttons, app card. */

:root {
  --orange: #FC642D;
  --orange-light: #FD9561;
  --orange-dark: #D84420;
  --ink: #1A1A1A;
  --cream: #FFF6EF;
  --steel: #F3EEE9;
  --steel-shade: #D9D0C7;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100dvh;
  overflow-x: hidden;
  color: #fff;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, var(--orange-light) 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 115%, var(--orange-dark) 0%, transparent 60%),
    var(--orange);
  -webkit-font-smoothing: antialiased;
}

/* Floating ingredients: inline SVG, never emoji */

.ingredient {
  position: fixed;
  z-index: 0;
  width: var(--s, 44px);
  height: var(--s, 44px);
  left: var(--x);
  top: var(--y);
  filter: drop-shadow(0 8px 10px rgba(120, 30, 0, .22));
  animation: bob var(--d, 7s) ease-in-out var(--delay, 0s) infinite;
  pointer-events: none;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r, -8deg)); }
  50%      { transform: translateY(-16px) rotate(calc(var(--r, -8deg) * -1)); }
}

@media (max-width: 640px) {
  .ingredient { --s: 30px; opacity: .85; }
  .ingredient.hide-sm { display: none; }
}
@media (max-height: 700px) { .ingredient { display: none; } }

/* Layout */

main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.8rem, 2.4vh, 1.3rem);
  max-width: 720px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  text-align: center;
}

.brand { display: block; width: clamp(118px, 26vw, 148px); }
.brand img { display: block; width: 100%; height: auto; }

.kicker {
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .42rem .85rem;
  border-radius: 999px;
  background: rgba(26, 26, 26, .16);
}

/* 4 [cloche] 4 */

.code {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(.2rem, 1.2vw, .8rem);
  margin-top: clamp(.25rem, 2vh, 1rem);
  font-family: 'Clash Display', 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(5.5rem, 23vw, 11.5rem);
  line-height: .8;
  letter-spacing: -.04em;
  text-shadow: 0 9px 0 rgba(160, 45, 10, .32), 0 22px 40px rgba(120, 30, 0, .22);
}

.digit { display: inline-block; animation: wobble 4.5s ease-in-out infinite; }
.digit:last-child { animation-delay: -2.25s; }

@keyframes wobble {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg) translateY(-5px); }
}

.cloche-wrap {
  position: relative;
  width: clamp(6.5rem, 26vw, 13rem);
  aspect-ratio: 1 / 1;
}

.cloche {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cloche:focus-visible { outline: 3px solid #fff; outline-offset: 6px; border-radius: 24px; }
.cloche svg { display: block; width: 100%; height: 100%; overflow: visible; }

.lid {
  transform-origin: 196px 150px;
  transition: transform .7s cubic-bezier(.3, 1.5, .5, 1);
}
.cloche:hover .lid { transform: translateY(-6px) rotate(-2deg); }
.cloche.open .lid { transform: translate(52px, -58px) rotate(30deg); }

.reveal { opacity: 0; transform: translateY(6px); transition: opacity .35s .2s, transform .35s .2s; }
.cloche.open .reveal { opacity: 1; transform: none; }

.steam path {
  fill: none;
  stroke: rgba(255, 246, 239, .85);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 50 200;
  opacity: 0;
}
.cloche.open .steam path { animation: steam 2.4s ease-out infinite; }
.cloche.open .steam path:nth-child(2) { animation-delay: .7s; }
.cloche.open .steam path:nth-child(3) { animation-delay: 1.4s; }

@keyframes steam {
  0%   { stroke-dashoffset: 50; opacity: 0; transform: translateY(10px); }
  30%  { opacity: 1; }
  100% { stroke-dashoffset: -150; opacity: 0; transform: translateY(-16px); }
}

.hint {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-top: .55rem;
  transform: translateX(-50%) rotate(-2deg);
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  text-shadow: none;
  opacity: .78;
  transition: opacity .3s;
}
.cloche.open + .hint { opacity: 0; }

/* Copy + actions */

h1 {
  margin: clamp(1rem, 3vh, 1.6rem) 0 0;
  max-width: 19ch;
  font-family: 'Clash Display', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 5.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0;
  word-spacing: .06em;
  text-wrap: balance;
}

.body {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.1rem);
  line-height: 1.55;
  color: var(--cream);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: .35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .8rem 1.45rem;
  border-radius: 999px;
  font: 700 1rem/1.2 'DM Sans', sans-serif;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: #fff;
  color: var(--orange-dark);
  box-shadow: 0 6px 0 rgba(160, 45, 10, .32), 0 14px 30px rgba(120, 30, 0, .22);
}
.btn-primary:hover { box-shadow: 0 8px 0 rgba(160, 45, 10, .32), 0 18px 34px rgba(120, 30, 0, .26); }

.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .72); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

/* App card: the store badges live here on every 404 */

.app {
  width: 100%;
  max-width: 520px;
  margin-top: clamp(.75rem, 3vh, 1.75rem);
  padding: 1.25rem 1.25rem 1.35rem;
  border-radius: 24px;
  background: rgba(255, 246, 239, .14);
  border: 1px solid rgba(255, 246, 239, .28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.app.is-main {
  background: rgba(255, 246, 239, .2);
  border-color: rgba(255, 246, 239, .45);
}

.app h2 {
  margin: 0;
  font-family: 'Clash Display', 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: .01em;
  word-spacing: .06em;
}
.app p {
  margin: .35rem auto 0;
  max-width: 40ch;
  font-size: .93rem;
  line-height: 1.5;
  color: var(--cream);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem;
  margin-top: 1rem;
}
.stores a {
  display: block;
  border-radius: 10px;
  transition: transform .15s;
}
.stores a:hover { transform: translateY(-2px); }
.stores a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.stores img { display: block; height: 48px; width: auto; }
@media (max-width: 420px) {
  .app { padding-left: 1rem; padding-right: 1rem; }
  .stores { gap: .5rem; }
  .stores img { height: 42px; }
}

.redirect {
  margin: .9rem 0 0;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
}
.redirect[hidden] { display: none; }

footer {
  margin-top: clamp(.5rem, 2vh, 1rem);
  font-size: .78rem;
  color: rgba(255, 246, 239, .78);
}

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