/* Stationery cards. Everything is sized in cqw (1% of the card's width) so a card looks
   identical as a thumbnail, in the editor, on a phone, and printed at 5×7 inches. */
.card-frame { container-type: inline-size; width: 100%; }
.card {
  --paper: #FBFAF6; --ink: #1E3A34; --accent: #9C7A3C;
  position: relative; aspect-ratio: 5 / 7; overflow: hidden;
  background: var(--paper); color: var(--ink);
  font-family: "Bodoni Moda", "Didot", Georgia, serif;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 30px -18px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
}
.card-inner {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 10cqw 9cqw; gap: 2.6cqw;
}
.card p, .card h2 { margin: 0; white-space: pre-line; color: inherit; }
.card [data-bind]:empty { display: none; }
.c-intro { font-size: 3.6cqw; letter-spacing: .08em; color: var(--accent); }
.c-names { font-size: 10cqw; line-height: 1.05; font-weight: 400; font-family: inherit; }
.c-body { font-size: 3.6cqw; line-height: 1.45; max-width: 74cqw; }
.c-date { font-size: 4.4cqw; }
.c-details { font-size: 3.4cqw; line-height: 1.5; }
.c-footer { font-size: 3cqw; line-height: 1.5; color: var(--accent); margin-top: 2cqw !important; }
.orn { display: none; color: var(--accent); }
.card-photo { height: 46%; flex: none; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-photo .card-inner { padding-top: 6cqw; padding-bottom: 6cqw; gap: 1.8cqw; }
.has-photo .c-names { font-size: 8.5cqw; }

/* Classic, double rule border */
.t-classic { outline: 1px solid var(--accent); outline-offset: -4cqw; }
.t-classic::after { content: ""; position: absolute; inset: 5.4cqw; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); pointer-events: none; }

/* Botanical, a leafy sprig above the names */
.t-botanical .orn-sprig { display: block; position: absolute; width: 46cqw; top: 6cqw; left: 50%; transform: translateX(-50%); }
.t-botanical.has-photo .orn-sprig { display: none; }
.t-botanical .card-inner { padding-top: 22cqw; }
.t-botanical .c-names { font-style: italic; }

/* Modern, bold sans, left aligned, heavy rule */
.t-modern { font-family: "Figtree", system-ui, sans-serif; }
.t-modern .card-inner { align-items: flex-start; text-align: left; justify-content: flex-end; padding: 10cqw; }
.t-modern .c-names { font-size: 12cqw; font-weight: 700; letter-spacing: -.02em; border-bottom: 1.4cqw solid var(--accent); padding-bottom: 3cqw; }
.t-modern.has-photo .c-names { font-size: 9cqw; }
.t-modern .c-intro { letter-spacing: 0; font-weight: 600; }
.t-modern .c-body { max-width: none; }

/* Deco, gold geometry */
.t-deco { background: var(--ink); color: var(--paper); }
.t-deco .c-intro, .t-deco .c-footer { color: var(--accent); }
.t-deco::before, .t-deco::after { content: ""; position: absolute; border: 1px solid var(--accent); pointer-events: none; }
.t-deco::before { inset: 4cqw; }
.t-deco::after { inset: 5.6cqw; opacity: .55; }
.t-deco .orn-deco { display: block; width: 40cqw; margin: 0 auto; order: 3; }
.t-deco .card-inner { position: relative; }
.t-deco .c-names { letter-spacing: .02em; }
.t-deco .orn-deco { position: absolute; bottom: 9cqw; left: 30cqw; }

/* Watercolor, soft washes of the accent */
.t-watercolor {
  background:
    radial-gradient(42cqw 30cqw at 12% 8%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    radial-gradient(50cqw 34cqw at 92% 96%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%),
    radial-gradient(30cqw 22cqw at 85% 12%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 70%),
    var(--paper);
}
.t-watercolor .c-names { font-style: italic; }

/* Romance, flowing script names */
.t-script .c-names { font-family: "Pinyon Script", "Bodoni Moda", cursive; font-size: 13cqw; line-height: 1.15; }
.t-script.has-photo .c-names { font-size: 10cqw; }
.t-script .c-intro { font-style: italic; letter-spacing: 0; font-size: 4cqw; }

/* Thank-you cards: big greeting, the note reads like a letter */
.k-thank_you .c-intro { font-size: 11cqw; letter-spacing: 0; font-style: italic; color: var(--ink); }
.k-thank_you .c-names { display: none; }
.k-thank_you .c-body { text-align: left; font-size: 3.8cqw; line-height: 1.6; max-width: none; align-self: stretch; }
.t-deco.k-thank_you .c-intro { color: var(--accent); }
.t-script.k-thank_you .c-intro { font-family: "Pinyon Script", cursive; font-style: normal; font-size: 13cqw; }

/* Menu & program: the long list is the content */
.k-menu .c-details, .k-program .c-details { font-size: 3.6cqw; line-height: 1.6; }

/* ---------- studio pages ---------- */
.studio { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .studio { grid-template-columns: 1fr; } }
.studio-preview { position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.studio-preview .card-frame { width: min(460px, 100%); }
.design-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.design-grid figure { margin: 0; }
.design-grid figcaption { padding-top: 8px; font-size: .9rem; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.choice-grid label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .8rem; cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; }
.choice-grid input:checked + .card-frame .card, .choice-grid input:checked + .swatch { outline: 3px solid var(--ink, #1E3A34); outline-offset: 2px; }
.choice-grid input:focus-visible + .card-frame .card, .choice-grid input:focus-visible + .swatch { outline: 3px dashed #A8505A; outline-offset: 2px; }
.swatch { display: flex; height: 36px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); }
.swatch span { flex: 1; }

/* ---------- guest-facing digital card ---------- */
.card-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; }
.card-page .card-frame { width: min(480px, 100%); }

/* ---------- print: one card per 5×7 page ---------- */
.print-sheet .card-frame { width: 5in; margin: 0 auto 24px; }
@media print {
  @page { size: 5in 7in; margin: 0; }
  html, body { background: #fff !important; margin: 0; }
  .no-print { display: none !important; }
  .print-sheet .card-frame { width: 5in; margin: 0; page-break-after: always; break-after: page; }
  .card { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* a card wrapped in a link shouldn't inherit link underlines */
.design-grid figure > a:first-child { display: block; text-decoration: none; color: inherit; }
