/* please kiss me — white and petal pink.
   Poiret One (hairline geometric display, like the printed lines; has Cyrillic) + Jost. */

:root {
  --paper: #fff8fa;
  --petal: #fbe4ea;
  --blush: #f2b8c6;
  --rose: #d67892;
  --rosewood: #9e3f57;
  --ink: #3d2730;
  --muted: #8b6d77;
  --line: rgba(158, 63, 87, 0.16);
  --glow: 0 30px 80px -40px rgba(158, 63, 87, 0.45);
  --petal-corner: 1.6rem 1.6rem 1.6rem 0.35rem;   /* the one shape detail: a petal's tip */
  --display: "Poiret One", "Jost", sans-serif;
  --body: "Jost", "Futura", "Century Gothic", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 280ms ease-in both fade-out; }
::view-transition-new(root) { animation: 520ms cubic-bezier(.2, .7, .2, 1) both rise-in; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 300 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
main { flex: 1; position: relative; z-index: 1; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--rosewood); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--rosewood); outline-offset: 3px; border-radius: 4px; }
b, strong { font-weight: 500; }
h1, h2, h3 { font-weight: 400; line-height: 1.1; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; }
h1.display { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2.display { font-size: clamp(2rem, 4vw, 3rem); }
.lede { font-size: 1.2rem; max-width: 34em; color: var(--ink); }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.quote { font-family: var(--display); font-size: 1.5rem; margin: 0; line-height: 1.2; }
.quote::before { content: "“"; } .quote::after { content: "”"; }

/* ---- the petals behind everything: soft, still, at the edges ---- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petals i {
  position: absolute;
  width: 46vmax; height: 30vmax;
  border-radius: 100% 0 100% 0;
  background: radial-gradient(ellipse at 30% 30%, #ffe9ef 0%, var(--petal) 40%, rgba(242, 184, 198, 0.55) 100%);
  filter: blur(2px);
  opacity: 0.55;
}
.petals i:nth-child(1) { top: -18vmax; right: -14vmax; transform: rotate(28deg); }
.petals i:nth-child(2) { bottom: -20vmax; left: -18vmax; transform: rotate(-16deg); opacity: 0.45; }
.petals i:nth-child(3) { top: 38vh; right: -30vmax; transform: rotate(112deg) scale(0.7); opacity: 0.35; }
.petals i:nth-child(4) { top: -24vmax; left: 10vw; transform: rotate(-58deg) scale(0.6); opacity: 0.3; }
.petals i:nth-child(5) { bottom: -26vmax; right: 18vw; transform: rotate(74deg) scale(0.55); opacity: 0.3; }

/* ---- header / footer ---- */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.4rem var(--gutter);
}
.brand { font-family: var(--display); font-size: 1.7rem; color: var(--ink); text-decoration: none; letter-spacing: 0.02em; margin: 0; }
.brand-kiss { color: var(--rosewood); }   /* the colour of the buttons */
.brand-dot { color: #c4bcbf; }      /* the domain's dot: there, but barely */
.top-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); align-items: center; }
.top-nav a { color: var(--ink); text-decoration: none; font-weight: 400; font-size: 0.98rem; }
.top-nav a:hover { color: var(--rosewood); }
.lang { display: inline-flex; gap: 0.1rem; padding: 0.15rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.lang button { border: 0; background: none; padding: 0.25rem 0.55rem; border-radius: 999px; font: 400 0.8rem var(--body); letter-spacing: 0.04em; color: var(--muted); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--petal); color: var(--rosewood); }
.count {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 0.3em;
  border-radius: 1em 1em 1em 0.2em; background: var(--rosewood); color: #fff; font-size: 0.78rem;
}
.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: baseline; justify-content: space-between;
  padding: 2.5rem var(--gutter); color: var(--muted); font-size: 0.92rem; border-top: 1px solid var(--line);
}
.foot p { margin: 0; }
.foot .brand { font-size: 1.3rem; }

