:root {
  --paper: #F9F5F3;   /* exact logo background, so the cropped artwork blends in */
  --blush: #F3E6E3;
  --rose: #DE8196;
  --rose-deep: #A84E63; /* AA-contrast rose for text on paper */
  --rosegold: #CF9A8F;
  --ink: #4B5046;
  --ink-soft: #666A60;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
  --script: 'Meow Script', cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(2.25rem, 5vw, 3.25rem); color: var(--rose-deep); letter-spacing: .02em; }
p { margin: 0; }
a { color: var(--rose-deep); }
:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 0; } /* ring sits right on the element's edge */
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; } /* .card, .filters and friends set display, which would otherwise beat the attribute */

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; background: var(--paper); padding: 8px 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.6em;
  border: 1px solid var(--rose-deep); border-radius: 999px;
  background: var(--rose-deep); color: #fff;
  font: 500 1rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover { background: #93404F; }
.btn-ghost { background: transparent; color: var(--rose-deep); }
.btn-ghost:hover { background: var(--rose-deep); color: #fff; }
.btn-small { min-height: 40px; padding: 0 1.1em; font-size: .9375rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--rosegold) 35%, transparent);
}
.brand {
  font: 500 1.6rem/1 var(--serif); letter-spacing: .16em; text-transform: uppercase;
  color: var(--rose-deep); text-decoration: none; margin-right: auto;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .9375rem; }
.site-header nav a:hover { color: var(--rose-deep); }
@media (max-width: 720px) { .site-header nav { display: none; } }

/* Hero seal: everything positioned in % of a square that mirrors the 1254px logo */
.hero { padding: 8px var(--gutter) clamp(56px, 8vw, 96px); text-align: center; }
.seal {
  position: relative;
  width: min(100vw, 640px, 78svh); /* may exceed the padded hero on phones: the seal has empty margins outside the ring */
  aspect-ratio: 1;
  margin-left: 50%; translate: -50% 0;
  container-type: inline-size;
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring .draw { fill: none; stroke: url(#rosegold); stroke-width: 3; stroke-linecap: round; }
.ring .arrow { stroke: var(--rose); stroke-width: 2.4; }
.ring .dots { fill: var(--rose); }

/* artwork from a region (x, y, w, h) of the 1254px logo sits at left/top/width/height = x|y|w|h / 1254 */
.crop { position: absolute; }
/* vector trace of logo region (465, 220, 315, 280); this copy draws itself in (timing lives inside the SVG) */
.crop-flower {
  left: 37.081%; top: 17.544%; width: 25.12%; height: 22.329%;
  border: 0; /* an iframe (see index.html); the SVG scales to fit it like background-size: contain */
}
/* logo region (295, 826, 690, 284), AI-upscaled to 1.5×, paper made transparent so the SVG ring passes behind it */
.crop-bouquet {
  left: 23.525%; top: 65.869%; width: 55.024%; height: 22.648%;
  background: url(assets/bouquet.webp) no-repeat center / 100% 100%;
}

.seal-text { position: absolute; inset: 39.6% 0 auto; z-index: 1; }
.seal h1 {
  font-size: 15.4cqi; font-weight: 500; line-height: 1;
  letter-spacing: .07em; text-indent: .07em; /* indent balances the trailing tracking */
  color: var(--rose); text-transform: uppercase;
}
.tagline { font: 400 7.2cqi/1 var(--script); color: var(--ink); margin-top: -1.2cqi; }
.tagline .heart { font: 2.4cqi/1 var(--sans); color: var(--rose); vertical-align: middle; margin-inline: 4cqi; }
.rule {
  display: flex; align-items: center; justify-content: center; gap: 2cqi;
  margin: 1.6cqi auto 0; width: 40cqi; color: var(--rose); font-size: 2.4cqi; line-height: 1;
}
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: var(--rosegold); }
.kicker {
  margin-top: .8cqi;
  font: 500 max(10px, 1.75cqi)/1 var(--sans); letter-spacing: .3em; text-indent: .3em;
  text-transform: uppercase; color: var(--ink);
}
/* on phones the 10px floor makes the kicker relatively big: tighten it so it clears the bouquet's leaf tips */
@media (max-width: 480px) {
  .rule { margin-top: .8cqi; }
  .kicker { margin-top: 0; letter-spacing: .2em; text-indent: .2em; }
}
/* two levels under the seal: an italic serif line like the logo's, then the practical how-to-order line */
.hero-lead { max-width: 34ch; text-wrap: balance; margin: clamp(8px, 2vw, 20px) auto 0; font: italic 400 clamp(1.5rem, 3vw, 2rem)/1.3 var(--serif); color: var(--ink); }
.hero-note { max-width: 44ch; text-wrap: balance; margin: 12px auto 0; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* One orchestrated load moment: the ring draws itself, then the artwork and words settle in, then the copy and buttons below */
@media (prefers-reduced-motion: no-preference) {
  .ring .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.55, .1, .3, 1) forwards; }
  .ring .d2 { animation-duration: .45s; animation-delay: 1.45s; }
  .ring .d3 { animation-duration: .45s; animation-delay: 1.85s; }
  .ring .d4 { animation-duration: .6s; animation-delay: .9s; }
  .ring .dots, .seal-text, .crop-bouquet { opacity: 0; animation: fade .9s ease-out 1.1s forwards; }
  .ring .dots { animation-duration: .3s; animation-delay: 1.35s; }
  .hero-lead, .hero-note, .hero-actions .btn { animation: rise .6s cubic-bezier(.2, .7, .2, 1) 1.2s both; }
  .hero-note { animation-delay: 1.3s; }
  .hero-actions .btn { animation-delay: 1.4s; }
  .hero-actions .btn + .btn { animation-delay: 1.48s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes rise { from { opacity: 0; translate: 0 10px; } }
}

/* Catalog */
.catalog, .steps, .about, .contact { max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; }
.section-head p { color: var(--ink-soft); max-width: 46ch; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; }
.catalog-empty { max-width: 44ch; margin-top: 28px; font: 400 1.3125rem/1.6 var(--serif); }
.filters button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--rosegold) 60%, transparent); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 400 .9375rem/1 var(--sans); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters button:not([aria-pressed="true"]):hover { border-color: var(--ink); }

