@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}

/* Cyrillic and Greek. The browser downloads these only for pages that use them. */
@font-face {
  font-family: 'Literata';
  src: url('/fonts/literata-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Literata';
  src: url('/fonts/literata-greek-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0370-03FF;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope-greek-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0370-03FF;
}

:root {
  --paper: #fff6e8;
  --card: #fffdf8;
  --sand: #f6e6cd;
  --ink: #33163a;
  --ink-soft: #6c5570;
  --coral: #d9412b;
  --coral-deep: #b8301d;
  --gold: #f3b33d;
  --line: #e7d6bc;
  --plum: #33163a;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(51 22 58 / 0.06), 0 10px 26px rgb(51 22 58 / 0.08);
  --display: 'Fraunces', 'Literata', Georgia, serif;
  --body: 'Figtree', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip-link:focus { left: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgb(255 246 232 / 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.3rem var(--display); text-decoration: none; }
.brand { flex: none; }
.brand img { width: 32px; height: 32px; flex: none; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { background: var(--sand); }
.nav a[aria-current='page'] { background: var(--sand); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.lang-menu { position: relative; flex: none; }
.lang-button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font-weight: 500; cursor: pointer; }
.lang-button:hover, .lang-button[aria-expanded='true'] { background: var(--sand); }
.lang-arrow { font-size: 0.75rem; color: var(--ink-soft); }
.flag { flex: none; width: 20px; height: 15px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgb(51 22 58 / 0.18); }
.lang-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 170px; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lang-list[hidden] { display: none; }
.lang-list a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-weight: 500; }
.lang-list a:hover { background: var(--sand); }
.lang-list a[aria-current] { background: var(--sand); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 20px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--coral); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--coral-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--sand); }
.btn-text { background: none; color: var(--ink-soft); padding-inline: 10px; min-height: 36px; font-weight: 500; }
.btn-text:hover { background: var(--sand); color: var(--ink); }
.btn-danger { color: var(--coral-deep); }
.btn-small { min-height: 38px; padding: 6px 15px; font-size: 0.95rem; }
.btn-large { min-height: 54px; padding: 12px 30px; font-size: 1.1rem; }

/* Home: hero */
.hero { padding: clamp(44px, 7vw, 92px) 0 clamp(52px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.9rem, 7.2vw, 5.4rem); line-height: 1; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lede { font-size: clamp(1.12rem, 2vw, 1.32rem); color: var(--ink-soft); margin: 22px 0 30px; max-width: 34rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.demo-stack { position: relative; display: grid; gap: 14px; }
.demo-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.demo-card:nth-child(1) { transform: rotate(-1.6deg); }
.demo-card:nth-child(2) { transform: rotate(1.1deg) translateX(16px); }
.demo-card:nth-child(3) { transform: rotate(-0.7deg); }
.demo-art { flex: none; width: 66px; height: 66px; border-radius: 13px; display: grid; place-items: center; }
.demo-art svg { width: 38px; height: 38px; }
.art-gold { background: #fbdf9f; }
.art-coral { background: #f9c4b5; }
.art-plum { background: #dcc9e0; }
.demo-art img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.wish-card { animation: wish-in 0.45s ease both; }
@keyframes wish-in { from { opacity: 0; } to { opacity: 1; } }
.wishes-caption { margin: 14px 0 0; text-align: center; }
.wishes-caption[hidden] { display: none; }
.demo-card b { display: block; font-weight: 600; line-height: 1.25; }
.demo-card span { color: var(--ink-soft); font-size: 0.93rem; }
.demo-pill { margin-left: auto; flex: none; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; background: var(--sand); font-size: 0.82rem; font-weight: 600; white-space: nowrap; color: var(--ink); }
.pill-gold { background: #fbdf9f; }
.pill-green { background: #d3e8c8; }

/* Home: sections */
.band { padding: clamp(52px, 8vw, 96px) 0; }
.band-dark { background: var(--plum); color: var(--paper); }
.band-dark .muted { color: #d8c8da; }
.band-sand { background: var(--sand); }
.section-title { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 19ch; margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 4vw, 44px); padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font: 600 3rem/1 var(--display); color: var(--gold); margin-bottom: 12px; }
.steps h3 { font-size: 1.45rem; margin-bottom: 8px; }
.secret { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 64px); align-items: center; }
.secret h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-bottom: 16px; }
.compare { display: grid; gap: 14px; }
.compare-card { background: var(--card); color: var(--ink); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compare-card small { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.occasions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.occasions li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 9px 20px; font: 500 1.12rem var(--display); }
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
.faq details p { margin-top: 10px; color: var(--ink-soft); }
.faq-more { margin-top: 20px; font-weight: 600; }
.cta { text-align: center; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 auto 24px; }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--ink-soft); font-size: 0.92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { text-underline-offset: 3px; }

/* App pages */
main.page { padding: clamp(28px, 5vw, 52px) 0 80px; min-height: 65vh; }
main:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.page-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.page-head .description { margin-top: 12px; max-width: 42rem; color: var(--ink-soft); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; margin-bottom: 14px; color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--ink); text-decoration: underline; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.list-card { display: flex; flex-direction: column; gap: 8px; min-height: 164px; padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; box-shadow: var(--shadow); transition: transform 0.15s; }
.list-card:hover { transform: translateY(-3px); }
.list-card h2 { font-size: 1.5rem; }
.list-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.92rem; }

.gift { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gift-image { aspect-ratio: 4 / 3; background: var(--sand); display: grid; place-items: center; position: relative; overflow: hidden; }
.gift-image img { width: 100%; height: 100%; object-fit: cover; }
.gift-image svg { width: 56px; height: 56px; opacity: 0.45; }
.gift-image .pill { position: absolute; top: 10px; left: 10px; }
.gift-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gift-body h3 { font: 600 1.06rem/1.3 var(--body); letter-spacing: 0; overflow-wrap: anywhere; }
.gift-price { font-weight: 700; }
.gift-quantity { color: var(--ink-soft); font-size: 0.93rem; font-weight: 600; }
.how-many { min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); padding: 5px 8px; }
.gift-note { color: var(--ink-soft); font-size: 0.93rem; overflow-wrap: anywhere; }
.gift-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gift-actions .btn { flex: 0 1 auto; }
.gift.is-taken .gift-image { filter: grayscale(0.75); opacity: 0.72; }

.notice { display: flex; gap: 10px; align-items: center; background: var(--sand); border-radius: 14px; padding: 12px 16px; margin-bottom: 24px; font-size: 0.97rem; }
.notice svg { flex: none; width: 24px; height: 24px; color: var(--coral); }
.empty { text-align: center; padding: clamp(40px, 8vw, 76px) 20px; border: 2px dashed var(--line); border-radius: var(--radius); }
.empty h2 { font-size: 1.8rem; margin-bottom: 8px; }
.empty p { color: var(--ink-soft); margin-bottom: 20px; }

/* Forms */
.auth { width: min(430px, 100%); margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 36px); box-shadow: var(--shadow); }
.auth h1 { font-size: 2.2rem; margin-bottom: 20px; }
.auth .switch { margin-top: 16px; text-align: center; color: var(--ink-soft); }
.auth .intro { margin: -8px 0 18px; }
.auth.contact { width: min(560px, 100%); }
.providers { display: grid; gap: 10px; }
.btn-provider { width: 100%; }
.btn-provider svg { flex: none; width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; color: var(--ink-soft); font-size: 0.92rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.forgot { margin: -6px 0 14px; text-align: right; font-size: 0.93rem; }
.trap { position: absolute; left: -9999px; }
.check-hint { margin: -10px 0 16px 28px; }
.prose { max-width: 720px; margin-inline: auto; }
.prose h1 { font-size: clamp(2.3rem, 6vw, 3.4rem); margin-bottom: 18px; }
.prose .lede { font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 30px; }
.prose section { margin-bottom: 26px; }
.prose section h2 { font-size: 1.5rem; margin-bottom: 8px; }
.prose > .btn { margin-top: 6px; }
.admin-section { margin-bottom: 40px; }
.admin-section > h2 { font-size: 1.6rem; margin-bottom: 8px; }
.admin-section > p { margin-bottom: 14px; }
.admin-form { max-width: 640px; }
.admin-list { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.admin-row .demo-card { flex: 1 1 280px; box-shadow: none; transform: none; }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-actions select { min-height: 38px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); padding: 5px 8px; }
.admin-message { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.admin-message p { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.field { display: grid; gap: 5px; margin-bottom: 15px; }
.field > span { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; background: #fff; border: 1.5px solid var(--line); border-radius: 11px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgb(217 65 43 / 0.16); }
.field textarea { resize: vertical; min-height: 78px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-input { display: flex; gap: 8px; }
.inline-input input { flex: 1; min-width: 0; }
.check { display: flex; gap: 9px; align-items: center; margin-bottom: 16px; font-weight: 500; }
.check input { width: 19px; height: 19px; accent-color: var(--coral); }
.form-error { color: var(--coral-deep); font-weight: 600; margin-bottom: 12px; }
.form-error:empty { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100dvh - 28px); border: 0; border-radius: var(--radius); padding: clamp(20px, 4vw, 30px); background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgb(51 22 58 / 0.32); }
dialog::backdrop { background: rgb(51 22 58 / 0.48); }
dialog h2 { font-size: 1.75rem; margin-bottom: 16px; }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: grid; gap: 8px; width: min(420px, calc(100% - 28px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 11px 16px; box-shadow: var(--shadow); text-align: center; }
.toast.is-error { background: var(--coral-deep); }

@media (max-width: 860px) {
  .hero .wrap, .secret { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .demo-card:nth-child(2) { transform: rotate(1.1deg); }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .site-header .wrap { min-height: 60px; }
  /* Flex-end would push overflowing links off the left edge, out of scrolling reach. */
  .nav { flex-wrap: nowrap; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .nav > :first-child { margin-left: auto; }
  .header-actions { gap: 2px; min-width: 0; }
  .lang-name { display: none; }
  .lang-button { min-height: 38px; padding: 5px 7px; gap: 4px; }
  .nav a:not(.btn), .nav .btn-text { padding: 7px 6px; font-size: 0.88rem; white-space: nowrap; }
  .nav .btn-small { padding-inline: 11px; font-size: 0.88rem; white-space: nowrap; }
  .field-row { grid-template-columns: 1fr; }
  .demo-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
