/* ============================================================
   F1R3FLY – July 2026 site
   Light palette: warm, technical, firefly-inspired
   ============================================================ */

:root {
  --bg: #f6f7f9;
  --bg-raised: #eef0f3;
  --bg-card: #ffffff;
  --ink: #1c2433;
  --ink-dim: #4b566b;
  --ink-faint: #8891a3;
  --ember: #d97a06;
  --ember-hot: #f0930f;
  --ember-glow: rgba(240, 147, 15, 0.22);
  --ember-tint: rgba(240, 147, 15, 0.08);
  --line: rgba(28, 36, 51, 0.12);
  --radius: 14px;
  --max: 1120px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p  { color: var(--ink-dim); }
.lede { font-size: 1.2rem; }

a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--ember-hot); }

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1rem;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.divider { border: none; border-top: 1px solid var(--line); }

/* ---------- header / nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 249, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-head);
  font-weight: 700; font-size: 1.25rem; letter-spacing: 0.04em;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.logo .mark {
  width: 26px; height: auto; display: block;
}
.logo .spark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 12px 3px var(--ember-glow), 0 0 22px 6px rgba(240,147,15,0.25);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px 3px var(--ember-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 20px 6px var(--ember-glow); }
}
.logo:hover { color: var(--ink); }

nav.links { display: flex; align-items: center; gap: 26px; }
nav.links > a {
  color: var(--ink-dim); font-size: 0.95rem; font-weight: 500;
}
nav.links > a:hover, nav.links > a.active { color: var(--ink); }

/* dropdown */
.dropdown { position: relative; }
.dropdown > button {
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px; padding: 22px 0;
}
.dropdown > button::after { content: "▾"; font-size: 0.7rem; }
.dropdown:hover > button { color: var(--ink); }
.dropdown-menu {
  position: absolute; top: 100%; left: -16px;
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  display: none;
  box-shadow: 0 18px 40px rgba(28, 36, 51, 0.14);
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--ink-dim); font-size: 0.93rem;
}
.dropdown-menu a:hover { background: var(--bg-raised); color: var(--ink); }

/* F1R3FLY.io tooltip */
.io-link { position: relative; }
.io-link::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 300px;
  background: var(--ink);
  color: #fdfcf9;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(28, 36, 51, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 60;
}
.io-link::before {
  content: "";
  position: absolute;
  top: calc(100% + 6px);
  right: 28px;
  border: 6px solid transparent;
  border-bottom-color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
  z-index: 60;
}
.io-link:hover::after, .io-link:focus::after,
.io-link:hover::before, .io-link:focus::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600; font-size: 0.95rem;
  padding: 12px 24px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--ember-hot), var(--ember));
  color: #ffffff;
}
.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--ember-glow);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }

.nav .btn { padding: 9px 20px; }

/* mobile nav */
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.6rem; cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  nav.links {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
  }
  nav.links.open { display: flex; }
  nav.links > a, .dropdown > button { padding: 12px 0; width: 100%; text-align: left; }
  .dropdown { width: 100%; }
  .dropdown-menu { position: static; box-shadow: none; border: none; background: none; display: block; padding: 0 0 0 16px; }
  .io-link::after { right: auto; left: 0; }
  .io-link::before { right: auto; left: 28px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 480px at 75% -10%, rgba(240,147,15,0.05), transparent 60%),
    var(--bg);
}
.hero h1 .line { display: block; }

/* site-wide principle: multi-sentence headlines break one sentence per line */
h1 .line, h2 .line { display: block; }
.hero .lede { max-width: 62ch; margin: 1.6rem 0 2.4rem; }
.hero .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* fireflies */
.fireflies { position: absolute; inset: 0; pointer-events: none; }
.fireflies span {
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 10px 3px var(--ember-glow);
  opacity: 0;
  animation: drift 9s ease-in-out infinite;
}
.fireflies span:nth-child(1) { top: 22%; left: 68%; animation-delay: 0s; }
.fireflies span:nth-child(2) { top: 55%; left: 82%; animation-delay: 1.8s; }
.fireflies span:nth-child(3) { top: 30%; left: 90%; animation-delay: 3.4s; }
.fireflies span:nth-child(4) { top: 70%; left: 60%; animation-delay: 5s; }
.fireflies span:nth-child(5) { top: 14%; left: 45%; animation-delay: 6.6s; }
.fireflies span:nth-child(6) { top: 80%; left: 88%; animation-delay: 2.6s; }
@keyframes drift {
  0%   { opacity: 0; transform: translate(0, 0); }
  20%  { opacity: 0.9; }
  50%  { opacity: 0.4; transform: translate(-30px, -26px); }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(18px, -52px); }
}

/* ---------- announcement banner ---------- */
.banner {
  background: linear-gradient(120deg, rgba(240,147,15,0.05), rgba(217,122,6,0.02));
  border: 1px solid rgba(217,122,6,0.25);
  border-radius: var(--radius);
  padding: 40px 44px;
}
.banner h2 { margin-bottom: 0.9rem; }
.banner .cta { margin-top: 1.4rem; display: inline-block; font-weight: 600; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 2px 10px rgba(28, 36, 51, 0.05);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: rgba(217,122,6,0.45);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(28, 36, 51, 0.10);
}
.card h3 { margin-bottom: 0.8rem; }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ember-tint);
  color: var(--ember);
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
}
.card a.more { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: 0.95rem; }

