:root {
  /* taken from the brand's own business card: blush stock, raspberry ink, sage watercolour edge */
  --blush: #fbe9ec;
  --blush-deep: #f3cfd6;
  --paper: #fffafa;
  --raspberry: #b0123f;
  --sage: #b9d9ae;
  --sage-deep: #3d6a45;
  --kraft: #c89a68;
  --ink: #3a1323;
  --ink-soft: #6f4a57;
  --viber: #7360f2;

  --display: "Yeseva One", Georgia, serif;
  --body: "Sofia Sans", system-ui, sans-serif;

  --gutter: 16px;
  --max: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* confetti shows only where the blush page is bare: the hero */
  background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Ccircle cx='38' cy='52' r='5' fill='%23b9d9ae'/%3E%3Ccircle cx='300' cy='96' r='4' fill='%23f3cfd6'/%3E%3Ccircle cx='196' cy='330' r='5' fill='%23e9c9a4'/%3E%3Ccircle cx='372' cy='286' r='3.5' fill='%23b9d9ae'/%3E%3Crect x='120' y='70' width='14' height='5' rx='2.5' fill='%23f0b9c4' transform='rotate(-32 127 72)'/%3E%3Crect x='250' y='210' width='14' height='5' rx='2.5' fill='%23b9d9ae' transform='rotate(40 257 212)'/%3E%3Crect x='58' y='250' width='14' height='5' rx='2.5' fill='%23e9c9a4' transform='rotate(18 65 252)'/%3E%3Crect x='340' y='380' width='14' height='5' rx='2.5' fill='%23f0b9c4' transform='rotate(-55 347 382)'/%3E%3Cpath d='M200 150l2.6 6.4 6.4 2.6-6.4 2.6-2.6 6.4-2.6-6.4-6.4-2.6 6.4-2.6z' fill='%23f0b9c4'/%3E%3Cpath d='M92 366l2 5 5 2-5 2-2 5-2-5-5-2 5-2z' fill='%23b9d9ae'/%3E%3Cpath d='M360 170l2 5 5 2-5 2-2 5-2-5-5-2 5-2z' fill='%23e9c9a4'/%3E%3C/svg%3E") 0 0 / 420px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 8.6vw, 4.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 6vw, 2.75rem); }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--raspberry); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 700 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform .12s ease;
}
.btn:active { transform: scale(.97); }
.btn-viber { background: var(--viber); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }

/* ---------- header ---------- */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter) 0;
}
.wordmark { font-family: var(--display); font-size: 1.35rem; color: var(--raspberry); text-decoration: none; }
.wordmark span { font-family: var(--body); font-size: .85em; color: var(--ink-soft); }

/* ---------- hero ---------- */

.hero { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) 48px; }

.bunting { display: grid; gap: 18px; padding: 18px 0 34px; min-height: 190px; align-content: start; }

.bunting-row {
  --sag: 22px;
  position: relative;
  display: flex; justify-content: center; gap: clamp(3px, 1.2vw, 10px);
  padding: 0 4px;
}
.bunting-row svg { position: absolute; inset: 0 0 auto 0; width: 100%; height: calc(var(--sag) * 2); overflow: visible; pointer-events: none; }
.bunting-row path { fill: none; stroke: var(--kraft); stroke-width: 2; vector-effect: non-scaling-stroke; }

