/* ============================================================
   WhizInvite — POC demo shared styles
   Ivory / gold / ink editorial system · Cormorant + Figtree
   ============================================================ */

:root {
  --ivory: #FAF7F0;
  --parchment: #F2EDE3;
  --ink: #1A1A2E;
  --ink-soft: #5A5A6E;
  --gold: #B08D4F;
  --gold-bright: #D4AF6A;
  --blush: #E8D5C4;
  --error: #A3423C;
  --success: #4F7A5C;
  --accent: var(--gold);

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", -apple-system, "Segoe UI", sans-serif;

  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 1px 2px rgba(26,26,46,.05), 0 12px 32px rgba(26,26,46,.08);
  --shadow-float: 0 2px 4px rgba(26,26,46,.06), 0 24px 56px rgba(26,26,46,.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ivory); }

/* ---------- type utilities ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.muted { color: var(--ink-soft); }

/* ---------- layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,240,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(176,141,79,.18);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600; color: var(--ink);
  text-decoration: none; letter-spacing: .01em;
}
.wordmark span { color: var(--gold); }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14px;
  letter-spacing: .04em; transition: color .3s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 16px 32px; min-height: 48px;
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; text-decoration: none;
  position: relative; overflow: hidden;
  transition: background .4s var(--ease-luxury), color .4s, border-color .4s, box-shadow .4s;
}
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary::after {
  content: ""; position: absolute; left: 32px; right: 32px; bottom: 10px;
  height: 1px; background: var(--gold-bright);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease-luxury);
}
.btn-primary:hover::after { transform: scaleX(1); }
.btn-primary:hover { box-shadow: var(--shadow-card); }
.btn-secondary { background: transparent; color: var(--ink); border-color: rgba(26,26,46,.35); }
.btn-secondary:hover { border-color: var(--ink); }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

/* ---------- form primitives (editorial: hairline underline) ---------- */
.field { margin-bottom: 28px; }
.field label {
  display: block; font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft); font-weight: 600;
  margin-bottom: 8px;
}
.field input[type="text"], .field input[type="date"], .field textarea, .field select {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid rgba(26,26,46,.25);
  font-family: var(--font-sans); font-size: 17px; color: var(--ink);
  padding: 8px 2px 10px; border-radius: 0;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 0 var(--gold);
}
.field textarea { resize: vertical; min-height: 64px; }
.field .counter {
  font-size: 11px; color: var(--ink-soft); text-align: right; margin-top: 4px;
  letter-spacing: .04em;
}

/* ---------- the invitation (signature component) ---------- */
.inv {
  position: relative;
  background: var(--ivory);
  aspect-ratio: 9 / 14;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  container-type: inline-size;
}
.inv--emerald { --accent: #4F7A5C; }
.inv--champagne { --accent: #C9A96A; }

.inv .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.inv .frame rect { fill: none; stroke: var(--accent); vector-effect: non-scaling-stroke; }
.inv .frame .outer { stroke-width: 1.2; }
.inv .frame .inner { stroke-width: .6; }

.inv-body { text-align: center; padding: 12cqw 10cqw; width: 100%; }
.inv .inv-eyebrow {
  font-family: var(--font-sans); font-size: 2.6cqw; letter-spacing: .34em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  margin-bottom: 5cqw;
}
.inv .name {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 11.5cqw; line-height: 1.15; color: var(--ink);
}
.inv .amp {
  font-family: var(--font-display); font-style: italic;
  font-size: 7cqw; color: var(--accent); line-height: 1.6;
}
.inv .rule {
  width: 12cqw; height: 1px; background: var(--accent);
  margin: 5cqw auto;
}
.inv .inv-date {
  font-family: var(--font-sans); font-size: 3.2cqw; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink); font-weight: 600;
  margin-bottom: 2.2cqw;
}
.inv .inv-venue {
  font-family: var(--font-sans); font-size: 2.7cqw; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 5cqw;
}
.inv .inv-msg {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 4cqw; color: var(--ink-soft); line-height: 1.5;
  max-width: 70cqw; margin: 0 auto;
}

/* --- choreography: frame draws → content rises --- */
.inv .frame .outer { stroke-dasharray: 400; stroke-dashoffset: 400; }
.inv .frame .inner { stroke-dasharray: 400; stroke-dashoffset: -400; }
.inv .reveal { opacity: 0; transform: translateY(18px); }

.inv.play .frame .outer { animation: draw 1.2s var(--ease-luxury) .1s forwards; }
.inv.play .frame .inner { animation: draw 1.2s var(--ease-luxury) .35s forwards; }
.inv.play .reveal { animation: rise .9s var(--ease-luxury) forwards; }
.inv.play .reveal:nth-child(1) { animation-delay: .9s; }
.inv.play .reveal:nth-child(2) { animation-delay: 1.05s; }
.inv.play .reveal:nth-child(3) { animation-delay: 1.15s; }
.inv.play .reveal:nth-child(4) { animation-delay: 1.25s; }
.inv.play .reveal:nth-child(5) { animation-delay: 1.45s; }
.inv.play .reveal:nth-child(6) { animation-delay: 1.55s; }
.inv.play .reveal:nth-child(7) { animation-delay: 1.7s; }
.inv.play .reveal:nth-child(8) { animation-delay: 1.85s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* device frame around previews */
.device {
  border-radius: 22px; padding: 10px; background: var(--ink);
  box-shadow: var(--shadow-float);
}
.device .inv { border-radius: 14px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid rgba(176,141,79,.25);
  margin-top: 96px; padding: 40px 0 32px;
  font-size: 13px; color: var(--ink-soft);
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* ---------- demo nav pill ---------- */
.demo-pill {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  background: var(--ink); color: var(--ivory);
  border-radius: 999px; padding: 10px 18px;
  display: flex; gap: 16px; align-items: center;
  font-size: 12px; letter-spacing: .06em;
  box-shadow: var(--shadow-float);
}
.demo-pill span { color: var(--gold-bright); letter-spacing: .18em; text-transform: uppercase; font-size: 10px; font-weight: 700; }
.demo-pill a { color: var(--ivory); text-decoration: none; opacity: .75; transition: opacity .3s; }
.demo-pill a:hover, .demo-pill a[aria-current="page"] { opacity: 1; }

/* ---------- shared animations ---------- */
.fade-rise { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease-luxury), transform .7s var(--ease-luxury); }
.fade-rise.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .inv .frame .outer, .inv .frame .inner { stroke-dashoffset: 0 !important; animation: none !important; }
  .inv .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
  .fade-rise { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav .hide-mobile { display: none; }
  .site-footer .container { flex-direction: column; }
}