/* ---------- section headers ---------- */
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head h2 { margin-bottom: 1rem; }

/* ---------- audience list ---------- */
.audience { display: grid; gap: 18px; }
.audience .item {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: 0 2px 10px rgba(28, 36, 51, 0.05);
}
.audience .item .dot {
  flex: none; margin-top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 10px 2px var(--ember-glow);
}
.audience .item strong { color: var(--ink); }

/* ---------- claims strip (Unbroken Security) ---------- */
.claims { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .claims { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .claims { grid-template-columns: 1fr; } }
.claim {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ember-hot);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(28, 36, 51, 0.05);
}
.claim b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.claim small { color: var(--ink-dim); font-size: 0.88rem; line-height: 1.5; display: block; }

/* ---------- containment diagram (Unbroken Security) ---------- */
.containment { text-align: center; }
.containment svg {
  width: min(380px, 80vw); height: auto;
  filter: drop-shadow(0 4px 14px rgba(28, 36, 51, 0.08));
}
.containment .cell {
  fill: var(--bg-raised);
  stroke: rgba(28, 36, 51, 0.14);
  stroke-width: 1;
}
.containment .cell.lit {
  animation: cellPulse 1.8s ease-in-out;
}
.containment .cell-lock {
  fill: rgba(28, 36, 51, 0.30);
}
.containment .cell-lock.lit {
  animation: lockFlash 1.8s ease-in-out;
}
@keyframes lockFlash {
  0%, 100% { fill: rgba(28, 36, 51, 0.30); }
  18%, 85% { fill: #ffffff; }
}
@keyframes cellPulse {
  0%, 100% { fill: var(--bg-raised); }
  18%, 45% { fill: var(--ember-hot); }
  55% { fill: var(--ember); }
  70%, 85% { fill: var(--ember-hot); }
}
.containment .ring {
  fill: none;
  stroke: var(--ember);
  stroke-width: 2.5;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.containment .ring.show { opacity: 1; }
.containment .ring-outer {
  fill: none;
  stroke: var(--ember-hot);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.containment .ring-outer.show {
  animation: ringRipple 1.8s ease-out;
}
@keyframes ringRipple {
  0% { opacity: 0; transform: scale(1); }
  25% { opacity: 0.8; }
  100% { opacity: 0; transform: scale(1.28); }
}
@media (max-width: 700px) {
  .desktop-break { display: none; }
}
.contain-caption {
  font-family: var(--font-head);
  font-size: 0.9rem; letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-align: center; margin-top: 1.1rem;
}

/* ---------- proof / stat band ---------- */
.band {
  background: var(--bg-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- pending-approval flags ---------- */
.todo-flag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-head);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #8a5200;
  background: rgba(240, 147, 15, 0.13);
  border: 1px dashed rgba(217, 122, 6, 0.6);
  border-radius: 6px;
  padding: 4px 10px;
  margin: 0 0 0.8rem;
}
.todo-flag::before { content: "⚑"; }

/* ---------- closing CTA ---------- */
.closing {
  text-align: center;
  padding: 110px 0;
  background:
    radial-gradient(ellipse 700px 380px at 50% 120%, rgba(240,147,15,0.06), transparent 65%),
    var(--bg);
}
.closing h2 { margin-bottom: 1rem; }
.closing p { max-width: 58ch; margin: 0 auto 2.2rem; }

/* ---------- page hero (interior pages) ---------- */
.page-hero {
  padding: 90px 0 70px;
  background:
    radial-gradient(ellipse 800px 400px at 80% -20%, rgba(240,147,15,0.04), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); max-width: 22ch; }
.page-hero .lede { max-width: 64ch; margin-top: 1.4rem; }

/* ---------- prose sections on interior pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-bottom: 1.1rem; }
.prose p + p { margin-top: 1.1rem; }

/* ---------- deliverables list ---------- */
ul.deliver { list-style: none; display: grid; gap: 16px; }
ul.deliver li {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember-hot);
  border-radius: 10px;
  padding: 20px 24px;
  color: var(--ink-dim);
  box-shadow: 0 2px 10px rgba(28, 36, 51, 0.05);
}
ul.deliver li strong { color: var(--ink); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
form.contact { display: grid; gap: 18px; }
form.contact label {
  display: block;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  line-height: 1.2; margin-bottom: 8px;
}
form.contact input, form.contact textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
}
form.contact input:focus, form.contact textarea:focus {
  outline: none; border-color: var(--ember);
}
.office h3 { line-height: 1.2; margin-bottom: 0.8rem; }
.office p { font-size: 0.98rem; }
.office + .office { margin-top: 2rem; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 64px 0 36px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  margin-bottom: 44px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
footer.site h4 {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1rem;
}
footer.site ul { list-style: none; display: grid; gap: 9px; }
footer.site a { color: var(--ink-dim); }
footer.site a:hover { color: var(--ember); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--ink-faint); font-size: 0.88rem;
}
