@font-face { font-family: "Marck"; src: url("/assets/fonts/MarckScript-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/Lora.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/assets/fonts/Lora-Italic.ttf") format("truetype"); font-style: italic; font-weight: 400 700; font-display: swap; }

:root {
  --night: #13233d;
  --night-2: #1d3557;
  --snow: #f6f8fb;
  --paper: #ffffff;
  --ink: #1f2433;
  --muted: #5a6274;
  --line: #d9dfe8;
  --holly: #a3262c;
  --holly-dark: #861d22;
  --pine: #2f5d3a;
  --gold: #c9a24b;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--snow); color: var(--ink);
  font-family: "Lora", Georgia, serif; font-size: 17px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--holly); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- night band */
.night {
  color: var(--snow);
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff9 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, #fff8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 18%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 48%, #fff7 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 26%, #fffb 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 70%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 80%, #fff6 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  padding-bottom: 150px;
}
.top { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.brand { font-family: "Marck", cursive; font-size: 28px; color: var(--snow); text-decoration: none; }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  font: inherit; font-size: 14px; color: #c9d4e6; background: transparent;
  border: 1px solid transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { color: var(--snow); border-color: #ffffff55; }
.hero { padding: 36px 0 8px; }
.hero > * { max-width: 780px; }
.hero h1 {
  font-family: "Marck", cursive; font-weight: 400;
  font-size: clamp(40px, 6.4vw, 76px); line-height: 1.05; margin: 0 0 22px; color: #fff;
}
.hero .lead { font-size: 19px; max-width: 60ch; color: #e3e9f3; margin: 0 0 10px; }
.price-line { color: var(--gold); margin: 0; font-size: 16px; }

/* ---------- workbench */
.bench {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px;
  margin-top: -120px; align-items: start;
}
.slip {
  background: var(--paper); border-radius: var(--radius); padding: 32px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px #13233d66;
}
.slip h2 { font-family: "Marck", cursive; font-weight: 400; font-size: 32px; color: var(--holly); margin: 0 0 12px; line-height: 1.2; }
fieldset { border: 0; padding: 0; margin: 0; }
.child { border-top: 1px solid var(--line); padding: 20px 0 8px; }
.child legend, .shared legend { font-weight: 600; font-size: 15px; color: var(--pine); padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.child legend + * { clear: both; }
.shared { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 16px; }
.shared legend + * { clear: both; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; font-size: 15px; }
.field > span { font-weight: 600; }
.field em { font-weight: 400; font-style: italic; color: var(--muted); }
.field small { color: var(--muted); font-size: 14px; margin-top: -4px; }
.row { display: flex; gap: 16px; }
.row > .field { flex: 1; }
.row > .age { flex: 0 0 96px; }
input[type="text"], input:not([type]), input[type="email"], select {
  font: inherit; font-size: 16px; color: var(--ink); background: #fbfcfe;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus { border-color: var(--night-2); outline: none; box-shadow: 0 0 0 3px #1d355722; }
input::placeholder { color: #9aa2b1; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; }
.pills span { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; cursor: pointer; }
.pills input:checked + span { background: var(--night); color: #fff; border-color: var(--night); }
.pills input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; margin: -6px 0 16px; }
.check input { width: 18px; height: 18px; accent-color: var(--holly); }
.swatches { display: flex; gap: 12px; }
.swatches label { position: relative; cursor: pointer; text-align: center; font-size: 14px; }
.swatches input { position: absolute; opacity: 0; }
.swatches img { width: 80px; border-radius: 4px; border: 2px solid transparent; box-shadow: 0 2px 8px -3px #0003; margin-bottom: 4px; }
.swatches input:checked + img { border-color: var(--holly); }
.swatches input:focus-visible + img { outline: 3px solid var(--gold); outline-offset: 2px; }

button { font: inherit; cursor: pointer; }
.primary {
  width: 100%; background: var(--holly); color: #fff; border: 0; border-radius: 8px;
  padding: 14px 18px; font-size: 17px; font-weight: 600; margin-top: 8px;
}
.primary:hover { background: var(--holly-dark); }
.primary[disabled] { opacity: .7; cursor: progress; }
.ghost { background: none; border: 1px dashed var(--line); color: var(--ink); border-radius: 8px; padding: 10px 14px; width: 100%; margin: 4px 0 8px; font-size: 15px; }
.ghost:hover { border-color: var(--night-2); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; font-size: 14px; margin-bottom: 12px; }
.error { color: var(--holly); font-size: 15px; margin: 8px 0 0; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- desk: envelope -> letter */
.desk { position: sticky; top: 24px; }
.envelope {
  position: relative; aspect-ratio: 1.55 / 1; margin-top: 40px;
  transition: opacity .35s ease, transform .35s ease;
}
.env-back, .env-front { position: absolute; inset: 0; border-radius: 6px; }
.env-back { background: #ead9bd; box-shadow: 0 24px 40px -24px #13233d99; }
.env-front {
  background:
    linear-gradient(to top right, transparent 49.6%, #dcc7a4 50%) left / 50% 100% no-repeat,
    linear-gradient(to top left, transparent 49.6%, #dcc7a4 50%) right / 50% 100% no-repeat,
    #f1e4cc;
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14%;
}
.env-front::after {
  content: ""; position: absolute; left: 50%; top: 44%; width: 44px; height: 44px; margin-left: -22px;
  background: var(--holly); border-radius: 50%; box-shadow: 0 0 0 4px #a3262c33;
}
.env-to { font-family: "Marck", cursive; font-size: clamp(26px, 3vw, 36px); color: var(--night); position: relative; z-index: 1; }
#preview-img { width: auto; max-width: 100%; max-height: calc(100vh - 340px); min-height: 300px; margin: 0 auto; border-radius: 4px; box-shadow: 0 24px 50px -22px #13233daa; }
.desk.has-letter .envelope { display: none; }
.desk.has-letter #preview-img { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { transform: translateY(60px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .desk.has-letter #preview-img { animation: none; } .envelope { transition: none; } }
.hint { color: var(--muted); font-size: 15px; text-align: center; margin: 22px auto 0; max-width: 40ch; }
.desk.has-letter .hint { display: none; }
.buy { background: var(--paper); border-radius: var(--radius); padding: 18px 20px 8px; margin-top: 16px; box-shadow: 0 1px 0 var(--line); }
.desk.writing .envelope { animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-1.5deg) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .desk.writing .envelope { animation: none; } }

/* ---------- sections */
section h2 { font-family: "Marck", cursive; font-weight: 400; font-size: 40px; color: var(--night); margin: 0 0 24px; line-height: 1.15; }
.how { padding: 96px 0 24px; }
.how ol { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.how li { counter-increment: s; border-top: 2px solid var(--night); padding-top: 14px; }
.how li::before { content: counter(s); font-family: "Marck", cursive; font-size: 34px; color: var(--holly); line-height: 1; }
.how h3 { margin: 8px 0 6px; font-size: 19px; }
.how p { margin: 0; color: var(--muted); }
.included { padding: 72px 0 24px; }
.prints { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 28px; align-items: end; }
.prints img { border-radius: 3px; box-shadow: 0 16px 34px -20px #13233d88; }
.prints figure { margin: 0; }
.prints figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }
.prints figcaption strong { color: var(--ink); display: block; }
.faq { padding: 72px 0 24px; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.foot { padding: 56px 0 48px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 72px; }
.foot a { margin-right: 16px; color: var(--muted); }

/* ---------- simple pages */
.page-body { padding: 48px 0 80px; max-width: 720px; }
.page-body h1 { font-family: "Marck", cursive; font-weight: 400; font-size: 46px; color: var(--night); margin: 0 0 16px; line-height: 1.1; }
.page-body h2 { font-size: 20px; margin: 28px 0 8px; font-family: "Lora", serif; color: var(--ink); }
.night.short { padding-bottom: 24px; }

@media (max-width: 860px) {
  .bench { grid-template-columns: 1fr; margin-top: -110px; }
  .desk { position: static; }
  .envelope { margin-top: 0; }
  #preview-img { max-height: none; min-height: 0; width: 100%; }
  .how ol, .prints { grid-template-columns: 1fr; }
  .prints figure { max-width: 420px; }
  .slip { padding: 22px; }
  .night { padding-bottom: 130px; }
}
@media (max-width: 480px) {
  .row { flex-direction: column; gap: 0; }
  .row > .age { flex: none; }
  .swatches img { width: 72px; }
}

.buy .field { margin-bottom: 10px; }
.buy .link { display: block; margin: 10px auto 4px; }
.buy .small { margin: 6px 0 10px; font-size: 13.5px; }
