/* 24 Doors — shared styles */
:root {
  --bg: #060a14;
  --bg-2: #0b1224;
  --ink: #f4efe6;
  --muted: #a7aec0;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.045);
  --gold: #ecbe78;
  --gold-2: #c78f3f;
  --red: #d26868;
  --mint: #93d4c3;
  --radius: 20px;
  --shadow: 0 30px 70px -35px rgba(0, 0, 0, 0.95);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(236, 190, 120, 0.16), transparent 62%),
    radial-gradient(760px 520px at 8% 4%, rgba(147, 212, 195, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, #070c18 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { width: min(100% - 40px, var(--max)); margin: 0 auto; }
@media (max-width: 560px) { .wrap { width: min(100% - 28px, var(--max)); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(6, 10, 20, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 66px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-family: var(--serif); font-size: 19px; letter-spacing: 0.01em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(160deg, #e8a85e, #a4522a);
  color: #fff8ec; font-size: 15px; font-family: var(--serif);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 6px 16px -8px rgba(232,168,94,.8);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14.5px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: 7px 11px; font-size: 16px; cursor: pointer;
}
@media (max-width: 760px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex; position: absolute; left: 0; right: 0; top: 66px;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 14px 20px 18px; background: rgba(8, 13, 26, 0.98);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open a { padding: 7px 0; font-size: 15px; }
  .nav.is-open .lang-switch { align-self: flex-start; margin: 6px 0 2px; }
  .nav.is-open .lang-switch a { padding: 4px 8px; font-size: 12px; }
  .nav-toggle { display: block; }
}

/* language switcher */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border: 1px solid var(--line); border-radius: 999px;
}
.lang-switch a {
  font-size: 11.5px !important; letter-spacing: .06em;
  padding: 4px 8px; border-radius: 999px; color: var(--muted);
}
.lang-switch a:hover { color: var(--ink); text-decoration: none; }
.lang-switch a[aria-current="true"] {
  color: #2a1a08; background: linear-gradient(160deg, #f1cd94, #d19a4c);
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 30px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); opacity: .7; }
.hero h1 { font-size: clamp(38px, 6.2vw, 62px); }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero .lede { margin-top: 20px; font-size: 17.5px; color: #cdd3e2; max-width: 44ch; }
.trust-line { margin-top: 16px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ---------- forms / buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 22px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  background: linear-gradient(160deg, #f1cd94, #d19a4c);
  color: #2a1a08;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 12px 26px -16px rgba(236,190,120,.85);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.05); }
.btn-quiet { background: transparent; color: var(--muted); border: 0; box-shadow: none; font-weight: 500; padding: 10px 8px; }
.btn-quiet:hover { color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; border-radius: 10px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
input[type="text"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--ink); font-family: var(--sans); font-size: 15.5px;
}
input[type="text"]::placeholder, textarea::placeholder { color: #6f778c; }
input[type="text"]:focus, textarea:focus, select:focus {
  outline: none; border-color: rgba(236,190,120,.65);
  box-shadow: 0 0 0 3px rgba(236,190,120,.14);
}
textarea { resize: vertical; min-height: 84px; }
.msg { font-size: 13px; color: var(--red); min-height: 18px; margin: 2px 0 10px; }
.msg.ok { color: var(--mint); }
.hint { font-size: 12.5px; color: var(--muted); }

/* ---------- create card ---------- */
.create-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.create-card h2 { font-size: 21px; margin-bottom: 4px; }
.create-card .sub { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.style-opt { position: relative; cursor: pointer; }
.style-opt input { position: absolute; opacity: 0; pointer-events: none; }
.style-opt .swatch {
  display: block; border-radius: 12px; padding: 10px 8px 9px; text-align: center;
  border: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
  transition: border-color .15s ease, transform .15s ease;
}
.style-opt .swatch i { display: block; height: 26px; border-radius: 7px; margin-bottom: 7px; }
.style-opt input:checked + .swatch { border-color: var(--gold); color: var(--ink); transform: translateY(-1px); }
.style-opt input:focus-visible + .swatch { box-shadow: 0 0 0 3px rgba(236,190,120,.2); }
.sw-gingerbread { background: linear-gradient(160deg, #d8834a, #8f3f14); }
.sw-snow { background: linear-gradient(160deg, #eaf4fb, #9dbfda); }
.sw-candy { background: linear-gradient(130deg, #ff8fa5 0 30%, #fff 30% 50%, #e0536f 50% 80%, #fff 80%); }

/* ---------- door grid ---------- */
.cal { border-radius: var(--radius); }
.door-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
@media (max-width: 620px) { .door-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; } }
.door {
  position: relative; aspect-ratio: 1 / 1; border: 0; border-radius: 12px;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  font-family: var(--serif); font-size: clamp(15px, 2.4vw, 21px); font-weight: 600;
  color: #fff8ee; overflow: hidden;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), 0 10px 20px -16px #000;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.door:hover { transform: translateY(-2px); filter: brightness(1.05); }
.door:active { transform: translateY(0); }
.door .num { position: relative; z-index: 2; }
.door .mark { position: absolute; right: 6px; top: 5px; z-index: 2; font-size: 10px; opacity: .9; }
.door.is-filled::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255, 236, 196, .75);
}
.door.is-filled { box-shadow: inset 0 -4px 0 rgba(0,0,0,.22), 0 0 22px -6px rgba(236,190,120,.55); }
.door.is-locked { cursor: default; filter: saturate(.7) brightness(.82); }
.door.is-locked:hover { transform: none; }
.door.is-open::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 245, 220, .34), transparent 62%);
}
.door .spark { position: absolute; inset: 0; z-index: 1; opacity: 0; }
.door.is-filled .spark { opacity: 1; animation: glow 3.4s ease-in-out infinite; }
@keyframes glow { 0%,100% { opacity: .12; } 50% { opacity: .5; } }

/* style palettes */
.cal[data-style="gingerbread"] .door { background: linear-gradient(160deg, #d8834a, #8f3f14); border: 1px solid #6b2e0d; }
.cal[data-style="snow"] .door { background: linear-gradient(160deg, #eaf4fb, #9dbfda); border: 1px solid #7fa3c2; color: #12354f; }
.cal[data-style="candy"] .door { background: linear-gradient(160deg, #ff93a8, #d8476a); border: 1px solid #b0304e; }

/* ---------- preview ---------- */
.preview-card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: 24px; padding: 20px;
  box-shadow: var(--shadow); transform: rotate(-1deg);
}
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.preview-title { font-family: var(--serif); font-size: 17px; }
.preview-code { font-family: var(--sans); font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.preview-card .door { animation: doorIn .5s both; }
@keyframes doorIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- sections ---------- */
section { padding: 54px 0; }
.section-head { max-width: 62ch; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(27px, 4vw, 38px); }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 16px; }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 18px; background: var(--panel);
}
.step .n {
  font-family: var(--serif); font-size: 13px; color: var(--gold);
  display: inline-block; margin-bottom: 12px; letter-spacing: .1em;
}
.step h3 { font-size: 17.5px; margin-bottom: 7px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 30px; }
@media (max-width: 720px) { .feature-grid { grid-template-columns: 1fr; } }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14.5px; margin: 0; }
.feature { padding-top: 16px; border-top: 1px solid var(--line); }
.feature .ico { color: var(--gold); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-list summary {
  cursor: pointer; font-family: var(--serif); font-size: 17.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--gold); font-family: var(--sans); font-size: 18px; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; max-width: 70ch; }

.cta-band {
  border: 1px solid var(--line); border-radius: 24px; padding: 40px 28px; text-align: center;
  background:
    radial-gradient(600px 220px at 50% 0%, rgba(236,190,120,.14), transparent 70%),
    rgba(255,255,255,.03);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 36px); }
.cta-band p { color: var(--muted); margin: 12px auto 22px; max-width: 46ch; }

/* ---------- article pages ---------- */
.page-head { padding: 54px 0 18px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); }
.page-head p.lede { color: var(--muted); font-size: 17px; margin-top: 14px; max-width: 60ch; }
.prose { max-width: 72ch; padding-bottom: 40px; }
.prose h2 { font-size: 28px; margin: 38px 0 12px; }
.prose h3 { font-size: 20px; margin: 26px 0 8px; }
.prose p, .prose li { color: #c8cede; font-size: 16.5px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.1em; }
.prose li { margin-bottom: 7px; }
.prose blockquote {
  margin: 20px 0; padding: 14px 18px; border-left: 2px solid var(--gold);
  background: rgba(255,255,255,.035); border-radius: 0 12px 12px 0; color: #dfe4ef;
}
.prose code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.card-note {
  border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  background: var(--panel); margin: 22px 0;
}
.card-note h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.toc { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 26px 0; background: var(--panel); }
.toc h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 5px; font-size: 14.5px; }
.idea-group { margin-bottom: 34px; }
.idea-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; list-style: none; padding: 0; }
@media (max-width: 700px) { .idea-list { grid-template-columns: 1fr; } }
.idea-list li {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 14.5px; color: #cfd5e3; background: rgba(255,255,255,.03);
}

/* ---------- calendar page ---------- */
.cal-shell { padding: 34px 0 60px; }
.cal-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.cal-title { font-size: clamp(28px, 5vw, 42px); }
.cal-meta { color: var(--muted); font-size: 13.5px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.code-chip {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px;
  letter-spacing: .16em; border: 1px solid var(--line); padding: 3px 9px; border-radius: 7px;
  color: var(--gold); background: rgba(236,190,120,.06);
}
.cal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-panel { border: 1px solid var(--line); border-radius: 22px; padding: 20px; background: rgba(255,255,255,.035); box-shadow: var(--shadow); }
.progress { height: 5px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; margin: 4px 0 18px; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e8a85e, #f6d9a6); transition: width .4s ease; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot.filled { background: #e9c08a; box-shadow: 0 0 10px rgba(236,190,120,.7); }
.dot.empty { background: rgba(255,255,255,.18); }
.dot.locked { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }

.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(3, 6, 13, 0.72); backdrop-filter: blur(6px);
}
.overlay.is-open { display: flex; }
.sheet {
  width: min(100%, 520px); max-height: min(90vh, 760px); overflow: auto;
  background: linear-gradient(180deg, #121a2e, #0b1120);
  border: 1px solid var(--line); border-radius: 22px; padding: 24px;
  box-shadow: var(--shadow); animation: sheetIn .2s ease;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sheet-head h3 { font-size: 23px; }
.sheet-head .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.x {
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink);
  width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1;
  flex: 0 0 auto;
}
.x:hover { background: rgba(255,255,255,.1); }
.sticker-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 4px 0 14px; }
@media (max-width: 440px) { .sticker-row { grid-template-columns: repeat(4, 1fr); } }
.sticker {
  border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 11px;
  padding: 8px 0; font-size: 20px; line-height: 1; cursor: pointer; transition: .15s ease;
}
.sticker:hover { background: rgba(255,255,255,.08); }
.sticker[aria-pressed="true"] { border-color: var(--gold); background: rgba(236,190,120,.14); transform: translateY(-1px); }
.note-preview {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  background: linear-gradient(170deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  margin-bottom: 16px;
}
.note-preview .from { font-size: 12.5px; color: var(--gold); letter-spacing: .04em; margin-bottom: 6px; }
.note-preview .text { font-family: var(--serif); font-size: 19px; line-height: 1.45; color: #fbf6ec; white-space: pre-wrap; }
.note-preview .stk { font-size: 22px; margin-bottom: 8px; }
.code-box {
  width: 100%; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px; line-height: 1.6; word-break: break-all;
  background: rgba(0,0,0,.32); border: 1px solid var(--line); color: #d7dde9;
  border-radius: 12px; padding: 12px; resize: none; min-height: 96px;
}
.lock-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.lock-note .ic { font-size: 18px; line-height: 1.3; }
.link-list { display: flex; flex-direction: column; gap: 8px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: #f2e6d2; color: #22160a; font-size: 13.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 99px; z-index: 120;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 18px 40px -18px #000;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #c3cad9; font-size: 14px; }
.footer-note { color: #7f879b; font-size: 12.5px; margin-top: 22px; max-width: 70ch; }
.footer-brand p { color: var(--muted); font-size: 14px; max-width: 34ch; margin-top: 12px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* utilities */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 14px; }
.mt-4 { margin-top: 26px; }
.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;
}
