/* Brilyon Ventures — isometric stacked blocks + stats band */
:root {
  --blue:        #004AAD;
  --blue-bright: #2E6BC4;
  --blue-mid:    #003B8C;
  --blue-deep:   #00265C;
  --blue-ink:    #00173A;
  --paper:       #F4F7FC;
  --sheet:       #FFFFFF;
  --mist:        #E7EEF8;
  --text:        #0B1220;
  --muted:       #3A4658;
  --line:        #C5D3E6;
  --text-inv:    #F4F8FC;
  --muted-inv:   #C9D7EA;
  --line-inv:    rgba(244, 248, 252, 0.22);
  --grad:        linear-gradient(120deg, #2E6BC4 0%, #004AAD 55%, #00265C 100%);
  --radius:      14px;
  --maxw:        1160px;
  --ease:        cubic-bezier(.22, .61, .36, 1);
  --header-h:    72px;
  --cube:        88px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Karla", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name, .stat strong, .layer-no, .method-tag {
  font-family: "Geologica", "Karla", system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--blue); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.kicker {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--blue);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 8px 24px -8px rgba(0, 74, 173, .5);
}
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--text);
}

/* ===== Header ===== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(244, 247, 252, .78);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(244, 247, 252, .96);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.brand-name {
  font-size: 18px; font-weight: 700; letter-spacing: .01em;
}
.brand-name em {
  font-style: normal; font-weight: 500; color: var(--blue);
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 15px; color: var(--muted); font-weight: 600;
  transition: color .2s var(--ease);
}
.nav .nav-cta {
  color: var(--text); border: 1px solid var(--line);
  padding: 8px 18px; border-radius: 8px;
}

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

/* ===== First screen: hero + stats plinth ===== */
.first-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 28px 0 20px;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% 28%, rgba(0, 74, 173, .10), transparent 60%),
    var(--paper);
}
.iso-floor {
  position: absolute;
  inset: 8% -10% -18% -10%;
  width: 120%;
  height: 92%;
  pointer-events: none;
  opacity: .55;
}
.grid-line {
  fill: none;
  stroke: #004AAD;
  stroke-opacity: .16;
  stroke-width: 1;
}
.floor-shift {
  animation: floor-drift 22s linear infinite;
}
@keyframes floor-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(-80px, -46px); }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 24px;
  align-items: center;
  width: 100%;
}
.hero-grid > * { min-width: 0; }
.hero-copy { max-width: 100%; }
.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.8vw, 4.7rem);
  font-weight: 700;
  max-width: 12ch;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted);
  margin-top: 22px;
  max-width: min(48ch, 100%);
  overflow-wrap: break-word;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px;
}

/* ===== Isometric stack (SVG) ===== */
.iso-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}
.iso-svg {
  width: min(100%, 420px);
  height: auto;
  max-width: 100%;
  animation: svg-bob 5.6s ease-in-out 1.5s infinite;
}
@keyframes svg-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.svg-cube .sl, .mini-cube .sl { fill: var(--blue-deep); }
.svg-cube .sr, .mini-cube .sr { fill: var(--blue); }
.svg-cube .st, .mini-cube .st { fill: var(--blue-bright); }
.svg-plinth .sl { fill: #001029; }
.svg-plinth .sr { fill: var(--blue-ink); }
.svg-plinth .st { fill: var(--blue-deep); }
.svg-cube polygon,
.svg-plinth polygon {
  stroke: rgba(255,255,255,.16);
  stroke-width: 0.8;
}
.svg-cube .st { animation: face-sheen 4.8s ease-in-out infinite; }
.c1 .st { animation-delay: 0s; }
.c2 .st { animation-delay: .35s; }
.c3 .st { animation-delay: .7s; }
.c4 .st { animation-delay: 1.05s; }
@keyframes face-sheen {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.2); }
}
.svg-cube, .svg-plinth, .svg-label {
  transform-box: fill-box;
  transform-origin: center;
}
.svg-cube, .svg-plinth { animation: cube-pop .85s var(--ease) both; }
.svg-plinth { animation-delay: .05s; }
.c1 { animation-delay: .18s; }
.c2 { animation-delay: .34s; }
.c3 { animation-delay: .5s; }
.c4 { animation-delay: .66s; }
@keyframes cube-pop {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.svg-label {
  opacity: 0;
  animation: legend-in .55s var(--ease) forwards;
}
.l1 { animation-delay: .85s; }
.l2 { animation-delay: 1s; }
.l3 { animation-delay: 1.15s; }
.l4 { animation-delay: 1.3s; }
@keyframes legend-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}
.svg-label line {
  stroke: var(--blue);
  stroke-width: 1.2;
  stroke-opacity: .55;
}
.svg-label text {
  font-family: "Geologica", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  fill: var(--text);
}

