/* Cookie bakery demo: tokens, shared pieces, header and hero.
   The layout, type and colour are the design as drawn. Only the name,
   wording, contact details and images are placeholders. */
:root {
  --cream: #fbf3ef;
  --blush: #fbe1db;
  --pink: #f3a9a0;
  --ink: #231816;
  --ink-soft: #4a3330;
  --rose: #a8473b;
  --text: #5a4440;
  --text-soft: #6e5550;
  --rule: #f0dcd5;
  --rule-warm: #ecd0c8;
  --card: #fffaf8;
  --radius: 28px;
  --serif: 'Instrument Serif', serif;
  --sans: Manrope, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 90px; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--rose); }
h1, h2, p, figure, blockquote { margin: 0; }
h2 { font: 400 clamp(40px, 5vw, 64px)/1 var(--serif); letter-spacing: -.02em; }
img { display: block; max-width: 100%; }
button { all: unset; cursor: pointer; box-sizing: border-box; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); }
.eyebrow--sm { font-size: 12px; }
.body { font-size: 16px; line-height: 1.6; color: var(--text); }
.body--sm { font-size: 15px; }
.link { align-self: flex-start; font-weight: 700; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.split-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.split-head .body { max-width: 380px; }

.btn { display: inline-block; padding: 16px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; text-align: center; transition: background-color .25s, color .25s; }
.btn--sm { padding: 12px 20px; font-size: 14px; }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--ink-soft); color: var(--cream); }
.btn--line { border: 1.5px solid var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--cream); }
.btn--accent { background: var(--pink); color: var(--ink); }
.btn--paper { border: 1.5px solid var(--cream); color: var(--cream); }
.btn--paper:hover { background: var(--cream); color: var(--ink); }

/* image frames: the ratio lives on the frame so a swapped photo cannot move the layout */
.shot { width: 100%; object-fit: cover; border-radius: var(--radius); background: var(--blush); }
.shot--43 { aspect-ratio: 4 / 3; }
.shot--45 { aspect-ratio: 4 / 5; }
.shot--54 { aspect-ratio: 5 / 4; }
.shot--11 { aspect-ratio: 1 / 1; }
.shot--r16 { border-radius: 16px; }
.shot--r14 { border-radius: 14px; }

/* ---- the strip that says this is a demo; hidden when shown inside the viewer */
.demobar { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; padding: 9px 20px; background: #0a0a0a; color: #fafafa; font: 500 11px/1.4 ui-monospace, 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.demobar a { color: #0a0a0a; background: #fd6002; padding: 5px 12px; border-radius: 999px; }
.demobar a:hover { color: #0a0a0a; background: #fafafa; }
.is-embedded .demobar { display: none; }
/* Inside the viewer's phone frame, Chrome does not clip a backdrop-filter to
   the frame's rounded corners: the blurred header showed as a grey wedge over
   the top-left corner. Framed only, the header drops the blur and goes
   nearly solid instead. The full page keeps the frosted header. */
.is-embedded .head { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(251, 243, 239, .97); }
/* framed, the page scrolls like a phone's: no scrollbars drawn */
.is-embedded { scrollbar-width: none; }
.is-embedded::-webkit-scrollbar { display: none; }
/* on phones the spinning badge sits 10px past the edge; without this the
   page could be nudged sideways */
html, body { overflow-x: clip; }

.topbar { background: var(--pink); font-size: 13px; font-weight: 600; letter-spacing: .04em; padding: 10px 20px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; text-align: center; }

/* ---- header */
.head { position: sticky; top: 0; z-index: 50; background: rgba(251, 243, 239, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); }
.head__in { max-width: 1240px; margin: 0 auto; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font: 400 26px/1 var(--serif); }
.brand__badge { width: 52px; height: 52px; flex: none; }
.head__links { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.head__burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); text-align: center; font-size: 20px; line-height: 41px; }
.drawer { position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--rule); padding: 8px 16px 24px; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(35, 24, 22, .08); }
.drawer a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); font: 400 30px/1.2 var(--serif); }
.drawer .btn { margin-top: 20px; }

/* ---- hero */
.hero { padding-top: 40px; padding-bottom: 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 28px; }
.hero__title { font: 400 clamp(52px, 7vw, 96px)/.95 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.hero__title em { color: var(--rose); }
.hero__lead { font-size: 18px; line-height: 1.6; max-width: 460px; color: var(--text); text-wrap: pretty; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__media { position: relative; aspect-ratio: 4 / 5; width: 100%; }
.hero__tilt { position: absolute; inset: 0; background: var(--pink); border-radius: var(--radius); transform: rotate(-3deg); }
.hero__frame { position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden; background: var(--blush); }
.hero__slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1); transition: opacity .9s ease, transform 4.5s ease-out; }
.hero__slides img.is-on { opacity: 1; transform: scale(1.06); }
.hero__bar { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero__caption { background: rgba(251, 243, 239, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 10px 16px; border-radius: 999px; font: 400 20px/1 var(--serif); }
.hero__dots { display: flex; gap: 2px; background: rgba(251, 243, 239, .92); border-radius: 999px; padding: 4px 6px; }

/* slide and carousel dots share one look */
.dot { width: 20px; height: 24px; display: flex; align-items: center; justify-content: center; }
.dot i { display: block; height: 7px; width: 7px; border-radius: 999px; background: #d9b9b0; transition: width .3s ease, background .3s ease; }
.dot.is-on i { width: 20px; background: var(--ink); }

.spin { position: absolute; top: -34px; right: -26px; width: clamp(110px, 12vw, 150px); aspect-ratio: 1 / 1; z-index: 3; }
.spin svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.spin text { font: 700 14px var(--sans); letter-spacing: 2px; text-transform: uppercase; }
.spin__dot { position: absolute; inset: 27%; border-radius: 50%; background: var(--pink); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  html { scroll-padding-top: 70px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  h2 { font-size: 44px; }
  .topbar { font-size: 12px; padding: 9px 16px; }
  .topbar span:nth-child(2) { display: none; }
  .head__in { padding: 10px 16px; }
  .brand { font-size: 22px; gap: 10px; }
  .brand__badge { width: 44px; height: 44px; }
  .head__links { display: none; }
  .head__burger { display: block; }
  .hero { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 22px; align-items: stretch; }
  .hero__copy { display: contents; }
  .hero__title { font-size: 54px; }
  .hero__lead { font-size: 16px; }
  .hero__media { order: 1; margin: 8px 0; }
  .hero__cta { order: 2; flex-direction: column; gap: 10px; }
  .hero__tilt, .hero__frame { border-radius: 24px; }
  .hero__bar { left: 12px; right: 12px; bottom: 12px; }
  .hero__caption { font-size: 18px; padding: 9px 14px; }
  .spin { top: -22px; right: -10px; width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}