/* Category colour dot, shared by chips and card labels */
.dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 3vw, 36px);
}
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card-open {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.card-media {
  display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 6px; margin-bottom: 12px;
  /* fallback art, visible only when the photo fails */
  background: var(--blush) url(assets/flower-line.svg) no-repeat center / 50% auto;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card-media.is-broken img { visibility: hidden; }
.card-open:hover img { transform: scale(1.04); }
.card-cat { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ink-soft); }
.card-name { font: 500 1.625rem/1.15 var(--serif); color: var(--ink); }
.card-open:hover .card-name { color: var(--rose-deep); }
.card-desc { margin-top: 6px; color: var(--ink-soft); font-size: .9688rem; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; }
.price { font: 500 1.125rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }

/* Steps: a real sequence, so the numbers carry meaning */
.steps { margin-top: clamp(96px, 12vw, 160px); }
.steps ol {
  list-style: none; margin: 36px 0 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 40px;
}
.steps li { counter-increment: step; border-top: 1px solid var(--rosegold); padding-top: 20px; }
.steps li::before { content: counter(step); font: 400 3rem/1 var(--serif); color: var(--rose); }
.steps h3 { font-size: 1.75rem; margin: 10px 0 6px; }
.steps p { color: var(--ink-soft); max-width: 34ch; }

/* About */
.about {
  margin-top: clamp(96px, 12vw, 160px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); align-items: center;
}
.about p { max-width: 58ch; margin-top: 16px; font-family: var(--serif); font-size: 1.3125rem; line-height: 1.6; }
.about .signoff { font: 400 2.5rem/1 var(--script); color: var(--rose-deep); margin-top: 24px; }
.crop-inline {
  aspect-ratio: 315 / 280; width: min(100%, 360px); justify-self: center;
  background: url(assets/flower-line.svg) no-repeat center / contain;
}
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .crop-inline { width: 180px; }
}

/* Contact */
.contact { margin-top: clamp(96px, 12vw, 160px); }
.contact dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 28px; margin: 28px 0 0; }
.contact dt { font-size: .875rem; color: var(--ink-soft); }
/* lining figures: Cormorant's default old-style digits bounce and dip through the phone link's underline */
.contact dd { margin: 4px 0 0; font: 500 1.25rem/1.4 var(--serif); font-variant-numeric: lining-nums; }

.site-footer {
  margin-top: clamp(96px, 12vw, 160px); padding: 32px var(--gutter);
  border-top: 1px solid color-mix(in srgb, var(--rosegold) 35%, transparent);
  text-align: center; font-size: .875rem; color: var(--ink-soft);
}

/* "No access" and failed sign-in pages, written by the server (app.mjs) */
.notice-page main { max-width: 36rem; margin: 0 auto; padding: clamp(48px, 12vh, 128px) var(--gutter); }
.notice-page h1 { margin-top: clamp(40px, 8vh, 72px); font-size: clamp(2.25rem, 5vw, 3rem); color: var(--rose-deep); }
.notice-page p { margin-top: 12px; color: var(--ink-soft); }
.notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* Product dialog */
dialog {
  width: min(920px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
dialog::backdrop { background: color-mix(in srgb, var(--ink) 55%, transparent); }
.dlg { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dlg-media { margin: 0; border-radius: 0; height: 100%; }
.dlg-body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.dlg-body h2 { font-size: clamp(2rem, 4vw, 2.75rem); color: var(--ink); }
.dlg-body h3 { font: 500 .9375rem/1 var(--sans); margin-top: 8px; }
.dlg-body ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.dlg-body .price { font-size: 1.5rem; margin: 8px 0; }
.dlg-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 85%, transparent); color: var(--ink);
  font: 400 1.75rem/1 var(--sans); cursor: pointer;
}
@media (max-width: 720px) {
  .dlg { grid-template-columns: 1fr; }
  .dlg-media { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-media img { transition: none; }
}
