/* Bayagrid marketing site — tiled-desktop aesthetic.
   Palette from brand guidelines: Navy #1D2A3A (ground), Blue #5FAEEA (action),
   Teal #2FBFA0 (success/secondary), Surface #F2F5F7 (paper). */

:root {
  --navy-deep: #10161f;
  --navy: #1d2a3a;
  --navy-light: #28374a;
  --blue: #5faeea;
  --blue-dim: #3d82c2;
  --teal: #2fbfa0;
  --teal-deep: #1fa98c;
  --surface: #f2f5f7;
  --surface-dim: #9aaab8;
  --seam: rgba(242, 245, 247, 0.08);
  --seam-strong: rgba(242, 245, 247, 0.16);
  --radius: 14px;
  --radius-lg: 22px;
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background:
    linear-gradient(rgba(95, 174, 234, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 174, 234, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse 120% 80% at 50% -10%, #24344a 0%, var(--navy-deep) 60%);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  color: var(--surface);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--blue); color: var(--navy-deep); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg, .brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand span {
  font-size: 1.25rem; font-weight: 700; letter-spacing: 0.01em; color: var(--surface);
}
.lang-switch {
  font-size: 0.85rem; color: var(--surface-dim); text-decoration: none;
  border: 1px solid var(--seam-strong); border-radius: 999px; padding: 6px 14px;
  transition: all 0.2s ease;
}
.lang-switch:hover { color: var(--surface); border-color: var(--blue); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; position: relative; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 auto 20px; max-width: 17ch;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--blue) 20%, var(--teal) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  font-size: 1.15rem; color: var(--surface-dim); max-width: 52ch; margin: 0 auto 36px;
}

/* staggered load-in */
.rise { opacity: 0; transform: translateY(18px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise.d1 { animation-delay: 0.05s; } .rise.d2 { animation-delay: 0.15s; }
.rise.d3 { animation-delay: 0.28s; } .rise.d4 { animation-delay: 0.42s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* keycaps */
.keys { display: inline-flex; gap: 10px; margin-bottom: 28px; }
.keycap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(180deg, var(--navy-light), var(--navy));
  border: 1px solid var(--seam-strong);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(242, 245, 247, 0.09);
  font-size: 1.3rem; color: var(--blue); font-weight: 700;
}
.keycap.mod { width: auto; padding: 0 14px; font-size: 0.95rem; color: var(--surface-dim); }
.keys .keycap { animation: press 4.8s infinite; }
.keys .keycap:nth-child(3) { animation-delay: 0s; }
.keys .keycap:nth-child(4) { animation-delay: 1.2s; }
.keys .keycap:nth-child(5) { animation-delay: 2.4s; }
.keys .keycap:nth-child(6) { animation-delay: 3.6s; }
@keyframes press {
  0%, 4%, 100% { transform: none; box-shadow: 0 4px 0 rgba(0,0,0,0.35), inset 0 1px 0 rgba(242,245,247,0.09); }
  2% { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.35), inset 0 1px 0 rgba(242,245,247,0.09); }
}

/* ---------- desktop demo ---------- */
.demo {
  margin: 24px auto 0; max-width: 720px; aspect-ratio: 16 / 9.6;
  border-radius: var(--radius-lg); border: 1px solid var(--seam-strong);
  background: linear-gradient(180deg, #223046, #1a2534);
  position: relative; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.demo .menubar {
  height: 6.5%; background: rgba(242, 245, 247, 0.07);
  border-bottom: 1px solid var(--seam);
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
}
.demo .menubar i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--surface-dim); opacity: 0.5;
}
.win {
  position: absolute; border-radius: 8px; border: 1px solid var(--seam-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.win::before {
  content: ""; display: block; height: 14%;
  border-radius: 7px 7px 0 0;
  background: rgba(242, 245, 247, 0.13);
}
.win-a { background: rgba(95, 174, 234, 0.34); animation: snapA 9s cubic-bezier(0.3, 0.9, 0.25, 1) infinite; }
.win-b { background: rgba(47, 191, 160, 0.30); animation: snapB 9s cubic-bezier(0.3, 0.9, 0.25, 1) infinite; }
.win-c { background: rgba(242, 245, 247, 0.16); animation: snapC 9s cubic-bezier(0.3, 0.9, 0.25, 1) infinite; }
@keyframes snapA {
  0%, 8%   { left: 18%; top: 22%; width: 42%; height: 48%; }
  16%, 46% { left: 1.2%; top: 9%; width: 48.8%; height: 89%; }
  54%, 88% { left: 1.2%; top: 9%; width: 48.8%; height: 43%; }
  96%, 100%{ left: 18%; top: 22%; width: 42%; height: 48%; }
}
@keyframes snapB {
  0%, 20%  { left: 44%; top: 30%; width: 36%; height: 42%; }
  28%, 60% { left: 51.2%; top: 9%; width: 47.6%; height: 89%; }
  68%, 88% { left: 51.2%; top: 9%; width: 47.6%; height: 43%; }
  96%, 100%{ left: 44%; top: 30%; width: 36%; height: 42%; }
}
@keyframes snapC {
  0%, 32%  { left: 30%; top: 44%; width: 34%; height: 40%; opacity: 0; }
  40%      { left: 30%; top: 44%; width: 34%; height: 40%; opacity: 1; }
  48%, 88% { left: 1.2%; top: 54%; width: 97.6%; height: 44%; opacity: 1; }
  96%, 100%{ opacity: 0; }
}

/* ---------- section scaffolding ---------- */
section { padding: 88px 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 14px;
}
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.01em; margin-bottom: 14px; }
.lede { color: var(--surface-dim); max-width: 56ch; }

/* feature tiles */
.tiles {
  margin-top: 44px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tile {
  border: 1px solid var(--seam-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(40, 55, 74, 0.55), rgba(29, 42, 58, 0.55));
  padding: 26px 24px;
  opacity: 0; transform: translateY(22px) scale(0.985);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile.on { opacity: 1; transform: none; }
.tile .glyph {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(95, 174, 234, 0.14); color: var(--blue); font-size: 1.2rem; font-weight: 700;
}
.tile:nth-child(3n) .glyph { background: rgba(47, 191, 160, 0.14); color: var(--teal); }
.tile h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tile p { font-size: 0.92rem; color: var(--surface-dim); }

/* ---------- pricing ---------- */
.plans { margin-top: 44px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 760px; }
.plan {
  border: 1px solid var(--seam-strong); border-radius: var(--radius-lg);
  padding: 34px 30px; background: rgba(29, 42, 58, 0.6); position: relative;
}
.plan.plus {
  border-color: transparent; background:
    linear-gradient(rgba(24, 35, 49, 0.92), rgba(24, 35, 49, 0.92)) padding-box,
    linear-gradient(120deg, var(--blue), var(--teal)) border-box;
  border: 1.5px solid transparent;
}
.plan .name { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--surface-dim); }
.plan.plus .name { color: var(--teal); }
.plan .price { font-size: 2.4rem; font-weight: 800; margin: 10px 0 2px; }
.plan .per { font-size: 0.85rem; color: var(--surface-dim); margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-bottom: 26px; }
.plan li { font-size: 0.93rem; padding-left: 26px; position: relative; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--teal); font-weight: 700;
}
.plan li.locked { color: var(--surface-dim); }
.plan li.locked::before { content: "🔒"; font-size: 0.8rem; }
.plan li .soon {
  font-size: 0.7rem; font-weight: 700; color: var(--navy-deep);
  background: var(--teal); border-radius: 999px; padding: 1.5px 8px; margin-left: 8px;
  vertical-align: 1px;
}
.btn {
  display: inline-block; width: 100%; text-align: center; text-decoration: none;
  border-radius: 12px; padding: 13px 20px; font-weight: 700; font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn.primary { background: linear-gradient(100deg, var(--blue), var(--teal)); color: var(--navy-deep); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(95, 174, 234, 0.45); }
.btn.ghost { border: 1px solid var(--seam-strong); color: var(--surface); }
.btn.ghost:hover { border-color: var(--blue); }
.btn.disabled { pointer-events: none; opacity: 0.55; }
.plan .note { margin-top: 14px; font-size: 0.78rem; color: var(--surface-dim); text-align: center; }

/* ---------- faq-ish rows ---------- */
.rows { margin-top: 40px; border-top: 1px solid var(--seam); }
.row { padding: 22px 4px; border-bottom: 1px solid var(--seam); display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 18px; }
.row b { font-size: 0.98rem; }
.row p { font-size: 0.92rem; color: var(--surface-dim); }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--seam); padding: 44px 0 60px; margin-top: 40px; }
footer .cols { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
footer p { font-size: 0.82rem; color: var(--surface-dim); max-width: 60ch; }
footer .legal { margin-top: 10px; }
footer a { color: var(--surface-dim); }
footer a:hover { color: var(--surface); }
