/* Vale por. Shape rule: buttons pill, inputs 12px, cards and panels 20px. One accent: raspberry. */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("/fonts/dancing-script-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/playfair-display-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Bebas Neue"; src: url("/fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --f-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --bg: #f4f3f6; --surface: #fdfcfe; --surface-2: #eae8ef; --field: #ffffff;
  --ink: #17151c; --muted: #5a5566; --line: #dcd9e2; --line-strong: #b5b0bf;
  --accent: #c2255c; --accent-hover: #a51e4e; --accent-ink: #fff6f9; --accent-text: #b0214f;
  --danger: #b42318; --r-s: 12px; --r-m: 20px; --r-btn: 999px;
  --shadow: 0 30px 60px -30px rgb(60 20 45 / .38), 0 2px 6px rgb(60 20 45 / .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110f15; --surface: #1a171f; --surface-2: #151219; --field: #141118;
    --ink: #efebf3; --muted: #a59fb0; --line: #29242f; --line-strong: #3d3646;
    --accent: #ff6b9a; --accent-hover: #ff8bb0; --accent-ink: #26050f; --accent-text: #ff86ab;
    --danger: #f97066; --shadow: 0 30px 60px -26px rgb(0 0 0 / .75);
  }
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; }
.lg-bg { fill: var(--accent); } .lg-fg { fill: var(--accent-ink); }
.btn-xl { min-height: 58px; padding: 0 30px; font-size: 1.1rem; }
.btn.is-busy { opacity: .7; cursor: progress; }
textarea { width: 100%; padding: 12px 14px; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r-s); resize: vertical; min-height: 84px; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ------------------------------------------------------------------ home hero */
.hero { padding-block: 40px 0; overflow: hidden; }
@media (min-width: 1024px) { .hero { padding-block: 64px 0; } }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 5fr 6fr; gap: 56px; } }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); line-height: 1; letter-spacing: -0.045em; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero-lead { color: var(--muted); font-size: 1.15rem; max-width: 42ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* fanned stack of real rendered cards */
.fan { position: relative; aspect-ratio: 5 / 4; }
.fan canvas { position: absolute; width: 74%; height: auto; border-radius: 6px; box-shadow: var(--shadow); transform-origin: 50% 120%; }
.fan canvas:nth-child(1) { left: 2%; top: 8%; --r: -9deg; }
.fan canvas:nth-child(2) { left: 22%; top: 30%; --r: 4deg; }
.fan canvas.fan-wand { width: 30%; left: 66%; top: 2%; --r: 10deg; }
@media (prefers-reduced-motion: no-preference) {
  .js .fan canvas { animation: deal .9s cubic-bezier(.16,1,.3,1) both; }
  .js .fan canvas:nth-child(2) { animation-delay: .12s; } .js .fan canvas:nth-child(3) { animation-delay: .24s; }
  @keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(0deg); } to { opacity: 1; transform: rotate(var(--r)); } }
}
.fan canvas { transform: rotate(var(--r)); }

