/* yourFlorist, in the Herbarium look: night palette, IBM Plex Serif italics,
   mono labels, ASCII flowers in the garden's own colours. */
:root {
  --night: #0b0c0e; --night-2: #121512; --ink: #e8e4d0; --ink-2: #cfcfcf; --dim: #8a8a9a; --faint: #ffffff14;
  --red: #ff8a8a; --gold: #e6c34a; --leaf: #6f9f6f; --moss: #3f6b3f; --pollen: #e6d27a;
  --mono: 'JetBrains Mono', ui-monospace, monospace; --sans: 'IBM Plex Sans', system-ui, sans-serif; --serif: 'IBM Plex Serif', Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body { min-height: 100svh; background: radial-gradient(1200px 600px at 85% -10%, #1a1f1a 0%, transparent 60%), var(--night); }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: #ff8a8a55; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ── top bar ── */
.top { position: fixed; z-index: 20; inset-inline: 0; top: 0; display: flex; align-items: center; gap: 40px; padding: 18px 34px 26px;
  background: linear-gradient(#0b0c0e 55%, #0b0c0ee6 70%, #0b0c0e00); }
.brand { font: 400 22px/1 var(--serif); letter-spacing: -.01em; text-decoration: none; transition: color .2s; }
.brand em { font-style: italic; color: var(--red); }
.brand:hover { color: var(--red); }
.steps { display: flex; gap: 26px; margin-inline-start: auto; }
.steps button { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: baseline; position: relative; padding: 6px 0;
  font: 500 12.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a3a3b0; transition: color .2s; }
.steps button b { font-weight: 500; color: #ffffff66; transition: color .2s; }
.steps button:hover, .steps button.is-on { color: var(--ink); }
.steps button.is-on b { color: var(--red); }
.steps button.is-on::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: var(--red); box-shadow: 0 0 8px var(--red); }
.steps button:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.is-gift .steps { display: none; }

/* ── type ── */
.tag { margin: 0; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
h1 { margin: 12px 0 0; font: 400 clamp(44px, 5.4vw, 76px)/.98 var(--serif); letter-spacing: -.03em; }
h1 em { font-style: italic; color: var(--red); }
.lead { margin: 18px 0 0; max-width: 44ch; font-size: 16px; line-height: 1.6; color: var(--dim); }

/* ── layout ── */
.shop > * { min-width: 0; }
.shop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; width: min(1180px, calc(100vw - 96px)); margin: 0 auto; padding: 130px 0 80px; align-items: start; }
.step { animation: up .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
.stage { position: sticky; top: 110px; }

/* ── species list ── */
.species { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--faint); }
.sp { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--faint); transition: padding .3s; }
.sp:hover { padding-inline-start: 6px; }
.sp:hover b { color: var(--red); }
.sp:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }
.sp .thumb { display: block; width: 68px; height: 50px; }
.sp b { display: block; font-weight: 500; font-size: 15.5px; transition: color .2s; }
.sp small { display: block; margin-top: 2px; font-size: 13px; color: var(--leaf); }
.sp .n { min-width: 26px; text-align: center; font: 500 12px/1 var(--mono); color: #ffffff55; }
.sp .n.has { color: var(--red); }
.sp-row { display: flex; align-items: center; }
.sp-row .sp { flex: 1; }
.minus { all: unset; cursor: pointer; width: 22px; text-align: center; font: 14px/1 var(--mono); color: var(--dim); visibility: hidden; }
.minus.has { visibility: visible; }
.minus:hover { color: var(--red); }
.minus:focus-visible { outline: 1px solid var(--red); }

.wraps { margin-top: 30px; }
.wrap-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip { all: unset; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; padding: 8px 11px; font: 500 12px/1 var(--mono); letter-spacing: .04em; border: 1px solid #ffffff22; color: var(--ink-2); transition: all .2s; }
.chip i { width: 9px; height: 9px; border-radius: 50%; }
.chip:hover { border-color: #ff8a8a88; }
.chip[aria-pressed='true'] { border-color: var(--red); color: var(--ink); box-shadow: 0 0 12px #ff8a8a2a; }
.chip:focus-visible { outline: 1px solid var(--red); outline-offset: 3px; }

/* ── buttons ── */
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.btn { cursor: pointer; display: inline-block; font: 500 13px/1 var(--mono); letter-spacing: .06em; padding: 12px 15px; text-decoration: none; color: var(--ink); border: 1px solid #ffffff2a; background: #0b0c0e99; transition: all .2s; }
.btn.is-go { border-color: #ff8a8a88; background: #ff8a8a12; }
.btn:hover:not(:disabled) { border-color: var(--red); color: var(--red); box-shadow: 0 0 14px #ff8a8a33; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }

/* ── note card ── */
.card { display: grid; gap: 22px; margin-top: 34px; padding: 28px 0 0;
  background: repeating-linear-gradient(90deg, #ffffff22 0 1px, transparent 1px 12px) top left / 100% 5px no-repeat, linear-gradient(#ffffff1a, #ffffff1a) top / 100% 1px no-repeat; }
.card label { display: grid; gap: 8px; position: relative; }
.card span { font: 500 11.5px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.card input, .card textarea { width: 100%; padding: 10px 0; background: transparent; border: 0; border-bottom: 1px solid #ffffff26; outline: 0; font: italic 400 22px/1.4 var(--serif); color: var(--ink); transition: border-color .2s; }
.card textarea { resize: vertical; font: 400 18px/1.7 var(--serif); font-style: normal; min-height: 150px; }
.card input:focus, .card textarea:focus { border-color: var(--red); }
.card ::placeholder { color: #ffffff33; }
.card small { justify-self: end; font: 11px var(--mono); color: var(--dim); }

/* ── share ── */
.link { display: flex; gap: 10px; margin-top: 34px; }
.link input { flex: 1; min-width: 0; padding: 12px 14px; font: 12.5px var(--mono); color: var(--leaf); background: #0e100f; border: 1px solid #ffffff1c; outline: 0; }
.link input:focus { border-color: var(--leaf); }
.note { min-height: 1.5em; margin: 12px 0 0; font: 12px var(--mono); color: var(--leaf); }

/* ── the plate: the bouquet ── */
.plate { position: relative; margin: 0; aspect-ratio: 1 / 1; padding: 10px; background: #0e100f; border: 1px solid var(--faint); }
.plate .c { position: absolute; width: 12px; height: 12px; border: 1px solid var(--red); opacity: .0; transition: all .3s; filter: drop-shadow(0 0 4px var(--red)); }
.plate .tl { top: -8px; left: -8px; border-right: 0; border-bottom: 0; } .plate .tr { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.plate .bl { bottom: -8px; left: -8px; border-right: 0; border-top: 0; } .plate .br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }
.plate.is-pop .c { opacity: 1; }
.fig { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; font: 12px/1.5 var(--mono); color: #7a7a84; }
.art { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.art.is-drag { cursor: grabbing; }
.art.is-over { cursor: move; } .art.is-move { cursor: grabbing; }
.hint { font: 11px var(--mono); letter-spacing: .08em; color: #5a5a66; }

/* ── the delivery ── */
/* the bouquet fills the screen; the note waits behind "Read the note", then a veil slides up over the flowers */
.gift { position: relative; height: 100svh; overflow: hidden; }
.g-art { position: fixed; z-index: 0; left: 0; right: 0; top: 124px; bottom: 76px; animation: up 1.2s cubic-bezier(.2, .8, .2, 1) .2s both; }
.g-bar { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 20px max(22px, env(safe-area-inset-bottom)); background: linear-gradient(#0b0c0e00, #0b0c0ecc 40%); transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1);
  animation: up 1s cubic-bezier(.2, .8, .2, 1) 1.2s both; }
/* the card in the bouquet is the way in; the button is only a quiet fallback */
.btn.g-read { font-size: 12px; padding: 10px 14px; border-color: #ffffff2a; background: #0b0c0e99; }
.gift.is-open .g-bar { opacity: 0; transform: translateY(20px); pointer-events: none; }
.g-hide { all: unset; cursor: pointer; display: block; width: fit-content; margin: 0 auto 18px; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
html[lang='ar'] .g-hide { letter-spacing: 0; font-family: 'IBM Plex Sans Arabic', var(--mono); font-size: 13px; }
.g-hide:hover { color: var(--ink); } .g-hide:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.g-head { position: fixed; z-index: 2; top: 62px; left: 16px; right: 16px; text-align: center; pointer-events: none; animation: up .9s cubic-bezier(.2, .8, .2, 1) both; }
.g-to { margin: 6px 0 0; font: italic 400 clamp(22px, 2.6vw, 30px)/1.2 var(--serif); letter-spacing: -.01em; color: var(--ink-2); text-wrap: balance; }
/* translucent: the flowers stay visible through it */
.g-veil { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; max-height: 66svh; overflow-y: auto; padding: 90px 20px max(28px, env(safe-area-inset-bottom));
  background: linear-gradient(#0b0c0e00, #0b0c0eb8 90px, #0b0c0ecc 55%, #0b0c0ef0);
  transform: translateY(105%); visibility: hidden; transition: transform .8s cubic-bezier(.2, .8, .2, 1), visibility 0s .8s; }
.gift.is-open .g-veil { transform: none; visibility: visible; transition: transform .8s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.g-card, .g-foot { width: min(640px, 100%); margin: 0 auto; }
.g-card:focus { outline: none; }
.g-msg { margin: 0; font: 400 20px/1.7 var(--serif); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.7em; }
.g-from { margin: 12px 0 0; text-align: end; font: italic 400 24px/1.3 var(--serif); color: var(--ink); }
.g-from:empty { display: none; }
/* the note: noise until it resolves */
.g-msg span { transition: color .4s, opacity .4s; }
.g-msg span:not(.is-on) { color: #8a8a9a; }
/* the signature writes itself once the note is all there */
.g-from { width: fit-content; margin-inline-start: auto; }
.g-card:not(.is-read) .g-from { clip-path: inset(0 100% 0 0); }
.g-card.is-read .g-from { animation: sign 1.3s cubic-bezier(.5, 0, .3, 1) .15s both; }
@keyframes sign { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
html[dir='rtl'] .g-card:not(.is-read) .g-from { clip-path: inset(0 0 0 100%); }
html[dir='rtl'] .g-card.is-read .g-from { animation-name: sign-rtl; }
@keyframes sign-rtl { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
#g-bar-hint { color: var(--ink-2); }
.g-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 22px; padding-top: 16px;
  background: repeating-linear-gradient(90deg, #ffffff22 0 1px, transparent 1px 12px) top left / 100% 5px no-repeat; }

@media (max-width: 900px) {
  .top { padding: 14px 16px 22px; gap: 18px; }
  .brand { font-size: 19px; }
  .steps { gap: 16px; } .steps button { font-size: 11px; letter-spacing: .08em; } .steps button span { display: none; }
  .shop { grid-template-columns: 1fr; gap: 40px; width: calc(100vw - 32px); padding-top: 90px; }
  .stage { position: sticky; top: 0; z-index: 5; order: -1; margin-top: -58px; padding-top: 58px; background: var(--night); }
  .plate { aspect-ratio: auto; height: 38svh; padding: 4px; }
  .fig .hint { display: none; }
  .g-head { top: 52px; }
  .g-art { top: 112px; }
  .g-veil { padding-top: 60px; max-height: 72svh; }
  .fig { margin: 8px 0 6px; }
  .species { grid-template-columns: 1fr; }
  .lead { font-size: 15px; }
  .link { flex-direction: column; }
  .g-msg { font-size: 17.5px; }
  .g-from { font-size: 21px; }
  .btn, .btn.g-read { padding-top: 15px; padding-bottom: 15px; }   /* tap targets of 44px or more */
}

/* ── language: the switch, and Arabic set in Amiri / IBM Plex Sans Arabic like the Herbarium ── */
.lang { all: unset; cursor: pointer; margin-inline-start: 18px; padding: 5px 9px; font: 500 12px/1 'IBM Plex Sans Arabic', var(--mono); color: var(--ink-2);
  background: rgba(11, 12, 14, .6); border: 1px solid #ffffff1f; transition: color .2s, border-color .2s; }
.lang[lang='en'] { font-family: var(--mono); letter-spacing: .06em; }
.lang:hover { color: var(--ink); border-color: #ff8a8a88; }
.lang:focus-visible { outline: 1px solid var(--red); outline-offset: 3px; }
.is-gift .lang { margin-inline-start: auto; }
html[lang='ar'] { --sans: 'IBM Plex Sans Arabic', system-ui, sans-serif; --serif: 'Amiri', 'IBM Plex Serif', serif; }
html[lang='ar'] h1, html[lang='ar'] h1 em, html[lang='ar'] .g-to, html[lang='ar'] .g-from, html[lang='ar'] .card input, html[lang='ar'] .peek-to, html[lang='ar'] .peek-from { font-style: normal; }
html[lang='ar'] h1 { font-weight: 700; line-height: 1.3; letter-spacing: 0; }
html[lang='ar'] .tag, html[lang='ar'] .steps button, html[lang='ar'] .card span { letter-spacing: 0; font-family: 'IBM Plex Sans Arabic', var(--mono); font-size: 13px; }
html[lang='ar'] .lead, html[lang='ar'] .sp b { font-size: 16.5px; }
html[lang='ar'] .g-msg { font-size: 22px; line-height: 1.9; }

/* ── the centre flower ── */
.center-pick { margin-top: 22px; }
.center-pick label { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.center-pick select { font: 500 12.5px var(--mono); color: var(--ink); background: #0e100f; border: 1px solid #ffffff22; padding: 8px 10px; outline: 0; }
html[lang='ar'] .center-pick select { font-family: 'IBM Plex Sans Arabic', var(--mono); font-size: 14px; }
.center-pick select:focus { border-color: var(--red); }

/* ── the note as they'll read it, over the bouquet while writing ── */
.peek { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; text-align: start; pointer-events: none;
  background: linear-gradient(#0e100f00, #0e100fe6 40px, #0e100f); }
.peek-to { margin: 0; font: italic 400 18px var(--serif); color: var(--ink-2); }
.peek-to em { color: var(--red); }
.peek-msg { margin: 6px 0 0; font: 400 15px/1.6 var(--serif); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.peek-from { margin: 4px 0 0; text-align: end; font: italic 400 16px var(--serif); color: var(--ink); }
.peek-from:empty { display: none; }

/* ── the gift's actions ── */
.g-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-inline-start: auto; }
.btn:disabled { opacity: .5; cursor: progress; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
