/* Fexari.online — Dark Modular Control Room */

:root {
  --carbon: #090B0C;
  --graphite: #121617;
  --steel: #1D2425;
  --lime: #C7F36B;
  --cyan: #78C9C8;
  --dust: #8B9694;
  --pale: #D7DEDB;
  --white: #F5F7F4;
  --border: #2B3434;
  --olive: #263022;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max: 1180px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--carbon);
  color: var(--pale);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Subtle technical grid — not decorative noise */
.grid-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
}

main,
.nav,
.footer {
  position: relative;
  z-index: 1;
}

/* —— Typography helpers —— */
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}

.label--dim {
  color: var(--border);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 700;
  max-width: 10ch;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  max-width: 16ch;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

p {
  color: var(--dust);
  max-width: 52ch;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn--primary {
  background: var(--lime);
  color: var(--carbon);
  border-color: var(--lime);
}

.btn--primary:hover {
  background: #d4f88a;
  border-color: #d4f88a;
  transform: translateY(-1px);
}

.btn--primary:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--lg {
  padding: 0.9rem 1.4rem;
  font-size: 0.95rem;
}

.btn--block {
  width: 100%;
}

.text-link {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--lime);
  transition: color 0.2s var(--ease);
}

.text-link:hover {
  color: var(--white);
}

/* —— Status —— */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  animation: pulse-dot 2.4s var(--ease) infinite;
}

.status-pill__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dust);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* —— Navigation —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--carbon);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
}

.nav__mark {
  flex-shrink: 0;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dust);
  transition: color 0.2s var(--ease);
}

.nav__links a:hover {
  color: var(--white);
}

.nav__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.nav__contact {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--pale);
  transition: color 0.2s var(--ease);
}

.nav__contact:hover {
  color: var(--lime);
}

.nav__menu {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav__menu span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--white);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--graphite);
  padding: 0.5rem 1.5rem 1.25rem;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 500;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--pale);
}

.mobile-menu .btn {
  margin-top: 1rem;
  border-bottom: none;
}

/* —— Hero —— */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}

.hero__frame {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-rows: auto 1fr;
  gap: 2rem 3rem;
  align-items: center;
}

.hero__meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  animation: fade-up 0.7s var(--ease) both;
}

.hero__content {
  animation: fade-up 0.8s var(--ease) 0.1s both;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--lime);
  margin-bottom: 0.75rem;
  max-width: none;
}

.hero__lede {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--pale);
  max-width: 38ch;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__console {
  align-self: stretch;
  display: flex;
  animation: fade-up 0.9s var(--ease) 0.2s both;
}

.console {
  width: 100%;
  background: var(--graphite);
  border: 1px solid var(--border);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 420px;
}

.console__rail {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--steel);
}

.console__bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 72px;
  margin-top: 0.85rem;
}

.console__bars span {
  flex: 1;
  height: var(--h);
  background: var(--olive);
  border-top: 2px solid var(--lime);
  animation: bar-rise 1.2s var(--ease) both;
}

.console__bars span:nth-child(odd) {
  border-top-color: var(--cyan);
  background: #1a2a2a;
}

.console__bars span:nth-child(1) { animation-delay: 0.15s; }
.console__bars span:nth-child(2) { animation-delay: 0.22s; }
.console__bars span:nth-child(3) { animation-delay: 0.29s; }
.console__bars span:nth-child(4) { animation-delay: 0.36s; }
.console__bars span:nth-child(5) { animation-delay: 0.43s; }
.console__bars span:nth-child(6) { animation-delay: 0.5s; }
.console__bars span:nth-child(7) { animation-delay: 0.57s; }
.console__bars span:nth-child(8) { animation-delay: 0.64s; }

@keyframes bar-rise {
  from {
    transform: scaleY(0.15);
    transform-origin: bottom;
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }
}

.console__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.console__cell {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.console__cell:nth-child(2n) {
  border-right: none;
}

.console__cell:nth-child(n + 3) {
  border-bottom: none;
}

.console__cell strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
}

.console__cell em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dust);
  letter-spacing: 0.06em;
}

.console__cell--active {
  background: var(--olive);
}

.console__cell--active strong {
  color: var(--lime);
}

.console__stream {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--carbon);
}

.stream-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dust);
  letter-spacing: 0.02em;
  animation: stream-in 0.6s var(--ease) both;
}

.stream-line:nth-child(1) { animation-delay: 0.8s; }
.stream-line:nth-child(2) { animation-delay: 1s; }
.stream-line:nth-child(3) { animation-delay: 1.2s; }
.stream-line:nth-child(4) { animation-delay: 1.4s; }

.stream-line span {
  color: var(--cyan);
  margin-right: 0.65rem;
}

.stream-line--accent {
  color: var(--pale);
}

.stream-line--accent span {
  color: var(--lime);
}

@keyframes stream-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding: 6rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section--alt {
  background: var(--graphite);
}

.section__head {
  max-width: var(--max);
  margin: 0 auto 3.5rem;
}

.section__head .label {
  margin-bottom: 1rem;
}

.section__head h2 {
  margin-bottom: 1.1rem;
}

.section__head p {
  font-size: 1.05rem;
  color: var(--pale);
}