/* ------------------------------------------------------------------ gallery */
.sec { padding-block: 88px 0; }
.sec h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); max-width: 22ch; }
.sec-lead { color: var(--muted); max-width: 60ch; margin-bottom: 30px; }
.gallery { display: grid; gap: 18px; }
@media (min-width: 900px) { .gallery { grid-template-columns: 1.15fr 1fr 0.8fr; } }
.tcard { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: transform .35s cubic-bezier(.16,1,.3,1), border-color .3s; }
.tcard:hover { transform: translateY(-4px); border-color: var(--accent); }
.tcard .thumb { display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; padding: 18px; min-height: 220px; }
.tcard canvas { max-width: 100%; max-height: 220px; height: auto; border-radius: 4px; box-shadow: 0 12px 30px -14px rgb(0 0 0 / .45); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.tcard:hover canvas { transform: rotate(-2deg) scale(1.03); }
.tcard h3 { font-size: 1.3rem; margin: 0; display: flex; justify-content: space-between; align-items: center; }
.tcard h3 .i { color: var(--accent-text); }
.tcard p { margin: 0; color: var(--muted); }

/* how it works: horizontal steps with numbers drawn as sheet thumbnails */
.how { display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 820px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how article { padding: 24px; border-top: 3px solid var(--accent); background: var(--surface); border-radius: 0 0 var(--r-m) var(--r-m); }
.how h3 { font-size: 1.2rem; }
.how p { color: var(--muted); margin: 0; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .3s cubic-bezier(.16,1,.3,1); flex: none; }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* ------------------------------------------------------------------ editor */
.ed-head { padding-block: 36px 24px; }
.ed-head > * { max-width: 760px; }
.ed-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.02; letter-spacing: -0.04em; margin-bottom: .3em; }
.ed-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.ed-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1024px) { .ed-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; } }
.ed-form { display: grid; gap: 18px; }
.ed-fields { display: grid; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer; font-weight: 600; font-size: .92rem; transition: background .2s, color .2s, border-color .2s; }
.chips input:checked + label { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chips input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-3 { grid-auto-columns: minmax(0, 1fr); width: 100%; }
.seg-3 label { white-space: normal; text-align: center; line-height: 1.15; padding: 6px 8px; }
.ed-wand { display: grid; gap: 10px; }
.ed-more { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 16px; }
.ed-more[open] { padding-bottom: 4px; }
.ed-more summary { cursor: pointer; font-weight: 650; display: flex; align-items: center; gap: 8px; list-style: none; min-height: 32px; }
.ed-more summary::-webkit-details-marker { display: none; }
.ed-more summary .i { transition: transform .3s cubic-bezier(.16,1,.3,1); }
.ed-more[open] summary .i { transform: rotate(180deg); }
.ed-more > .field, .ed-more > .btn, .ed-more > .check { margin-top: 14px; }

.ed-out { display: grid; gap: 22px; }
@media (min-width: 1024px) { .ed-out { position: sticky; top: 84px; } }
.pv { display: grid; justify-items: center; gap: 14px; padding: clamp(18px, 4vw, 40px); border-radius: var(--r-m); border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%), var(--surface); }
.pv-stage { width: 100%; perspective: 1600px; display: grid; place-items: center; }
.pv-flip { position: relative; width: 100%; max-width: 620px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.pv-flip.is-portrait { max-width: 300px; }
.pv-flip.is-flipped { transform: rotateY(180deg); }
.pv-face { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 4px; backface-visibility: hidden; box-shadow: var(--shadow); }
.pv-back { transform: rotateY(180deg); }
.ed-cta { display: grid; gap: 6px; justify-items: start; }
.ed-cta .help { margin: 0; }
.sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sheets figure { margin: 0; display: grid; gap: 8px; }
.sheets figcaption { font-size: .85rem; color: var(--muted); }
.sheet { width: 100%; height: auto; aspect-ratio: 210 / 297; border-radius: 6px; border: 1px solid var(--line); background: #fff; box-shadow: 0 10px 30px -18px rgb(0 0 0 / .4); }

/* ------------------------------------------------------------------ article */
.article { padding-block: 48px 0; }
.article-head { max-width: 780px; margin-bottom: 36px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -0.045em; }
.article-head p { color: var(--muted); font-size: 1.12rem; }
.callout { border-left: 3px solid var(--accent); padding: 14px 18px; background: var(--surface); border-radius: 0 12px 12px 0; margin: 1.5em 0; }
.settings { display: grid; gap: 12px; margin: 0 0 1.5em; }
@media (min-width: 720px) { .settings { grid-template-columns: repeat(3, 1fr); } }
.settings div { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.settings strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.settings span { color: var(--muted); font-size: .93rem; }

/* photo picker and secret santa panel */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ed-photo, .ed-draw { display: grid; gap: 10px; }
.photo-drop { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-s); cursor: pointer; font-weight: 600; color: var(--ink); transition: border-color .2s, background .2s; }
.photo-drop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
#ed-photo-file:focus-visible + .photo-ctl, .photo-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-ctl { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: .92rem; }
.pv-face.is-draggable { cursor: grab; touch-action: none; }
.pv-face.is-draggable:active { cursor: grabbing; }

.gallery-4 { display: grid; gap: 16px; }
@media (min-width: 720px) { .gallery-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .gallery-4 { grid-template-columns: repeat(4, 1fr); } }
.xmas-strip { display: grid; gap: 18px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-m); color: #fbf6ea;
  background: radial-gradient(circle at 85% 20%, rgb(233 196 106 / .25), transparent 40%), linear-gradient(135deg, #173f2f, #0f2c21); }
@media (min-width: 820px) { .xmas-strip { grid-template-columns: 1fr auto; } }
.xmas-strip h2 { color: #fbf6ea; margin-bottom: .2em; }
.xmas-strip p { margin: 0; color: #d8e6dc; }
.xmas-strip .btn-solid { background: #e9c46a; color: #1a1500; }
.xmas-strip .btn-solid:hover { background: #f2d488; }
