/* ============================================================
   BB Software LLC — shared design system
   A calm, refined indie-studio identity in light blue.
   Each app keeps its own brand; this is the company frame.
   ============================================================ */

:root {
  /* Surface + ink */
  --bg:        #F4F8FD;
  --bg-2:      #EAF2FC;
  --surface:   #FFFFFF;
  --ink:       #0E1B2E;
  --ink-2:     #3A4A60;
  --muted:     #6B7C93;
  --line:      rgba(14, 27, 46, 0.10);
  --line-2:    rgba(14, 27, 46, 0.06);

  /* Blue identity */
  --blue:        #2D6BE0;
  --blue-deep:   #1B4FB0;
  --blue-bright: #5AA9FF;
  --blue-soft:   #E6F0FF;
  --blue-tint:   #DCEBFF;

  /* Type */
  --display: "Bricolage Grotesque", Georgia, serif;
  --body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Fine grain overlay for atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--blue-deep); text-decoration: none; }
a:hover { color: var(--blue); }
img { display: block; max-width: 100%; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.narrow { max-width: 760px; }

section { position: relative; z-index: 2; }

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brandmark { display: inline-flex; align-items: center; gap: 12px; }
.brandmark:hover { color: inherit; }
.brand-tile {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--blue-bright), var(--blue) 55%, var(--blue-deep));
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(45, 107, 224, 0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.topnav { display: flex; align-items: center; gap: 26px; }
.topnav a {
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.topnav a:hover { color: var(--blue-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 60px;
  overflow: hidden;
}
/* gradient-mesh sky */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero::before {
  width: 620px; height: 620px;
  top: -260px; right: -120px;
  background: radial-gradient(circle, rgba(90,169,255,0.42), rgba(90,169,255,0) 68%);
  animation: drift 22s ease-in-out infinite alternate;
}
.hero::after {
  width: 520px; height: 520px;
  top: -160px; left: -160px;
  background: radial-gradient(circle, rgba(45,107,224,0.22), rgba(45,107,224,0) 70%);
  animation: drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

.hero-inner { position: relative; z-index: 2; max-width: 800px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 20px 0 0;
  color: var(--ink);
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--blue), var(--blue-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lede {
  font-size: clamp(1.05rem, 1.9vw, 1.32rem);
  color: var(--ink-2);
  max-width: 560px;
  margin: 26px 0 0;
  line-height: 1.55;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-bright);
}

/* ---------- Section heading ---------- */
.section-head { margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.025em;
  margin: 12px 0 0;
}
.section-head p { color: var(--ink-2); margin: 10px 0 0; max-width: 540px; }

/* ---------- App cards ---------- */
.apps { padding: 30px 0 20px; }
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
  box-shadow: 0 1px 2px rgba(14,27,46,0.04);
}
.app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, var(--card-glow, rgba(90,169,255,0.10)), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.app-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px -22px rgba(14,27,46,0.32);
  border-color: var(--card-edge, var(--blue-tint));
}
.app-card:hover::after { opacity: 1; }

.app-top { display: flex; align-items: center; gap: 16px; }
.app-icon {
  width: 64px; height: 64px;
  border-radius: 15px;
  box-shadow: 0 8px 20px -8px rgba(14,27,46,0.45);
}
.app-titles { display: flex; flex-direction: column; gap: 3px; }
.app-titles h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 0 0 rgba(90,169,255,0.6);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(90,169,255,0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(90,169,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(90,169,255,0); }
}
.app-card p.app-desc { color: var(--ink-2); margin: 20px 0 0; font-size: 1.02rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid var(--blue-tint);
  border-radius: 999px;
  padding: 5px 12px;
}
.app-cta {
  margin-top: auto;
  padding-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--blue-deep);
}
.app-cta .arrow { transition: transform .3s; }
.app-card:hover .app-cta .arrow { transform: translateX(5px); }

/* ---------- Generic content section ---------- */
.band { padding: 64px 0; }
.band.alt { background: var(--bg-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.prose p { color: var(--ink-2); }
.prose h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  margin: 34px 0 10px;
}

/* ---------- Detail page hero ---------- */
.detail-hero { padding: 44px 0 30px; }
.backlink {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.backlink:hover { color: var(--blue-deep); }
.detail-head { display: flex; align-items: center; gap: 22px; margin-top: 28px; flex-wrap: wrap; }
.detail-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 14px 34px -12px rgba(14,27,46,0.5); }
.detail-titles h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 6px 0 0;
}
.detail-titles .tagline { color: var(--ink-2); font-size: 1.15rem; margin: 8px 0 0; }

.feature-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 16px; }
.feature-list li {
  display: flex; gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.feature-list .fi-mark {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft, var(--blue-soft));
  color: var(--accent, var(--blue-deep));
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
}
.feature-list b { color: var(--ink); font-weight: 600; }
.feature-list span { color: var(--ink-2); }

/* ---------- CTA buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary {
  background: linear-gradient(150deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(45,107,224,0.7);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(45,107,224,0.75); }
.btn-soft {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-soft:hover { color: var(--ink); border-color: var(--blue-tint); transform: translateY(-2px); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

/* ---------- Screenshot gallery ---------- */
.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px 4px 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: 0 0 auto;
  width: 220px;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -20px rgba(14,27,46,0.45);
  scroll-snap-align: center;
  background: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 46px 0 56px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px; font-weight: 500;
}
.footer-col a, .footer-col span { display: block; font-size: 14.5px; color: var(--ink-2); margin-bottom: 9px; }
.footer-col a:hover { color: var(--blue-deep); }
.footer-base {
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--line-2);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer-base a { color: var(--muted); }

/* ---------- Load-in motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise .8s cubic-bezier(.2,.8,.2,1) forwards; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .15s; }
.d3 { animation-delay: .25s; } .d4 { animation-delay: .35s; }
.d5 { animation-delay: .45s; } .d6 { animation-delay: .55s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .app-grid { grid-template-columns: 1fr; }
  .topnav { gap: 18px; }
  .hero { padding: 48px 0 40px; }
  .footer-links { gap: 36px; }
}
@media (max-width: 460px) {
  .wrap { padding: 0 20px; }
  .topbar { padding: 20px; }
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
