/* ============================================================
   RYUKILLC — v5 "Dark Command"
   Premium dark editorial theme for a strategic AI company:
   near-black canvas, porcelain text, serif display (Fraunces),
   hairline rules, bright crimson accent derived from the logo.
   ============================================================ */

:root {
  --bg:        #0E1013;
  --bg-alt:    #12151B;
  --card:      #171B22;
  --ink:       #F2F0EA;
  --ink-soft:  #B7BCC6;
  --dim:       #79818F;
  --line:      #262C37;
  --line-soft: #1F242E;
  --accent:    #E14A39;   /* bright crimson — derived from logo red */
  --accent-dim:#6E332B;

  --font-serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:  "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --container: 1180px;
  --radius: 3px;
  --header-h: 72px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 70% -10%, rgba(225, 74, 57, .07), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 820px; }

/* ---------- mono / kicker typography ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--dim);
}
.kicker::before { content: none; }

/* ---------- header / nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(14, 16, 19, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(14, 16, 19, .94);
}
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links > li > a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: .2px;
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav-links > li > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transition: right .25s ease;
}
.nav-links > li > a:not(.btn):hover { color: var(--ink); }
.nav-links > li > a:not(.btn):hover::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}
.btn-primary { background: var(--ink); color: var(--bg); transition: background .22s ease, transform .22s ease, box-shadow .22s ease; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 8px 28px -8px rgba(225, 74, 57, .5); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn.small, .btn-small { padding: 9px 18px; font-size: 13px; }
.btn.large { padding: 17px 38px; font-size: 15.5px; }

/* ---------- hero ---------- */
.hero {
  padding: calc(var(--header-h) + 88px) 0 96px;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.5px;
  margin-top: 26px;
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero-sub {
  margin-top: 28px;
  max-width: 600px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.hero-actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  margin-top: 84px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat b {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat b::after { content: "."; color: var(--accent); }
.stat span {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--dim);
  line-height: 1.7;
}

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 64px; }
.section-head h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.3px;
  margin-top: 20px;
}
.section-sub { margin-top: 18px; font-size: 17px; color: var(--ink-soft); }

/* ---------- beliefs / pillars ---------- */
.pillar-list { border-top: 1px solid var(--line); }
.pillar {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  padding: 34px 8px;
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, padding-left .25s ease;
}
.pillar:hover { background: var(--card); padding-left: 20px; }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
  padding-top: 8px;
  transition: color .25s ease;
}
.pillar:hover .pillar-num { color: var(--accent); }
.pillar h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 25px;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}
.pillar p { max-width: 640px; color: var(--ink-soft); }

/* ---------- vision + who we are ---------- */
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: start; }
.vision-copy .kicker { margin-bottom: 24px; }
.vision-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.2px;
}
.vision-copy > p:not(.kicker) { margin-top: 26px; font-size: 17px; color: var(--ink-soft); }

.who-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px 40px;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .55);
}
.who-card .kicker { margin-bottom: 18px; }
.who-lede { font-size: 16.5px; color: var(--ink-soft); }
.who-lede strong { color: var(--ink); font-weight: 600; }
.mentor {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.mentor h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  margin: 14px 0 8px;
}
.mentor p { font-size: 15.5px; color: var(--ink-soft); }
.mentor i { font-style: italic; font-family: var(--font-serif); }
.who-foot { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--dim); line-height: 1.75; }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---------- offerings ---------- */
.offer-block { margin-top: 76px; }
.offer-block:first-of-type { margin-top: 0; }
.offer-label {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 28px;
}
.offer-rule { flex: 0 0 44px; height: 1px; background: var(--accent); }

.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.offer-grid-2 { grid-template-columns: repeat(2, 1fr); }
.offer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 28px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.offer-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
}
.offer-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
}
.offer-card h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.1px;
  margin-bottom: 10px;
}
.offer-card p { font-size: 15px; color: var(--ink-soft); }
.offer-card.product { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }

.service-rows {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 40px;
  border-top: 1px solid var(--line);
}
.service-rows li {
  position: relative;
  padding: 20px 8px 20px 30px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 500;
  transition: padding-left .25s ease, color .25s ease;
}
.service-rows li::before {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
.service-rows li:hover { padding-left: 38px; }

/* ---------- coverage matrix ---------- */
.matrix-wrap {
  overflow: visible;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .7);
}
.matrix {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13.5px;
}
.matrix thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
  overflow-wrap: break-word;
}
.matrix thead th.svc-col { width: 38%; text-align: left; padding-left: 22px; }
.matrix thead .hdr-short { display: none; }
.matrix tbody th[scope="row"] {
  text-align: left;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
  padding: 9px 14px 9px 22px;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.4;
  overflow-wrap: break-word;
}
.matrix tbody td {
  text-align: center;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line-soft);
  height: 37px;
}
.matrix tbody tr:hover td,
.matrix tbody tr:hover th[scope="row"] { background: color-mix(in srgb, var(--bg-alt) 55%, var(--card)); }
.matrix .on::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.matrix .off::after { content: "—"; color: var(--line); font-size: 13px; }

