/* EXPOWEED x ALFACANN - app layer on top of the shared design system v2.
   Tokens (--alf-*), self-hosted fonts, type scale and .alf-* components come from /ds/alfacann.css
   (generated from the repo-root design-system/ by expoweed/scripts/sync-ds.mjs). Only app-specific
   rules (forms, messages, stats, badges) live here. */
:root {
  --app-border: var(--alf-stroke-md) solid var(--alf-ink);
  --app-radius: var(--alf-radius-md);
  --app-gutter: 16px;
  --app-ok-soft: #d6f5f1;
}

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--alf-pink);
  color: var(--alf-ink-soft);
  font-size: 1.0625rem;
}

body.theme-blue { background: var(--alf-cyan); }

.app-header { display: flex; justify-content: center; margin: 8px 0 18px; }

.wrap { max-width: 560px; margin: 0 auto; padding: var(--app-gutter); }
.wrap.wide { max-width: 1200px; }

h1, h2 { color: var(--alf-ink); }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
}

a { font-weight: 700; }

.tagline {
  text-align: center;
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: .22em;
  font-size: .85rem;
  margin-bottom: 20px;
}

/* Home hero: video + proposal download. The CTA reuses .alf-btn and only scales it up. */
.hero-media { margin-bottom: 20px; display: grid; gap: 16px; }
.hero-media__video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--alf-ink); border: var(--app-border); border-radius: var(--app-radius); }
.cta-download { width: 100%; min-height: 72px; padding: 1.1rem 1.5rem; font-size: 1.15rem; box-shadow: var(--alf-shadow-lg); text-align: left; }
.cta-download span { display: grid; gap: .3em; }
.cta-download small { font: 700 .75rem/1 var(--font-ui); letter-spacing: .08em; opacity: .75; }
.cta-download__icon { flex: none; animation: cta-bob 1.6s var(--alf-ease-pop) infinite; }
@keyframes cta-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .cta-download__icon { animation: none; } }

/* Cards come from .alf-card (informative, no shadow); the app only adds vertical rhythm. */
.alf-card { margin-bottom: 20px; }

/* Forms */
label, legend { font-family: var(--font-ui); font-weight: 800; display: block; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: .9rem; margin: 4px 0 0; }

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: var(--alf-ink);
  background: var(--alf-white);
  border: var(--app-border);
  border-radius: var(--alf-radius-sm);
}

fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--alf-white);
  border: var(--app-border);
  border-radius: var(--alf-radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--alf-speed-fast) var(--alf-ease-pop);
}
.choice:hover { transform: translate(-1px, -1px); }
.choice input { width: 24px; height: 24px; flex: none; accent-color: var(--alf-ink); }
.choice:has(input:checked) { background: var(--alf-cyan); }
.choice:has(input:focus-visible) { outline: var(--alf-stroke-lg) solid var(--alf-ink); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--alf-ink); }

/* Buttons come from .alf-btn; in page flows they stack with a small gap. */
.alf-btn--block + .alf-btn--block { margin-top: 10px; }

/* Messages */
.msg {
  padding: 12px 14px;
  border: var(--app-border);
  border-radius: var(--alf-radius-sm);
  font-weight: 700;
  margin: 12px 0;
  background: var(--alf-white);
}
.msg.error { background: var(--alf-danger-soft); }
.msg.ok { background: var(--app-ok-soft); }
.msg:empty { display: none; }

/* Stats and badges */
.stat { font-family: var(--font-display); font-size: 3.4rem; font-weight: 400; line-height: 1; }
.stat small { font-family: var(--font-ui); font-size: 1.1rem; font-weight: 700; }

.badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.badge {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 10px;
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  border: var(--app-border);
  border-radius: var(--alf-radius-pill);
  background: var(--alf-cream);
  color: var(--alf-ink-soft);
}
.badge.done { background: var(--alf-mint); color: var(--alf-ink); }

.progress { height: 22px; border: var(--app-border); border-radius: var(--alf-radius-pill); background: var(--alf-white); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--alf-mint); }

.code-box {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: .06em;
  padding: 18px 10px;
  border: 5px dashed var(--alf-ink);
  border-radius: var(--app-radius);
  background: var(--alf-yellow);
  overflow-wrap: anywhere;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { opacity: .8; font-size: .9rem; }
[hidden] { display: none !important; }

/* Reduced motion is handled by the DS (motion.css); keep app transitions quiet too. */
@media (prefers-reduced-motion: reduce) {
  .choice { transition: none; }
}