/* —— Platform —— */
.platform {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.platform__panel {
  background: var(--carbon);
  padding: 2rem 1.75rem;
  min-height: 240px;
}

.platform__panel--wide {
  background: var(--steel);
}

.platform__panel .label {
  margin-bottom: 1.25rem;
  color: var(--cyan);
}

.platform__panel p {
  font-size: 0.95rem;
}

.spec-list {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.spec-list span {
  color: var(--dust);
}

.spec-list strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--lime);
}

/* —— Solutions —— */
.solutions {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.solution {
  padding: 0 2rem 0 0;
  margin-right: 2rem;
  border-right: 1px solid var(--border);
}

.solution:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.solution__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--lime);
  margin-bottom: 1.5rem;
}

.solution p {
  font-size: 0.95rem;
}

/* —— Capabilities —— */
.caps {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.cap {
  padding: 2rem 1.75rem;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.cap:nth-child(3n + 1) {
  border-left: none;
  padding-left: 0;
}

.cap:nth-child(-n + 3) {
  border-top: none;
  padding-top: 0;
}

.cap__icon {
  margin-bottom: 1.25rem;
}

.cap p {
  font-size: 0.92rem;
}

/* —— Metrics / Resources —— */
.metrics {
  max-width: var(--max);
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.metric {
  background: var(--carbon);
  padding: 1.75rem 1.5rem;
}

.metric .label {
  margin-bottom: 1rem;
  color: var(--cyan);
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.metric p {
  font-size: 0.85rem;
  max-width: 20ch;
}

.resource-row {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.resource {
  display: block;
  padding: 1.75rem 0;
  border-top: 2px solid var(--border);
  transition: border-color 0.2s var(--ease);
}

.resource:hover {
  border-top-color: var(--lime);
}

.resource .label {
  margin-bottom: 1rem;
}

.resource p {
  font-size: 0.92rem;
}

/* —— CTA —— */
.cta {
  background: var(--carbon);
}

.cta__panel {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: var(--graphite);
  border: 1px solid var(--border);
  padding: 3rem;
}

.cta__copy .label {
  margin-bottom: 1rem;
  color: var(--lime);
}

.cta__copy h2 {
  max-width: 14ch;
  margin-bottom: 1.1rem;
}

.cta__copy > p {
  color: var(--pale);
  margin-bottom: 1.75rem;
}

.cta__checks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta__checks li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--dust);
}

.cta__checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--lime);
}

.cta__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--steel);
  border: 1px solid var(--border);
  padding: 1.75rem;
}

.cta__form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cta__form input,
.cta__form select {
  background: var(--carbon);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
  appearance: none;
  border-radius: 0;
}

.cta__form input::placeholder {
  color: #5a6563;
}

.cta__form input:focus,
.cta__form select:focus {
  border-color: var(--cyan);
}

.cta__form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--dust) 50%),
    linear-gradient(135deg, var(--dust) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--pale);
}

.form-note {
  font-size: 0.75rem;
  color: var(--dust);
  max-width: none;
  text-align: center;
}

/* —— Footer —— */
.footer {
  background: var(--graphite);
  border-top: 1px solid var(--border);
}

.footer__top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
}

.footer__brand p {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__cols .label {
  display: block;
  margin-bottom: 1rem;
  color: var(--cyan);
}

.footer__cols a {
  display: block;
  font-size: 0.9rem;
  color: var(--dust);
  margin-bottom: 0.65rem;
  transition: color 0.2s var(--ease);
}

.footer__cols a:hover {
  color: var(--white);
}

.footer__meta {
  display: block;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dust);
}

.footer__bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dust);
  text-transform: uppercase;
}

/* —— Responsive —— */
@media (max-width: 980px) {
  .nav__inner {
    grid-template-columns: 1fr auto;
  }

  .nav__links {
    display: none;
  }

  .nav__contact,
  .nav__actions .btn--primary {
    display: none;
  }

  .nav__menu {
    display: flex;
  }

  .hero__frame {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 1.5rem;
  }

  .hero {
    min-height: auto;
  }

  .console {
    min-height: 360px;
  }

  .platform {
    grid-template-columns: 1fr;
  }

  .solutions {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .solution {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
  }

  .solution:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .caps {
    grid-template-columns: 1fr 1fr;
  }

  .cap {
    border-left: 1px solid var(--border);
    padding: 1.75rem 1.25rem;
  }

  .cap:nth-child(3n + 1) {
    border-left: 1px solid var(--border);
    padding-left: 1.25rem;
  }

  .cap:nth-child(odd) {
    border-left: none;
    padding-left: 0;
  }

  .cap:nth-child(-n + 3) {
    border-top: 1px solid var(--border);
    padding-top: 1.75rem;
  }

  .cap:nth-child(-n + 2) {
    border-top: none;
    padding-top: 0;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .resource-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cta__panel {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 1.25rem;
  }

  .nav__inner {
    padding: 0 1.25rem;
  }

  .status-pill__label {
    display: none;
  }

  .hero__frame {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
  }

  .console__grid {
    grid-template-columns: 1fr;
  }

  .console__cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .console__cell:last-child {
    border-bottom: none;
  }

  .caps {
    grid-template-columns: 1fr;
  }

  .cap,
  .cap:nth-child(3n + 1),
  .cap:nth-child(odd) {
    border-left: none;
    padding: 1.75rem 0;
    border-top: 1px solid var(--border);
  }

  .cap:first-child {
    border-top: none;
    padding-top: 0;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .footer__cols {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