/* ---- buttons, fields ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.8rem;
  border: 0; border-radius: var(--petal-corner);
  background: var(--rosewood); color: #fff;
  font: 400 1rem/1 var(--body); letter-spacing: 0.02em; text-decoration: none;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: background 0.25s, transform 0.25s, border-radius 0.35s;
}
.btn:hover { background: var(--ink); color: #fff; border-radius: 0.35rem 1.6rem 1.6rem 1.6rem; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-quiet { background: #fff; color: var(--rosewood); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { background: var(--petal); color: var(--ink); }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--rosewood); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }

.form { display: grid; gap: 1rem; margin: 1.5rem 0; }
.form-grid { grid-template-columns: 1fr 1fr; }
.form-grid .field:has(#id_full_name), .form-grid .field:has(#id_address1), .form-grid .field:has(#id_customer_note),
.form-grid .field:has(#id_email), .span-all { grid-column: 1 / -1; }
.field { display: grid; gap: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem;
  border: 1px solid var(--line); border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.85);
  font: 400 1rem/1.4 var(--body); color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(214, 120, 146, 0.15); }
.field label { font-size: 0.88rem; color: var(--muted); }
.field:focus-within label { color: var(--rosewood); }
.field-check { display: flex; gap: 0.6rem; align-items: center; }
.field-check input { width: auto; }
.has-error input { border-color: var(--rosewood); }
.field-error { color: var(--rosewood); font-size: 0.88rem; margin: 0.3rem 0 0; }
.flashes { position: relative; z-index: 2; padding: 0 var(--gutter); }
.flash { padding: 0.8rem 1.1rem; border-radius: 0.9rem; background: #fff; border: 1px solid var(--line); }
.flash-error { border-color: var(--rose); color: var(--rosewood); }
.or { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 0.9rem; margin: 1.2rem 0 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- the whisper input: one line, big, the start of everything ---- */
.whisper { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 2rem 0 0.8rem; }
.whisper input {
  flex: 1 1 16rem; min-width: 0;
  padding: 0.75rem 0.2rem;
  border: 0; border-bottom: 1px solid var(--rose); border-radius: 0;
  background: transparent;
  font: 400 clamp(1.6rem, 3vw, 2.1rem)/1.2 var(--display); color: var(--ink);
}
.whisper input::placeholder { color: rgba(139, 109, 119, 0.5); }
.whisper input:focus { outline: none; border-bottom-color: var(--rosewood); }
.whisper-large input { font-size: clamp(2rem, 5vw, 3.2rem); text-align: center; }
.whisper-large { justify-content: center; max-width: 46rem; margin-inline: auto; }

/* ---- the bloom: the live rosette ---- */
.bloom { color: var(--rose); aspect-ratio: 1; width: 100%; }
.bloom svg { width: 100%; height: 100%; overflow: visible; }
.bloom.is-live { color: var(--rosewood); filter: drop-shadow(0 18px 30px rgba(158, 63, 87, 0.18)); }
.hash { font: 400 0.95rem/1.5 var(--body); letter-spacing: 0.04em; color: var(--muted); text-align: center; margin-top: 1rem; }

/* ---- home ---- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding: clamp(1rem, 4vw, 4rem) var(--gutter) clamp(3rem, 7vw, 6rem);
  max-width: 1280px; margin: 0 auto;
}
.hero-title { font-size: clamp(3.4rem, 9vw, 7.5rem); line-height: 0.95; margin-bottom: 0.4em; }
.hero-bloom { margin: 0; max-width: 540px; justify-self: center; width: 100%; }
.how, .keepsake-teaser { max-width: 1180px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
.how { border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 400 3.4rem/1 var(--display); color: var(--rose); margin-bottom: 0.6rem; }
.steps h3 { font: 500 1.15rem/1.3 var(--body); }
.keepsake-teaser > div { max-width: 40rem; margin-left: auto; padding-left: 2rem; border-left: 1px solid var(--rose); }

/* ---- generic sheet pages ---- */
.sheet { max-width: 1100px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 5rem; }
.narrow { max-width: 34rem; }
.prose h2 { font: 500 1.1rem/1.3 var(--body); margin-top: 2rem; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 2rem; }

