/* ============================================================
   FGN — style.css
   Christmas-themed override on top of the global neobrutalist
   base. Same tokens, christmas color rotation, polished form.
   ============================================================ */

:root {
  --acc:    #C41E3A;   /* christmas red */
  --acc-2:  #2D8A4F;   /* christmas green */
  --acc-3:  #F4C430;   /* christmas gold */
}

.page-fgn {
  --bg: #14110d;
  --bg-2: #1d1812;
  --bg-3: #2a2218;
  --line: #2c2418;
  --line-2: #3a2f20;
  --fg: #f4e9d8;
  --fg-2: #c8b896;
  --muted: #8a7a5a;
}

.page-fgn .navlinks a.active { color: var(--fg); border-bottom-color: var(--acc); }
.page-fgn .brand-dot { background: var(--acc); box-shadow: 0 0 0 2px rgba(196,30,58,0.2); }

.fgn { padding: 0 28px 64px; max-width: 1200px; margin: 0 auto; }

@media (max-width: 720px) { .fgn { padding: 0 20px 48px; } }

/* ---------- FGN HERO ---------- */

.fgn-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 48px;
  padding: 64px 0 48px;
  align-items: start;
  border-top: 1px solid var(--line);
}
.hero-left { min-width: 0; }
.fgn-h1 {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--fg);
  margin: 0 0 24px 0;
}
.fgn-h1 .accent { color: var(--acc); }
.lede { max-width: 60ch; }

.fgn-meta-row {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
}
.fgn-meta-row .item {
  display: flex; flex-direction: column; gap: 2px;
  text-decoration: none; color: var(--muted);
}
.fgn-meta-row .item:hover .val { color: var(--acc); }
.fgn-meta-row .label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.fgn-meta-row .val {
  color: var(--fg); font-weight: 700;
  font-size: 18px; font-family: var(--font-disp);
  letter-spacing: 0;
}
.fgn-meta-row .val[data-skel] { color: var(--muted); font-family: var(--font-mono); font-weight: 400; }
.fgn-meta-row .item.is-live .val:not([data-skel])::after {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc-3); margin-left: 6px;
  vertical-align: middle;
}

/* hero right: gift + snow + tag */
.hero-right {
  position: relative;
  height: 280px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.gift {
  width: 120px; height: 120px;
  background: var(--acc);
  position: relative;
  box-shadow: 0 12px 0 -2px rgba(0,0,0,0.4), 0 0 40px rgba(196,30,58,0.3);
  animation: bob 3.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-12px) rotate(3deg); }
}
.gift-ribbon-v {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 14px; transform: translateX(-50%);
  background: var(--acc-3);
}
.gift-ribbon-h {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 14px; transform: translateY(-50%);
  background: var(--acc-3);
}
.gift-bow {
  position: absolute; top: -28px; left: 50%;
  transform: translateX(-50%);
  font-size: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.snow {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.snow span {
  position: absolute; top: -10px;
  width: 4px; height: 4px;
  background: var(--fg);
  border-radius: 50%;
  opacity: 0.6;
  animation: fall linear infinite;
}
.snow span:nth-child(1)  { left: 8%;  animation-duration: 8s;  animation-delay: 0s; }
.snow span:nth-child(2)  { left: 18%; animation-duration: 10s; animation-delay: 1.5s; }
.snow span:nth-child(3)  { left: 28%; animation-duration: 7s;  animation-delay: 3s; }
.snow span:nth-child(4)  { left: 38%; animation-duration: 9s;  animation-delay: 0.5s; }
.snow span:nth-child(5)  { left: 48%; animation-duration: 11s; animation-delay: 2s; }
.snow span:nth-child(6)  { left: 58%; animation-duration: 8.5s; animation-delay: 1s; }
.snow span:nth-child(7)  { left: 68%; animation-duration: 9.5s; animation-delay: 2.5s; }
.snow span:nth-child(8)  { left: 78%; animation-duration: 7.5s; animation-delay: 0.8s; }
.snow span:nth-child(9)  { left: 88%; animation-duration: 10.5s; animation-delay: 1.8s; }
.snow span:nth-child(10) { left: 13%; animation-duration: 12s; animation-delay: 4s; }
.snow span:nth-child(11) { left: 23%; animation-duration: 9s;  animation-delay: 3.5s; }
.snow span:nth-child(12) { left: 33%; animation-duration: 8s;  animation-delay: 2.2s; }
.snow span:nth-child(13) { left: 53%; animation-duration: 11.5s; animation-delay: 1.2s; }
.snow span:nth-child(14) { left: 73%; animation-duration: 7.8s; animation-delay: 2.8s; }
.snow span:nth-child(15) { left: 93%; animation-duration: 10.2s; animation-delay: 0.3s; }
@keyframes fall {
  0%   { transform: translateY(0) translateX(0); opacity: 0.7; }
  50%  { transform: translateY(140px) translateX(8px); opacity: 0.5; }
  100% { transform: translateY(280px) translateX(-8px); opacity: 0; }
}

.hero-tag {
  position: absolute; top: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--acc-3);
  letter-spacing: 0.1em; text-transform: uppercase;
  text-align: right;
}

@media (max-width: 900px) {
  .fgn-hero { grid-template-columns: 1fr; gap: 24px; padding: 48px 0 32px; }
  .hero-right { height: 200px; }
}

/* ---------- PROGRESS ---------- */

.fgn-progress-wrap {
  position: sticky; top: 52px; z-index: 30;
  background: var(--bg);
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 32px 0;
}
@media (max-width: 720px) {
  .fgn-progress-wrap { top: 102px; }
}
.fgn-progress {
  height: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.fgn-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--acc) 0%, var(--acc-2) 50%, var(--acc-3) 100%);
  transition: width 0.3s ease;
  position: relative;
}
.fgn-progress-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shine 2s linear infinite;
}
@keyframes shine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.fgn-progress-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.fgn-progress-meta .sep { color: var(--line-2); }
.fgn-progress-meta span:not(.sep) { padding: 2px 0; }
#progress-state { color: var(--acc-3); }
#progress-pct { color: var(--fg); font-weight: 700; }

