/*
Theme Name: Canadafy Coming Soon
Description: Pre-launch page and research forms for canadafy.ca. Saves contacts to FluentCRM. Wording approved in docs/compliance/marketing-site-copy.md.
Version: 1.1.0
Requires PHP: 7.4
Text Domain: canadafy-soon
*/

:root {
  --navy: #0f1b2d;
  --navy-2: #1f2e47;
  --red: #c8102e;
  --red-dark: #a80d27;
  --paper: #f5f4f1;
  --white: #ffffff;
  --text: #0f1b2d;
  --muted: #55627a;
  --line: #e4e2dd;
  --field: #c9ced6;
  --ok: #1e7b4f;
  --err: #b42318;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--red); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Header / footer */
.site-head { padding: 22px 0; }
.site-head img { height: 34px; width: auto; display: block; }
.site-foot { padding: 32px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 56px; }
.site-foot a { color: var(--muted); }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }

/* Hero */
.hero { display: grid; gap: 40px; align-items: center; padding: 24px 0 8px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 0.95fr; padding-top: 48px; } }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; margin: 14px 0 16px; }
h1 em { font-style: normal; color: var(--red); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 0 0 26px; }

/* Forms */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 1px 2px rgba(15,27,45,.04); }
form.cfy-form { display: grid; gap: 16px; max-width: 34rem; }
.cfy-form label.field { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.cfy-form .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.cfy-form input[type=text], .cfy-form input[type=email], .cfy-form select, .cfy-form textarea {
  font: inherit; color: var(--text); background: var(--white);
  border: 1px solid var(--field); border-radius: var(--radius); padding: 11px 13px; width: 100%;
}
.cfy-form textarea { min-height: 96px; resize: vertical; }
.cfy-form input:focus-visible, .cfy-form select:focus-visible, .cfy-form textarea:focus-visible, .cfy-form button:focus-visible {
  outline: 3px solid var(--navy); outline-offset: 2px;
}
.row-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.row-inline input[type=email] { flex: 1 1 220px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 500; font-size: 15px; margin-bottom: 4px; }
button.btn {
  font: inherit; font-weight: 600; border: 0; cursor: pointer;
  background: var(--red); color: var(--white); padding: 12px 22px; border-radius: var(--radius);
}
button.btn:hover { background: var(--red-dark); }
button.btn[disabled] { opacity: .55; cursor: not-allowed; }
.notice { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.alert { border-radius: var(--radius); padding: 12px 14px; font-size: 15px; }
.alert.ok { background: #e7f4ec; color: var(--ok); border: 1px solid #b9dfc8; }
.alert.err { background: #fbeceb; color: var(--err); border: 1px solid #f1c6c2; }
.alert.locked { background: #fff7e6; color: #7a4b00; border: 1px solid #f3d9a4; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Content pages */
.page { padding: 24px 0; max-width: 46rem; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page h2 { font-size: 1.15rem; margin: 28px 0 6px; }
.page p, .page li { color: #2b3648; }

/* ------------------------------------------------------------------
   Animation: a worker builds a tower, brick by brick (10 s loop).
   Transform/opacity only; static finished tower under reduced motion.
   ------------------------------------------------------------------ */
.scene { width: 100%; max-width: 440px; margin-inline: auto; display: block; }
/* Per-brick, climb, carry and flag keyframes are generated from one timeline
   in functions.php (cfy_scene_keyframes) so every brick lands as the worker
   reaches it. */
.scene .brick, .scene .flag { opacity: 0; transform-box: fill-box; transform-origin: center; }
.scene .flag { transform-origin: bottom left; }
.scene .arm { transform-box: fill-box; transform-origin: 15% 15%; animation: cfy-arm 1.25s ease-in-out infinite; }
.scene .cloud { animation: cfy-cloud 22s linear infinite; }
@keyframes cfy-arm { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-18deg); } }
@keyframes cfy-cloud { from { transform: translateX(0); } to { transform: translateX(320px); } }

@media (prefers-reduced-motion: reduce) {
  .scene .brick, .scene .flag { animation: none; opacity: 1; transform: none; }
  .scene .worker, .scene .carry, .scene .arm, .scene .cloud { animation: none; }
  .scene .worker { transform: translateY(-136px); }
  .scene .carry { opacity: 0; }
}

/* Event tablet page */
.event-badge { display: block; width: 160px; height: auto; border-radius: 8px; margin: 4px 0 18px; }
.offer { background: #fff; border: 2px solid var(--red); border-radius: 16px; padding: 18px 20px; margin: 0 0 22px; }
.offer p { margin: 0 0 10px; }
.offer .offer-title { font-weight: 700; color: var(--red); letter-spacing: .02em; }
.offer .notice { margin: 0; }
