/* =============================================================================
   FLIGHTLESS CODE LTD — MASTER SITE THEME & DESIGN SYSTEM
   Grounded Software • No-Nonsense Apps, Get It Done!
   Canvas Tone: #1B1C20 (Charcoal Gunmetal • Matches Flightless Code Logo)
   Cards: #23252C • Accents: #24C8B0 (Teal) & #F4F2EC (Warm Off-White)
   ============================================================================= */

:root {
  color-scheme: dark;
  --bg: #1B1C20;
  --bg-card: #23252C;
  --bg-card-hover: #2B2E37;
  --surface: #23252C;
  --surface-alt: #16171A;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: #24C8B0;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #F4F2EC;
  --ink-soft: #94A3B8;
  --ink-dim: #64748B;
  --teal: #24C8B0;
  --teal-glow: rgba(36, 200, 176, 0.15);
  --kiwi: #10B981;
  --kiwi-glow: rgba(16, 185, 129, 0.15);
  --family: #6366F1;
  --family-glow: rgba(99, 102, 241, 0.15);
  --chess: #F59E0B;
  --chess-glow: rgba(245, 158, 11, 0.15);
  --gold: #F59E0B;
  --gold-pale: rgba(245, 158, 11, 0.12);
  --white: #FFFFFF;
  --shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 24px 50px -12px rgba(0, 0, 0, 0.65);
  --radius: 1rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(36, 200, 176, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(99, 102, 241, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: .2em; text-decoration-thickness: .08em; transition: color .15s ease; }
a:hover { color: #5eead4; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: .3rem;
}

.skip-link {
  position: absolute; left: 1rem; top: -8rem; z-index: 100;
  padding: .75rem 1rem; background: var(--bg-card); color: var(--ink); border: 1px solid var(--teal);
}
.skip-link:focus { top: 1rem; }

.container { width: min(1140px, calc(100% - 2.5rem)); margin-inline: auto; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 28, 32, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: .6rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .85rem;
  color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em;
}
.brand img {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border-light);
}
.brand span { font-size: 1.05rem; line-height: 1.15; font-weight: 800; }
.brand small { display: block; margin-top: .18rem; color: var(--teal); font-size: .68rem; letter-spacing: .14em; font-weight: 700; }

.primary-nav { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; flex-wrap: wrap; }
.primary-nav a {
  display: inline-block; padding: .45rem .75rem; color: var(--ink-soft);
  text-decoration: none; font-size: .9rem; font-weight: 600; border-radius: .6rem;
  transition: all .15s ease;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] {
  color: var(--ink); background: rgba(255, 255, 255, 0.06);
}

/* TYPOGRAPHY & HERO */
.eyebrow {
  margin: 0 0 .65rem; color: var(--teal); font-size: .76rem;
  font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.18; letter-spacing: -.03em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); margin: 0 0 .8rem; }
h2 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { margin: 0 0 .6rem; font-size: 1.25rem; }

.hero {
  position: relative; overflow: hidden; padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
  align-items: center; gap: 3.5rem; position: relative; z-index: 1;
}
.hero h1 span { color: var(--teal); }
.hero-lede {
  max-width: 38rem; margin: 1.2rem 0 0; color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.6;
}
.hero-mark {
  justify-self: center; width: min(300px, 85%); border-radius: 18px;
  border: 1px solid var(--border-light);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .6);
}

.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.8rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: .68rem 1.2rem; border: 1px solid transparent;
  border-radius: .7rem; background: var(--teal); color: #04241F;
  font-weight: 800; font-size: .95rem; text-decoration: none;
  transition: all .15s ease;
}
.button:hover { background: #34E5CB; transform: translateY(-1px); }
.button-secondary {
  border-color: var(--border-light); background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.button-secondary:hover {
  background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.25);
}

/* SECTIONS & CARDS */
.section { padding: clamp(3rem, 6vw, 4.8rem) 0; border-bottom: 1px solid var(--border); }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2.2rem;
}
.section-intro { max-width: 45rem; color: var(--ink-soft); font-size: 1.05rem; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.card {
  min-height: 100%; padding: 1.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-hover);
}
.card-icon {
  width: 52px; height: 52px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
}
.card-tag {
  display: inline-block; margin-bottom: .85rem; padding: .25rem .65rem;
  border-radius: 99px; font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
}
.card p { color: var(--ink-soft); font-size: .95rem; flex-grow: 1; }
.card-link {
  display: inline-flex; align-items: center; gap: .35rem; margin-top: .75rem;
  font-weight: 750; font-size: .92rem;
}