/* ---------- FORM ---------- */

.fgn-form { display: block; }

.fgn-name {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--acc-3);
  padding: 18px 20px;
  margin: 0 0 20px 0;
  display: grid; gap: 8px;
}
.fgn-name legend {
  display: flex; align-items: center; gap: 12px;
  padding: 0;
  margin: 0;
}
.q-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--fg);
  color: var(--bg);
  padding: 3px 8px;
  letter-spacing: 0.1em;
}
.q-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.q-q {
  display: block;
  font-family: var(--font-disp); font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-transform: lowercase;
}
.q-q .opt { color: var(--muted); font-weight: 700; text-transform: lowercase; }
.q-q em { color: var(--acc-3); font-style: normal; }

.fgn-qs {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.q {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 18px 20px 18px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.q::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--line-2);
  transition: background 0.15s;
}
.q.is-answered {
  border-color: var(--acc-2);
  background: var(--bg-3);
}
.q.is-answered::before { background: var(--acc-2); }
.q.is-answered .q-num { background: var(--acc-2); color: var(--bg); }
.q .q-num { align-self: start; }

.q textarea {
  width: 100%;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.1s;
}
.q textarea:focus { outline: none; border-color: var(--acc-3); }
.q textarea::placeholder { color: var(--muted); }

.q-opts {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.opt {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--fg-2);
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.opt input[type="radio"] {
  appearance: none; -webkit-appearance: none;
  width: 12px; height: 12px;
  border: 1.5px solid var(--muted);
  background: transparent;
  position: relative;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s;
}
.opt input[type="radio"]:checked {
  background: var(--acc-3);
  border-color: var(--acc-3);
  box-shadow: inset 0 0 0 2px var(--bg);
}
.opt:has(input:checked) {
  background: var(--acc-3);
  color: var(--bg);
  border-color: var(--acc-3);
}
.opt:has(input:checked) input[type="radio"] { border-color: var(--bg); }
.opt:hover:not(:has(input:checked)) { background: var(--bg-3); border-color: var(--fg-2); }

/* ---------- ACTIONS ---------- */

.fgn-actions {
  margin: 32px 0 0 0;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 32px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
}
.fgn-actions::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--acc) 0%, var(--acc-2) 50%, var(--acc-3) 100%);
}
.fgn-actions .btn { min-width: 200px; justify-content: center; }
.fgn-legal {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 60ch;
  line-height: 1.6;
  margin: 0;
}
.fgn-legal strong { color: var(--fg); }

.fgn-result {
  margin: 32px 0 0 0;
  padding: 40px 32px;
  border: 1px solid var(--acc-2);
  background: var(--bg-2);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fgn-result::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--acc-2);
}
.result-mark {
  width: 64px; height: 64px;
  background: var(--acc-2);
  color: var(--bg);
  display: grid; place-items: center;
  font-size: 32px; font-weight: 800;
  font-family: var(--font-disp);
  margin: 0 auto 16px auto;
  animation: pop 0.5s ease;
}
@keyframes pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
.fgn-result h2 {
  font-family: var(--font-disp); font-weight: 800;
  font-size: 32px;
  margin: 0 0 12px 0;
  text-transform: lowercase;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.fgn-result p { color: var(--fg-2); margin: 0 0 24px 0; font-size: 15px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 600px) {
  .q { padding: 16px 14px; }
  .q-q { font-size: 16px; }
  .opt { font-size: 12px; padding: 5px 10px; }
  .fgn-actions { padding: 24px 20px; }
}