/* ---- the atelier ---- */
.atelier { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) 4rem; }
.stage-write { text-align: center; padding-top: clamp(1rem, 3vw, 2.5rem); }
.stage-write .lede { margin-inline: auto; color: var(--muted); }
.stage-bloom { margin: 1.5rem auto 0; max-width: min(460px, 80vw); }
.stage-adorn { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-top: 1rem; }
.stage-adorn[hidden], .stage[hidden] { display: none; }

.viewer { position: sticky; top: 1rem; }
.view-tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; border-radius: 999px; background: rgba(255, 255, 255, 0.8); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 1rem; }
.view-tabs button { border: 0; background: none; padding: 0.55rem 1.1rem; border-radius: 999px; font: 400 0.95rem var(--body); color: var(--muted); cursor: pointer; transition: background 0.25s, color 0.25s; }
.view-tabs button[aria-selected="true"] { background: var(--rosewood); color: #fff; }
.viewport {
  position: relative; aspect-ratio: 4 / 5; max-height: 78vh; width: 100%;
  border-radius: 2.4rem 2.4rem 2.4rem 0.6rem;
  background: radial-gradient(ellipse at 50% 35%, #fff 0%, #fff4f7 45%, var(--petal) 100%);
  box-shadow: var(--glow); overflow: hidden;
}
.canvas-host, .canvas-host canvas { width: 100%; height: 100%; }
.canvas-host[hidden] { display: none; }
.viewport.is-loading::after { content: ""; position: absolute; inset: 0; background: rgba(255, 248, 250, 0.5); animation: breathe 1.4s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: 0.2; } to { opacity: 0.8; } }
.viewport-hint { position: absolute; bottom: 0.9rem; left: 0; right: 0; text-align: center; font-size: 0.82rem; color: var(--muted); margin: 0; pointer-events: none; }
.muse-views { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: rgba(255, 255, 255, 0.85); box-shadow: inset 0 0 0 1px var(--line); }
.muse-views[hidden], .credit[hidden] { display: none; }
.muse-views button { border: 0; background: none; padding: 0.4rem 0.85rem; border-radius: 999px; font: 400 0.85rem var(--body); color: var(--muted); cursor: pointer; }
.muse-views button[aria-pressed="true"] { background: var(--petal); color: var(--rosewood); }
.credit { position: absolute; left: 0; right: 0; bottom: 2.4rem; margin: 0; text-align: center; font-size: 0.72rem; color: var(--muted); opacity: 0.8; }
.credit a { color: inherit; }
.portrait { position: absolute; inset: 0; display: grid; place-items: center; }
.portrait[hidden] { display: none; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-wait { max-width: 20rem; text-align: center; padding: 2rem; display: grid; gap: 1rem; justify-items: center; }
.portrait-wait[hidden], .portrait img[hidden], .portrait-wait [hidden] { display: none; }
.portrait-wait.is-busy::before {
  content: ""; width: 54px; height: 54px; border-radius: 100% 0 100% 0; background: var(--blush);
  animation: unfurl 1.6s ease-in-out infinite;
}
@keyframes unfurl { 0%, 100% { transform: rotate(0deg) scale(0.8); } 50% { transform: rotate(90deg) scale(1.05); background: var(--rose); } }

.adorn { display: grid; gap: 1.6rem; padding-top: 3.4rem; }
.your-words { margin: 0; display: grid; gap: 0.4rem; justify-items: start; }
.your-words .quote { font-size: clamp(2rem, 4vw, 2.8rem); }
.choice { border: 0; padding: 0; margin: 0; }
.choice legend { font-weight: 500; margin-bottom: 0.7rem; font-size: 0.95rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; }
.swatch { display: grid; justify-items: center; gap: 0.3rem; cursor: pointer; font-size: 0.82rem; color: var(--muted); }
.swatch input, .size input { position: absolute; opacity: 0; pointer-events: none; }
.dot { display: inline-block; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--c, #eee); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px #fff, 0 0 0 4px transparent; transition: box-shadow 0.25s, border-radius 0.35s; }
.swatch input:checked + .dot { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px #fff, 0 0 0 4px var(--rosewood); border-radius: 50% 50% 50% 12%; }
.swatch input:checked ~ .swatch-name { color: var(--ink); }
.swatch input:focus-visible + .dot { outline: 2px solid var(--rosewood); outline-offset: 6px; }
.dot-sm { width: 0.8rem; height: 0.8rem; vertical-align: -0.05rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.sizes { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.size span { display: block; padding: 0.7rem 1.1rem; border-radius: 1rem; background: #fff; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background 0.25s, color 0.25s; }
.size input:checked + span { background: var(--petal); box-shadow: inset 0 0 0 1px var(--rose); }
.size input:focus-visible + span { outline: 2px solid var(--rosewood); outline-offset: 3px; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.qty { display: flex; align-items: center; gap: 0.6rem; }
.qty input, .line-qty input { width: 4.2rem; padding: 0.55rem 0.6rem; border: 1px solid var(--line); border-radius: 0.8rem; font: inherit; background: #fff; }
.price { font: 400 2rem/1 var(--display); margin: 0; }
.price .muted { font: 300 0.95rem var(--body); }

/* ---- basket / checkout / order ---- */
.lines { list-style: none; padding: 0; margin: 1.5rem 0; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 1.2rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.line-art { color: var(--rosewood); background: #fff; border-radius: 1rem 1rem 1rem 0.25rem; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.line-text p { margin: 0.15rem 0; }
.line-qty { display: flex; gap: 0.8rem; align-items: center; }
.line-price { margin: 0; font-weight: 400; white-space: nowrap; }
.lines-compact .line { grid-template-columns: 56px minmax(0, 1fr) auto; }
.lines-compact .line-art { width: 56px; height: 56px; }
.lines-compact .quote { font-size: 1.2rem; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 2rem; max-width: 26rem; margin: 1rem 0 0 auto; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font: 400 1.6rem/1.3 var(--display); padding-top: 0.5rem; border-top: 1px solid var(--line); }
.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.summary { position: sticky; top: 1rem; padding: 1.5rem; border-radius: 2rem 2rem 2rem 0.5rem; background: rgba(255, 255, 255, 0.75); box-shadow: var(--glow); }
.summary .totals { max-width: none; }
.order .totals { max-width: 34rem; grid-template-columns: auto 1fr; }
.progress { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.progress li { padding: 0.45rem 1rem; border-radius: 999px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-size: 0.9rem; }
.progress li.is-now { background: var(--rosewood); color: #fff; box-shadow: none; }
.order-row { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.order-row .arts { display: flex; color: var(--rosewood); }
.order-row .arts img + img { margin-left: -14px; }

/* ---- keepsake ---- */
.keepsake { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; max-width: 1180px; margin: 0 auto; padding: 1rem var(--gutter) 4rem; }
.keepsake-canvas { aspect-ratio: 1; width: 100%; }
.keepsake-quote { font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: 1.02; margin: 0.3em 0 0.5em; overflow-wrap: anywhere; }

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .hero, .stage-adorn, .checkout, .keepsake { grid-template-columns: minmax(0, 1fr); }
  .hero-bloom { max-width: 300px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .viewer, .summary { position: static; }
  .adorn { padding-top: 0; }
  .viewport { aspect-ratio: 1; }
  .keepsake-teaser > div { padding-left: 1.2rem; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .line { grid-template-columns: 56px minmax(0, 1fr); }
  .line-art { width: 56px; height: 56px; }
  .line-qty, .line-price { grid-column: 2; }
  .top-nav { width: 100%; justify-content: space-between; }
  .view-tabs { display: flex; }
  .view-tabs button { flex: 1; padding-inline: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; transition: none !important; }
}