/* Product Accents */
.product-kiwi { border-top: 4px solid var(--kiwi); }
.product-kiwi .card-tag { background: var(--kiwi-glow); color: #34D399; }
.product-kiwi .card-link { color: #34D399; }
.product-kiwi .card-icon { background: var(--kiwi-glow); }

.product-family { border-top: 4px solid var(--family); }
.product-family .card-tag { background: var(--family-glow); color: #818CF8; }
.product-family .card-link { color: #818CF8; }
.product-family .card-icon { background: var(--family-glow); }

.product-chess { border-top: 4px solid var(--chess); }
.product-chess .card-tag { background: var(--chess-glow); color: #FBBF24; }
.product-chess .card-link { color: #FBBF24; }
.product-chess .card-icon { background: var(--chess-glow); }

/* CONTENT & POLICIES */
.page-hero {
  padding: 3.5rem 0 2.2rem; background: rgba(35, 37, 44, 0.6);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { max-width: 22ch; margin: 0; font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero .lead { max-width: 48rem; margin: .85rem 0 0; color: var(--ink-soft); font-size: 1.1rem; }

.content { max-width: 860px; padding: 2.5rem 0 5rem; }
.content h2 { margin-top: 2.2rem; font-size: clamp(1.4rem, 2.5vw, 1.85rem); }
.content h2:first-child { margin-top: 0; }
.content h3 { margin-top: 1.5rem; font-size: 1.15rem; color: #E2E8F0; }
.content p, .content li { color: var(--ink-soft); font-size: .96rem; line-height: 1.68; }
.content li + li { margin-top: .45rem; }
.content strong { color: var(--ink); }

.content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0 2rem; }
.content th, .content td { padding: .85rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.content th { background: rgba(255, 255, 255, 0.04); color: var(--ink); font-weight: 700; }
.content td { background: var(--bg-card); color: var(--ink-soft); }

.review-note {
  padding: 1.1rem 1.25rem; border: 1px solid rgba(36, 200, 176, 0.3);
  border-left: 4px solid var(--teal); border-radius: .6rem;
  background: var(--teal-glow); color: #CCFBF1; margin-bottom: 1.75rem;
}
.review-note strong { color: #FFFFFF; }
.review-note.compact { margin-block: 1rem 1.4rem; font-size: .92rem; }

.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
.panel {
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--ink); box-shadow: var(--shadow);
}
.panel p, .panel li { color: var(--ink-soft); }

.pill-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.pill-list li {
  padding: .35rem .75rem; border: 1px solid var(--border-light);
  border-radius: 99px; background: rgba(255, 255, 255, 0.04);
  color: var(--ink); font-size: .88rem; font-weight: 600;
}

code {
  padding: .15rem .4rem; border-radius: .3rem;
  background: rgba(255, 255, 255, 0.08); color: var(--teal);
  font-size: .88em; overflow-wrap: anywhere;
}

/* FOOTER */
.site-footer {
  padding: 3.5rem 0 2rem; background: #141518;
  border-top: 1px solid var(--border); color: var(--ink-soft);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-grid h2 { margin: 0 0 .85rem; color: #FFFFFF; font-size: .95rem; font-weight: 700; letter-spacing: .02em; }
.footer-grid p, .footer-grid a { color: var(--ink-soft); font-size: .9rem; text-decoration: none; }
.footer-grid a:hover { color: var(--teal); }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li + li { margin-top: .4rem; }
.footer-company-info { font-size: .84rem; line-height: 1.6; color: var(--ink-dim); margin-top: .6rem; }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border); color: var(--ink-dim); font-size: .85rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--ink-dim); text-decoration: none; }
.footer-bottom a:hover { color: var(--teal); }

/* RESPONSIVE */
@media (max-width: 820px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: .75rem; padding-block: .8rem; }
  .primary-nav { justify-content: flex-start; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 2rem; }
  .hero-mark { width: 220px; justify-self: center; order: -1; }
  .cards { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .container { width: min(100% - 1.5rem, 1140px); }
  .footer-grid { grid-template-columns: 1fr; }
  .actions { flex-direction: column; width: 100%; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