/* signature capability rows — highlighted overlay */
.matrix tr.cap-row th[scope="row"],
.matrix tr.cap-row td { background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.matrix tr.cap-row th[scope="row"] { box-shadow: inset 3px 0 0 var(--accent); }
.matrix tr.cap-row:hover th[scope="row"],
.matrix tr.cap-row:hover td { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.cap-badge {
  display: inline-block;
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 2.5px 9px;
  vertical-align: 1px;
  white-space: nowrap;
}
.matrix tbody tr:last-child td,
.matrix tbody tr:last-child th { border-bottom: 0; }
.matrix-cat th {
  text-align: left !important;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--bg-alt);
  padding: 9px 22px;
  border-bottom: 1px solid var(--line);
  position: static;
}
.row-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
  margin-left: 8px;
}
.matrix-legend {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--dim);
}
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: baseline; }
.legend-dash { color: var(--line); }
.legend-cap {
  display: inline-block;
  width: 10px; height: 10px;
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
  border-left: 3px solid var(--accent);
  margin-right: 6px;
}

/* ---------- coverage section: single-screen fit ---------- */
#coverage { padding: 72px 0 80px; }
#coverage .section-head { margin-bottom: 34px; }
#coverage .section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 14px; }
#coverage .section-sub { margin-top: 10px; font-size: 15.5px; }

/* ---------- CTA ---------- */
.cta { text-align: center; background: linear-gradient(180deg, transparent, rgba(225, 74, 57, .05)); }
.cta .kicker { margin-bottom: 24px; display: block; }
.cta h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.4px;
}
.cta > .container > p:not(.kicker):not(.cta-domain) { margin: 24px auto 0; max-width: 520px; font-size: 17.5px; color: var(--ink-soft); }
.cta .btn { margin-top: 40px; }
.cta-domain {
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--dim);
}
.center { text-align: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.brand-logo-sm { height: 26px; width: auto; }
.footer-inner > span { font-size: 13px; color: var(--dim); }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { font-size: 13px; color: var(--ink-soft); transition: color .2s ease; }
.site-footer nav a:hover { color: var(--accent); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; gap: 56px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .stat b { font-size: 38px; }
}
@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .hero { padding-top: calc(var(--header-h) + 56px); }
  .hero-stats { margin-top: 60px; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px 28px 24px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links li { width: 100%; }
  .nav-links > li > a:not(.btn) { display: block; width: 100%; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line-soft); }
  .nav-links .btn { margin-top: 16px; width: 100%; text-align: center; }

  .pillar { grid-template-columns: 1fr; gap: 8px; }
  .pillar-num { padding-top: 0; }
  .offer-grid, .offer-grid-2 { grid-template-columns: 1fr; }
  .service-rows { grid-template-columns: 1fr; }
  .who-card { padding: 32px 26px; }

  /* matrix: fit single screen — rotated headers, short labels */
  .matrix { font-size: 11.5px; }
  .matrix thead th:not(.svc-col) {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    height: 86px;
    padding: 10px 3px;
    font-size: 9px;
    letter-spacing: .5px;
    line-height: 1.2;
  }
  .matrix thead th.svc-col {
    width: 54%;
    height: 86px;
    vertical-align: bottom;
    padding-bottom: 10px;
  }
  .matrix thead .hdr-full { display: none; }
  .matrix thead .hdr-short { display: inline; }
  .matrix tbody th[scope="row"] {
    font-size: 11.5px;
    padding: 6px 8px 6px 16px;
    line-height: 1.3;
  }
  .matrix tbody td { padding: 6px 3px; height: 28px; }
  .matrix .on::after { width: 6px; height: 6px; }
  .matrix .off::after { font-size: 11px; }
  .matrix-cat th { padding: 7px 16px; font-size: 8.5px; letter-spacing: 1.2px; }
  .cap-badge { display: none; }
  .row-note { display: none; }
}
@media (max-width: 460px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero h1 { max-width: none; }
}