.flag {
  container-type: inline-size;
  flex: 0 1 62px; min-width: 0; aspect-ratio: 5 / 6;
  /* --y and --r are set per flag in app.js so each one follows the string */
  transform: translateY(var(--y, 0px)) rotate(var(--r, 0deg));
  transform-origin: 50% 0;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: 0 6px 10px -6px rgba(58, 19, 35, .45);
  display: grid; place-items: center;
  animation: hang .55s cubic-bezier(.3, 1.5, .5, 1) backwards;
  animation-delay: calc(var(--i) * 45ms);
}
.flag::before {
  content: ""; position: absolute; top: 7%; left: 50%; width: 9%; aspect-ratio: 1; border-radius: 50%;
  background: var(--blush); translate: -50% 0;
}
.flag span { font-family: var(--display); font-size: 62cqw; line-height: 1; padding-top: 12cqw; }
.flag[data-tone="0"] { background: var(--paper); color: var(--raspberry); }
.flag[data-tone="1"] { background: var(--raspberry); color: #fff; }
.flag[data-tone="2"] { background: var(--sage); color: var(--ink); }
.flag[data-tone="3"] { background: var(--ink); color: var(--blush); }

@keyframes hang {
  from { opacity: 0; transform: translateY(calc(var(--y, 0px) - 26px)) rotate(calc(var(--r, 0deg) - 14deg)); }
}

.hero-body { display: grid; gap: 40px; }
.hero-text { container-type: inline-size; }
/* fixed lines; the size follows the column so the longest line always fits */
.hero-text h1 { font-size: min(11.5cqi, 5rem); }
.hero-text h1 span { display: block; white-space: nowrap; }

.lede { margin-top: 18px; max-width: 30em; font-size: 1.15rem; line-height: 1.55; }

.prints { position: relative; height: 78vw; max-height: 420px; }
.print {
  position: absolute; margin: 0; padding: 7px;
  background: #fff; border-radius: 4px;
  box-shadow: 0 18px 30px -18px rgba(58, 19, 35, .6);
}
.print img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
/* a strip of washi tape holding each print */
.print::before {
  content: ""; position: absolute; z-index: 1; top: -11px; left: 50%;
  width: 84px; height: 24px; translate: -50% 0; rotate: -4deg;
  background: repeating-linear-gradient(135deg, rgba(185, 217, 174, .9) 0 7px, rgba(214, 233, 207, .9) 7px 14px);
  box-shadow: 0 1px 2px rgba(58, 19, 35, .18);
}
.print-b::before { rotate: 5deg; background: repeating-linear-gradient(135deg, rgba(240, 185, 196, .9) 0 7px, rgba(250, 221, 227, .9) 7px 14px); }
.print-c::before { rotate: 2deg; left: 30%; background: repeating-linear-gradient(90deg, rgba(200, 154, 104, .75) 0 5px, rgba(226, 196, 160, .75) 5px 10px); }
.print-a { width: 58%; aspect-ratio: 1; left: 0; top: 6%; rotate: -5deg; }
.print-b { width: 36%; aspect-ratio: 3 / 4.6; right: 2%; top: 0; rotate: 6deg; }
.print-c { width: 40%; aspect-ratio: 1; right: 16%; bottom: 0; rotate: -2deg; }

@media (hover: hover) {
  .item img { transition: transform .22s ease; }
  .item:hover img { transform: rotate(-1.2deg) scale(1.02); }
  .item:nth-child(even):hover img { transform: rotate(1.2deg) scale(1.02); }
}

/* ---------- sheets ----------
   Each .page is a sheet of paper lying over the one before it. */

.page { position: relative; }
.page + .page { box-shadow: 0 -22px 44px -18px rgba(58, 19, 35, .4); }

/* ---------- catalog ---------- */

.catalog { background: var(--paper); padding: 44px 0 84px; border-radius: 28px 28px 0 0; }
.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.count { color: var(--ink-soft); font-size: .95rem; white-space: nowrap; }

.filters {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 14px 0 10px; margin-top: 10px;
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  max-width: var(--max); margin: 0 auto; padding: 2px var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chips-sub { margin-top: 8px; }

.chip {
  flex: none; min-height: 44px; padding: 0 16px;
  border: 2px solid var(--blush-deep); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 500 1rem var(--body); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--raspberry); border-color: var(--raspberry); color: #fff; font-weight: 700; }
.chips-sub .chip { min-height: 38px; padding: 0 14px; font-size: .93rem; border-color: transparent; background: var(--blush); }
.chips-sub .chip[aria-pressed="true"] { background: var(--sage); color: var(--ink); border-color: var(--sage); }
.chip-n { opacity: .6; font-weight: 400; margin-left: 4px; font-size: .88em; }

.grid { max-width: var(--max); margin: 14px auto 0; padding: 0 var(--gutter); display: flex; align-items: flex-start; gap: 12px; }
.grid-col { flex: 1; min-width: 0; }

.item {
  display: block; width: 100%; margin: 0 0 20px; padding: 0;
  border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: pointer;
}
.item img { width: 100%; border-radius: var(--radius); background: var(--blush); }
.item-title { display: block; margin-top: 9px; font-weight: 700; line-height: 1.25; }
.item-price { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .93rem; }
.item-price.has-price { color: var(--raspberry); font-weight: 700; font-size: 1rem; }
.item:hover .item-title { color: var(--raspberry); }

.empty { max-width: 30em; margin: 32px auto 0; padding: 0 var(--gutter); text-align: center; }
.empty p { margin-bottom: 18px; color: var(--ink-soft); }

/* ---------- order ---------- */

/* pulled up over the catalog so the paper shows behind the rounded corners */
.order { margin-top: -28px; background: var(--sage); padding: 52px var(--gutter) 64px; border-radius: 28px 28px 0 0; }
.order h2 { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.steps { list-style: none; counter-reset: step; max-width: calc(var(--max) - 2 * var(--gutter)); margin: 46px auto 0; padding: 0; display: grid; gap: 40px; }
/* each step is a paper card with its number hung on the top edge like a bunting flag */
.steps li { counter-increment: step; position: relative; background: var(--paper); border-radius: 16px; padding: 44px 22px 24px; box-shadow: 0 14px 24px -18px rgba(58, 19, 35, .55); }
.steps li::before {
  content: counter(step); position: absolute; top: -20px; left: 20px;
  width: 44px; aspect-ratio: 5 / 6; display: grid; place-items: center;
  background: var(--raspberry); color: #fff; border-radius: 3px;
  font-family: var(--display); font-size: 1.45rem; rotate: -5deg;
  box-shadow: 0 6px 10px -6px rgba(58, 19, 35, .6);
}
.steps li:nth-child(2)::before { background: var(--ink); rotate: 4deg; }
.steps li:nth-child(3)::before { background: var(--kraft); rotate: -2deg; }
.steps p { margin-top: 8px; max-width: 30em; color: var(--ink-soft); }

/* ---------- contact ---------- */

.contact-page { margin-top: -28px; background: var(--ink); color: var(--blush); border-radius: 28px 28px 0 0; }
.contact { padding: 60px var(--gutter) 44px; }
.contact-card { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.contact-card > p { margin-top: 10px; opacity: .85; }
.contact-actions { display: grid; gap: 10px; margin-top: 24px; }
.contact-card .btn-line { color: #fff; border-color: rgba(255, 255, 255, .55); }
.contact-list { margin: 30px 0 0; display: grid; gap: 16px; }
.contact-list dt { font-size: .9rem; opacity: .65; }
.contact-list dd { margin: 2px 0 0; font-weight: 500; font-size: 1.08rem; }
.contact-list a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
#phones a { display: block; }

.foot { padding: 0 var(--gutter) 28px; text-align: center; font-size: .9rem; opacity: .6; }

/* ---------- product sheet ---------- */

.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto 0 0; padding: 0; border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper); color: var(--ink);
  overflow-y: auto;
}
.sheet { overscroll-behavior: contain; }
/* the page behind must not scroll while a product is open */
html:has(.sheet[open]) { overflow: hidden; }
.sheet[open] { animation: rise .28s ease-out; }
.sheet::backdrop { background: rgba(58, 19, 35, .55); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

.sheet-close {
  position: sticky; top: 12px; margin: 12px 12px -56px auto; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: 0 2px 10px rgba(58, 19, 35, .25);
}
.sheet-photo { background: var(--blush); }
.sheet-photo img { width: 100%; max-height: 56dvh; object-fit: contain; }
.sheet-body { padding: 20px var(--gutter) 26px; }
.sheet-path { color: var(--sage-deep); font-weight: 700; font-size: .93rem; margin-bottom: 6px; }
.sheet-body h2 { font-size: 1.7rem; }
.sheet-price { margin-top: 8px; font-weight: 700; color: var(--raspberry); font-size: 1.1rem; }
.sheet-note { margin-top: 10px; color: var(--ink-soft); max-width: 34em; }
.sheet-actions { display: grid; gap: 10px; margin-top: 22px; }
.sheet-hint { margin-top: 12px; font-size: .9rem; color: var(--ink-soft); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  translate: -50% 12px; opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 500; text-align: center;
  transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- wider screens ---------- */

@media (min-width: 620px) {
  .grid { gap: 18px; }
  .contact-actions, .sheet-actions { grid-template-columns: repeat(2, max-content); }
  .contact-list { grid-template-columns: repeat(3, auto); justify-content: start; gap: 40px; }
}

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  body { font-size: 18px; }
  .top { padding-top: 22px; }

  .bunting { padding: 26px 0 44px; min-height: 250px; }
  .bunting-row { --sag: 30px; }
  .flag { flex-basis: 78px; }

  .hero { padding-bottom: 72px; }
  .hero-body { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
  .prints { height: 440px; max-height: none; }

  .catalog { padding-top: 64px; padding-bottom: 104px; border-radius: 40px 40px 0 0; }
  .grid { gap: 22px; }
  .item { margin-bottom: 28px; }

  .order { padding-block: 80px 96px; margin-top: -40px; border-radius: 40px 40px 0 0; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
  .steps li { padding: 50px 28px 30px; }
  .steps li:nth-child(1) { rotate: -1deg; }
  .steps li:nth-child(3) { rotate: 1deg; }

  .contact-page { margin-top: -40px; border-radius: 40px 40px 0 0; }
  .contact { padding-block: 88px 64px; }

  .sheet {
    margin: auto; max-width: 920px; border-radius: 24px;
    grid-template-columns: 1.1fr 1fr;
  }
  .sheet[open] { display: grid; }
  .sheet-close { position: absolute; top: 14px; right: 14px; margin: 0; }
  .sheet-photo { display: grid; place-items: center; }
  .sheet-photo img { max-height: 80dvh; }
  .sheet-body { padding: 56px 36px 36px; align-self: center; }
  .sheet-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flag, .sheet[open] { animation: none; }
  .item img { transition: none; }
  .btn, .toast { transition: none; }
}

/* ---------- decorations ---------- */

.section-head h2::after, .order h2::after {
  content: ""; display: block; width: 96px; height: 10px; margin-top: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='10' viewBox='0 0 96 10'%3E%3Cpath d='M2 6c8-6 14 6 22 0s14 6 22 0 14 6 22 0 14 6 22 0' fill='none' stroke='%23b0123f' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}

.contact-page::before {
  content: ""; position: absolute; z-index: 1; top: -40px; right: 26px;
  width: 104px; aspect-ratio: 120 / 96; rotate: 8deg;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 96'%3E%3Cpath d='M55 50C48 68 38 80 26 90l16-2c9-10 15-22 19-36z' fill='%23e58fa4'/%3E%3Cpath d='M65 50c7 18 17 30 29 40l-16-2c-9-10-15-22-19-36z' fill='%23e58fa4'/%3E%3Cpath d='M60 42C42 10 6 8 8 38c2 24 34 20 52 6z' fill='%23f6b6c4'/%3E%3Cpath d='M60 42c18-32 54-34 52-4-2 24-34 20-52 6z' fill='%23f6b6c4'/%3E%3Cpath d='M56 42C44 26 24 22 22 36c-1 10 18 10 34 6z' fill='%23e58fa4'/%3E%3Cpath d='M64 42c12-16 32-20 34-6 1 10-18 10-34 6z' fill='%23e58fa4'/%3E%3Cellipse cx='60' cy='43' rx='9' ry='11' fill='%23fbd3db'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 8px 8px rgba(58, 19, 35, .35));
}

@media (min-width: 900px) {
  .contact-page::before { width: 150px; top: -58px; right: 10%; }
}
