/* ===================================================================
   Bilargo — brand design system v2
   Shared visual language for bilargo.com and product subdomains.
   Dark aurora hero + warm paper body. Fraunces (display) + Inter (text).
   =================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1b1a17;
  --muted: #6e6a63;
  --line: #e7e3dc;
  --accent: #3b5bff;
  --accent-ink: #2743cc;
  --accent-soft: rgba(59, 91, 255, 0.08);
  --band: #101018;
  --band-ink: #f2f1ec;
  --band-muted: #a7a6b4;
  --band-line: rgba(255, 255, 255, 0.1);
  --glow-a: rgba(79, 108, 255, 0.55);
  --glow-b: rgba(122, 82, 255, 0.35);
  --radius: 16px;
  --max: 1120px;
  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --surface: #1c1b19;
    --ink: #eceae6;
    --muted: #a29d94;
    --line: #2e2c28;
    --accent: #93a8ff;
    --accent-ink: #b3c2ff;
    --accent-soft: rgba(147, 168, 255, 0.1);
    --band: #0c0c13;
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Navigation (sits on the dark band) ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--band) 78%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--band-line);
}

nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav .logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--band-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}

nav a:not(.logo) {
  color: var(--band-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

nav a:not(.logo):hover { color: var(--band-ink); }

/* ---------- Dark aurora hero band ---------- */

.band {
  position: relative;
  background: var(--band);
  color: var(--band-ink);
  overflow: hidden;
}

.band::before,
.band::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.band::before {
  width: 560px; height: 560px;
  background: radial-gradient(circle, var(--glow-a), transparent 65%);
  top: -220px; right: -120px;
  animation: drift 16s ease-in-out infinite alternate;
}

.band::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--glow-b), transparent 65%);
  bottom: -260px; left: -140px;
  animation: drift 20s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-60px, 40px, 0) scale(1.15); }
}

.band .band-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 7rem 1.5rem 6rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: transparent;
  background: linear-gradient(100deg, #9db1ff, #c9b8ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--band-muted);
  margin-bottom: 2.25rem;
  max-width: 38rem;
}

/* floating glyphs — decorative, hidden from AT */
.glyphs span {
  position: absolute;
  z-index: 1;
  font-family: var(--font-display);
  color: var(--band-ink);
  opacity: 0.08;
  user-select: none;
  animation: bob 9s ease-in-out infinite;
}

.glyphs span:nth-child(2n) { animation-duration: 12s; animation-delay: -3s; }
.glyphs span:nth-child(3n) { animation-duration: 15s; animation-delay: -6s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-22px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .band::before, .band::after, .glyphs span { animation: none; }
}

/* ---------- Layout ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 5rem 0 0.75rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.4rem; }
li { margin-bottom: 0.35rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; }

code {
  background: var(--accent-soft);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 0 0 rgba(59, 91, 255, 0);
  transition: background 0.15s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--accent-ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(59, 91, 255, 0.35);
}

.btn-ghost {
  display: inline-block;
  color: inherit;
  border: 1px solid currentColor;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.btn-ghost:hover { opacity: 1; text-decoration: none; color: inherit; }

.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Product cards (bento-ish) ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 18px 44px rgba(20, 20, 60, 0.1);
}

.product-card .app-icon {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

.product-card h3 { font-size: 1.45rem; margin: 0.25rem 0 0; }

.product-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  flex-grow: 1;
}

.product-card .link { font-weight: 600; font-size: 0.9rem; }

.product-card.upcoming {
  border-style: dashed;
  background: transparent;
  justify-content: center;
}

.product-card.upcoming:hover { transform: none; box-shadow: none; }

/* ---------- Badges ---------- */

.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.soon {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}

.badge.coming-soon {
  background: color-mix(in srgb, #e0921f 16%, transparent);
  border: 1px solid color-mix(in srgb, #e0921f 45%, transparent);
  color: #9a6410;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (prefers-color-scheme: dark) {
  .badge.coming-soon { color: #f0c078; }
}

/* Not-live products: keep visible (preview) but visually softer than the shipped card */
.product-card.coming .app-icon {
  opacity: 0.72;
  filter: saturate(0.85);
}

/* ---------- Principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 2rem;
}

.principle h3 { font-size: 1.1rem; }
.principle p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Scroll reveal ---------- */

/* reveal-on-scroll: hidden only when JS is active (progressive enhancement) */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Content pages (privacy, terms, contact) ---------- */

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-top: 3rem;
  max-width: 760px;
}

.surface h1 { font-size: 2rem; margin-bottom: 1.5rem; }
.surface h2 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.85rem;
}

footer .footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
footer .footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .band .band-inner { padding: 4rem 1.25rem 3.5rem; }
  .surface { padding: 1.5rem; }
  nav { gap: 1rem; }
}