/* ===== Stats band ===== */
.stats-band {
  position: relative;
  z-index: 3;
  background: var(--blue-ink);
  color: var(--text-inv);
  padding: 36px 0;
  box-shadow: 0 -24px 48px -28px rgba(0, 23, 58, .45);
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat {
  padding: 10px 18px;
  border-left: 2px solid var(--blue-bright);
}
.stat strong {
  display: block;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.stat span {
  color: var(--muted-inv);
  font-size: 14px;
  font-weight: 500;
}

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-mist { background: var(--mist); }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head h2,
.about-lead h2,
.contact-copy h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 700;
}
.lead {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}
.on-dark .kicker { color: var(--blue-bright); }
.on-dark h2 { color: var(--text-inv); }
.on-dark .lead { color: var(--muted-inv); }

.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.about-copy {
  display: grid;
  gap: 16px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Layer cards */
.layer-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.layer-card {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.layer-no {
  display: block;
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--blue);
  margin: 8px 0 10px;
}
.layer-card h3 {
  font-size: 1.45rem;
  font-weight: 650;
  margin-bottom: 10px;
}
.layer-card p { color: var(--muted); }

.mini-cube {
  width: 52px;
  height: 46px;
  margin-bottom: 8px;
  overflow: visible;
}

/* Method dark */
.method {
  background: var(--blue-ink);
  color: var(--text-inv);
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.method-card {
  background: rgba(0, 74, 173, .18);
  border: 1px solid var(--line-inv);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.method-tag {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue-bright);
  margin-bottom: 10px;
}
.method-card h3 {
  font-size: 1.4rem;
  color: var(--text-inv);
  margin-bottom: 10px;
}
.method-card p { color: var(--muted-inv); }

/* Quote */
.quote { background: var(--paper); }
.quote-inner {
  max-width: 820px; margin: 0 auto; text-align: center;
}
.quote-mark {
  display: block;
  font-family: "Geologica", sans-serif;
  font-size: 5.2rem; line-height: .45;
  color: var(--blue); opacity: .45;
  margin-bottom: 12px;
}
.quote-inner blockquote {
  margin: 0;
  font-family: "Geologica", sans-serif;
  font-weight: 600;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
}
.quote-attr {
  margin-top: 22px;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px; font-weight: 600;
}

/* FAQ */
.faq-wrap {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.faq-head { margin: 0; position: sticky; top: 100px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.faq-item.open { border-color: var(--blue); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; text-align: left; color: var(--text);
  font-family: "Karla", sans-serif; font-size: 1.05rem; font-weight: 600;
  padding: 20px 22px;
}
.faq-ico { position: relative; flex: 0 0 auto; width: 16px; height: 16px; }
.faq-ico::before, .faq-ico::after {
  content: ""; position: absolute; background: var(--blue); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq-ico::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-ico::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item.open .faq-ico::after { transform: scaleY(0); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a { max-height: 280px; }
.faq-a p { color: var(--muted); margin: 0; padding: 0 22px 20px; font-size: .98rem; }

/* Contact */
.contact {
  background: var(--blue-ink);
  color: var(--text-inv);
}
.contact .kicker { color: var(--blue-bright); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-copy h2 { color: var(--text-inv); margin-bottom: 16px; }
.contact-copy p { color: var(--muted-inv); margin-bottom: 20px; }
.contact-email {
  display: inline-block;
  font-family: "Geologica", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: .01em;
  color: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.contact-addr {
  margin-top: 22px;
  color: var(--muted-inv);
  font-size: .98rem;
  line-height: 1.6;
}
.contact-form {
  background: rgba(0, 74, 173, .18);
  border: 1px solid var(--line-inv);
  border-radius: var(--radius);
  padding: 28px;
  display: grid; gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; color: var(--muted-inv); font-weight: 600; }
.field input, .field textarea {
  background: var(--blue-deep);
  border: 1px solid var(--line-inv);
  border-radius: 10px;
  color: var(--text-inv);
  padding: 12px 14px;
  font: inherit; font-size: 15px;
  width: 100%; resize: vertical;
  transition: border-color .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(201, 215, 234, .55); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-bright); }
.contact-form .btn { margin-top: 4px; justify-self: start; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--sheet);
  padding: 48px 0 26px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 30px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.footer-tag { color: var(--muted); margin: 12px 0 0; font-size: .95rem; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 15px; font-weight: 600; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; padding-top: 20px;
}

/* ===== Reveal ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .floor-shift, .iso-svg, .svg-cube, .svg-plinth, .svg-label, .svg-cube .st { animation: none; }
  .svg-cube, .svg-plinth, .svg-label { opacity: 1; transform: none; }
}

/* Hover AFTER reveal.in so lift is not overwritten */
@media (hover: hover) and (pointer: fine) {
  .btn { transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease); }
  .btn-primary:hover {
    transform: translateY(-2px);
    background: var(--blue-mid);
    box-shadow: 0 14px 34px -8px rgba(0, 74, 173, .7);
  }
  .btn-ghost:hover {
    border-color: var(--blue);
    color: var(--blue);
    transform: translateY(-2px);
  }
  .nav a:hover { color: var(--text); }
  .nav .nav-cta:hover { border-color: var(--blue); color: var(--blue); }
  .layer-card.reveal.in:hover,
  .layer-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue);
    box-shadow: 0 18px 36px -16px rgba(0, 74, 173, .32);
  }
  .method-card.reveal.in:hover,
  .method-card:hover {
    transform: translateY(-6px);
    border-color: var(--blue-bright);
    background: rgba(0, 74, 173, .32);
  }
  .stat.reveal.in:hover,
  .stat:hover {
    transform: translateY(-3px);
    border-left-color: #fff;
  }
  .faq-item:hover { border-color: var(--blue); }
  .faq-q:hover { color: var(--blue-ink); }
  .contact-email:hover { border-bottom-color: #fff; }
  .footer-nav a:hover { color: var(--blue); }
  .contact-form.reveal.in:hover,
  .contact-form:hover {
    border-color: var(--blue-bright);
  }
}

/* Mobile tap contrast when hover is unavailable */
@media (hover: none) {
  .nav a { color: var(--text); }
  .btn-primary { background: var(--blue); color: #fff; }
  .btn-ghost { color: var(--text); border-color: var(--text); }
  .stat span { color: var(--text-inv); }
  .method-card p, .contact-copy p, .contact-addr { color: var(--text-inv); }
  .faq-q { color: var(--text); }
}

/* ===== Responsive ===== */
@media (min-width: 981px) {
  .first-screen { height: 100svh; min-height: 100vh; }
  .hero { min-height: 0; }
  .iso-svg { max-height: calc(100svh - 280px); width: auto; max-width: 420px; }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero { padding: 28px 0 8px; }
  .iso-svg { width: min(100%, 340px); }
  .about-grid,
  .faq-wrap,
  .contact-inner { grid-template-columns: 1fr; }
  .method-grid,
  .layer-stack,
  .stats-row { grid-template-columns: 1fr 1fr; }
  .faq-head { position: static; }
  .stats-row { gap: 18px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 4px; align-items: stretch;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    transform: translateY(-120%);
    transition: transform .35s var(--ease);
    z-index: 90;
  }
  .nav.open { transform: translateY(0); }
  .nav a {
    padding: 12px 4px; font-size: 17px; color: var(--text);
    border-bottom: 1px solid var(--line);
  }
  .nav .nav-cta {
    text-align: center; margin-top: 10px;
    border-color: var(--blue); color: var(--blue);
  }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.1rem); }
  .section { padding: 68px 0; }
  .brand-name { font-size: 16px; }
  .svg-labels { display: none; }
  .first-screen { min-height: 0; height: auto; }
  .iso-svg { width: min(92%, 300px); max-height: none; }
  .method-grid,
  .layer-stack,
  .stats-row,
  .about-grid,
  .faq-wrap,
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 18px 0 4px; }
  .hero-actions { gap: 10px; }
  .btn { width: 100%; }
  .about-grid,
  .faq-wrap,
  .contact-inner,
  .method-grid,
  .layer-stack,
  .stats-row { grid-template-columns: 1fr; }
  .stats-band { padding: 22px 0; }
  .stat {
    padding: 14px 4px 14px 16px;
    border-left-width: 3px;
  }
  .stat strong { font-size: 1.55rem; color: #fff; }
  .stat span { color: #E8EEF7; }
  .layer-card, .method-card { padding: 22px 18px; }
  .layer-stack, .method-grid { gap: 14px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .about-grid { gap: 24px; }
  .contact-inner { gap: 32px; }
  .contact-form { padding: 22px 18px; }
  .faq-q { padding: 18px 16px; font-size: 1rem; color: var(--text); }
  .footer-inner { flex-direction: column; gap: 20px; }
  .quote-mark { font-size: 4rem; }
  .iso-svg { width: min(88%, 260px); }
  .iso-floor { opacity: .35; }
  .hero-sub { font-size: 1.02rem; }
}
