/* LBG 2026 Org Link + QR Tool — brand per Figma named styles (see spec addendum) */

:root {
  --red: #F04923;
  --yellow: #FFC800;
  --white: #FFFFFF;
  --black: #000000;
  --red-deep: #D63A17;   /* derived shade for pressed states / subtle depth on red */
  --shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  background: var(--red);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* ---------- Header ---------- */

.site-header {
  text-align: center;
  padding: 16px 0 8px;
}

.heart-logo {
  display: block;
  width: 170px;
  height: auto;
  margin: 0 auto 14px;
}

.eyebrow {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}

h1 {
  font-weight: 800;
  font-size: clamp(30px, 7vw, 42px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 10px 0 12px;
}

.lede {
  font-size: 17px;
  font-weight: 600; /* white on red: keep it bold and >=17px for contrast */
  max-width: 46ch;
  margin: 0 auto 28px;
}

/* ---------- Hero video affordance + modal ---------- */

.watch-link {
  background: none;
  border: 0;
  font-family: inherit;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 22px;
}

.watch-link[hidden] { display: none; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal[hidden] { display: none; }

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.video-modal-box {
  position: relative;
  background: var(--black);
  border-radius: 8px;
  width: min(920px, 94vw);
}

.video-modal-box video {
  display: block;
  width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.video-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 1;
}

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  color: var(--black);
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Org combobox ---------- */

.combo { position: relative; }

.combo input {
  width: 100%;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  padding: 14px 44px 14px 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  outline: none;
}

.combo input:focus { border-color: var(--red); }

.combo .combo-clear {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 36px;
  border: 0;
  background: none;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  display: none;
}

.combo.has-value .combo-clear { display: block; }

.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  box-shadow: var(--shadow);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}

.combo-list.open { display: block; }

.combo-list [role="option"] {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}

.combo-list [role="option"]:hover,
.combo-list [role="option"][aria-selected="true"],
.combo-list [role="option"].active {
  background: var(--yellow);
}

.combo-empty {
  padding: 12px 14px;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.55);
}

/* ---------- Placement tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

.tile {
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px 12px;
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: 4px;
  cursor: pointer;
  color: var(--black);
  min-height: 96px;
  justify-content: center;
  transition: transform 0.08s ease;
}

.tile:active { transform: scale(0.97); }

.tile svg { width: 30px; height: 30px; display: block; }
.tile svg * { stroke: var(--red); }

.tile span {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}

.tile[aria-pressed="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: var(--shadow);
}

.tile[aria-pressed="true"] svg * { stroke: var(--black); }

/* ---------- Buttons ---------- */

.btn {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 16px 24px;
  border: 0;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--black);
  box-shadow: var(--shadow);
  cursor: pointer;
  width: 100%;
  transition: transform 0.08s ease;
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* The primary CTA gets breathing room from whatever follows it */
#generate-btn { margin: 4px 0 40px; }

.btn-secondary {
  background: var(--white);
  color: var(--red);
  border: 2px solid var(--red);
  box-shadow: none;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

@media (min-width: 480px) {
  .btn-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- Result card ---------- */

#result-card { display: none; }
#result-card.visible { display: block; }

.confirm-line {
  font-weight: 800;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--black);
}

.link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.link-row input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 12px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  color: rgba(0, 0, 0, 0.8);
  background: #FAFAFA;
}

.link-row .btn { width: auto; padding: 12px 18px; flex-shrink: 0; }

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}

.qr-wrap canvas {
  width: 240px;
  height: 240px;
  border-radius: 8px;
}

.comeback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
}

.comeback code {
  font-size: 12.5px;
  background: rgba(240, 73, 35, 0.08);
  color: var(--red-deep);
  padding: 2px 5px;
  border-radius: 3px;
  word-break: break-all;
}

/* ---------- Shimmer accents (in-palette gloss, no new hues) ---------- */

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

/* Gloss band sweeps the CTA only while it's actually pressable */
.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 45%;
  background: linear-gradient(105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  pointer-events: none;
  animation: shimmer-sweep 3.4s ease-in-out 0.8s infinite;
}

.btn-shimmer:disabled::after { display: none; }

@keyframes shimmer-sweep {
  0% { left: -80%; }
  32% { left: 130%; }
  100% { left: 130%; }
}

.qr-frame {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
}

.qr-frame .qr-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.qr-frame .qr-shine::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -65%;
  width: 45%;
  background: linear-gradient(105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
}

/* One pass, timed to land just as the last QR modules pop in */
.qr-frame.shine .qr-shine::after {
  animation: qr-shine 850ms ease-out 450ms 1 both;
}

@keyframes qr-shine {
  from { left: -65%; }
  to { left: 135%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-shimmer::after,
  .qr-frame.shine .qr-shine::after { animation: none; display: none; }
}

/* ---------- FAQ (supporting content — sits a clear step below the action zone) ---------- */

.faq-card {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  padding: 20px 20px 10px;
}

.faq-card h2 {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.faq-item:last-child { border-bottom: 0; }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  color: rgba(0, 0, 0, 0.85);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  color: rgba(240, 73, 35, 0.75);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item[open] summary { font-weight: 700; color: var(--black); }

.faq-item p {
  padding: 0 24px 15px 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.55;
}

.faq-more-toggle {
  background: none;
  border: 0;
  font-family: inherit;
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--red-deep);
  cursor: pointer;
}

#faq-more:not([hidden]) + .faq-more-toggle { display: none; }

.faq-item a {
  color: var(--red-deep);
  font-weight: 700;
}

/* ---------- Results page ---------- */

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.results-table th {
  text-align: left;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 8px;
  border-bottom: 2px solid var(--red);
}

.results-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.results-table td.num, .results-table th.num { text-align: right; }

.results-table tr.total td {
  font-weight: 800;
  border-bottom: 0;
  border-top: 2px solid var(--black);
}

.mock-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.disclaimer {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 16px;
  line-height: 1.5;
}

.field-label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

input[type="password"] {
  width: 100%;
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  padding: 14px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  outline: none;
  margin-bottom: 12px;
}

input[type="password"]:focus { border-color: var(--red); }

.form-error {
  color: var(--red-deep);
  font-weight: 700;
  font-size: 14px;
  margin: 4px 0 10px;
  display: none;
}

.form-error.visible { display: block; }

.updated-at {
  font-size: 12.5px;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 20px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.site-footer a { color: var(--white); }

.site-footer .wordmark {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.site-footer .wordmark .gives { color: var(--yellow); }

.site-footer .powered {
  opacity: 0.85;
  font-weight: 600;
}

.site-footer .hashtag {
  margin-top: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* ---------- Confetti overlay ---------- */

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
