/* =============================================================================
   RAYASA — Landing page
   Loaded by index.html only. Every class here starts with `hm-`; shared
   components are reused as they are and only adjusted from inside an `hm-`
   context, so nothing on the inner pages can change because of this file.

   The page spends its boldness in one place — the hero headline beside the
   live terminal — and keeps everything below it quiet: hairlines instead of
   boxes, one text colour per role, headings that sit beside their content
   rather than above it.
   ========================================================================== */

/* --- Rhythm ---------------------------------------------------------------- */
.hm-section {
  padding-block: clamp(4rem, 2.6rem + 5vw, 7.5rem);
}

.hm-section + .hm-section {
  padding-block-start: 0;
}

.hm-section--tight {
  padding-block-end: clamp(3rem, 2rem + 3vw, 5rem);
}

/* A short line of plain text above a heading, in the logotype blue. */
.hm-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-300);
}

.hm-kicker::before {
  content: '';
  inline-size: 1.75rem;
  block-size: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* --- Section headings ------------------------------------------------------ */
.hm-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin-block-end: var(--space-12);
}

.hm-head .h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hm-head--wide {
  max-inline-size: 46rem;
}

.hm-head__lede {
  margin: 0;
  max-inline-size: 38rem;
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--text-muted);
}

.hm-head__lede a {
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.25em;
}

.hm-textlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-start: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-300);
  transition: color var(--dur-fast) var(--ease-out), gap var(--dur-base) var(--ease-out);
}

.hm-textlink:hover {
  color: var(--text);
  gap: var(--space-3);
}

/* Heading on one side, content on the other. RTL puts the heading on the
   right, where the eye starts. */
.hm-split {
  display: grid;
  gap: var(--space-10);
}

.hm-split > * {
  min-inline-size: 0;
}

@media (min-width: 64rem) {
  .hm-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 1rem + 4vw, 6rem);
    align-items: start;
  }

  .hm-split__aside {
    position: sticky;
    inset-block-start: calc(var(--header-h) + var(--space-8));
    margin-block-end: 0;
  }
}

/* --- Hero ------------------------------------------------------------------ */
.hm-hero {
  min-block-size: min(46rem, 100svh);
  padding-block: calc(var(--header-h) + clamp(2.5rem, 1rem + 5vw, 4.5rem)) clamp(2rem, 1rem + 3vw, 4rem);
}

/* The clip sets the mood; the copy carries the page. */
.hm-hero .hero__video {
  opacity: 0.26;
}

.hm-hero .hero__video.is-parked {
  opacity: 0.14;
}

.hm-hero .hero__scrim {
  background:
    linear-gradient(to top, var(--bg) 2%, rgb(4 6 10 / 82%) 40%, rgb(4 6 10 / 55%) 100%),
    linear-gradient(to left, rgb(4 6 10 / 70%), transparent 70%);
}

@media (min-width: 64rem) {
  .hm-hero__inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(3rem, 1rem + 4vw, 5.5rem);
  }
}

.hm-hero__copy {
  gap: var(--space-6);
}

.hm-hero h1 {
  margin: 0;
  max-inline-size: 13em;
  font-size: clamp(2.125rem, 1.35rem + 3vw, 3.875rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hm-hero__lede {
  margin: 0;
  max-inline-size: 36rem;
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--text-soft);
}

/* Three promises, each one a sentence the FAQ answers in full. */
.hm-promises {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
  padding: var(--space-6) 0 0;
  list-style: none;
  border-block-start: 1px solid var(--line);
  inline-size: 100%;
  font-size: var(--text-sm);
  color: var(--text-soft);
}

.hm-promises li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hm-promises svg {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  flex: none;
  padding: 0.2rem;
  border-radius: var(--r-full);
  background: rgb(52 211 153 / 12%);
  color: var(--ok-400);
}

.hm-hero__console {
  display: flex;
  flex-direction: column;
}

.hm-hero__console .terminal {
  box-shadow: var(--shadow-lg), 0 0 0 1px rgb(30 133 230 / 10%), 0 40px 120px -40px rgb(0 83 154 / 55%);
}

.hm-hero__hint {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-align: center;
}

/* --- Services: a list, not a grid of identical boxes ------------------------ */
.hm-svcs {
  display: grid;
  border-block-start: 1px solid var(--line-strong);
}

.hm-svc {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-8);
  border-block-end: 1px solid var(--line);
}

.hm-svc::before {
  content: '';
  position: absolute;
  inset-block: -1px;
  inset-inline-start: 0;
  inline-size: 2px;
  background: var(--brand-400);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur-slow) var(--ease-out);
}

.hm-svc:hover::before,
.hm-svc:focus-within::before {
  transform: scaleY(1);
}

.hm-svc__icon {
  grid-row: span 2;
  margin-inline-start: var(--space-5);
}

.hm-svc__body {
  display: grid;
  gap: var(--space-2);
}

.hm-svc__title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.35;
}

.hm-svc__title a {
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}

.hm-svc__title a:hover {
  color: var(--brand-300);
}

.hm-svc__text {
  margin: 0;
  max-inline-size: 40rem;
  line-height: var(--leading-loose);
  color: var(--text-soft);
}

.hm-svc__tags {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.hm-svc__links {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-6);
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  font-weight: 700;
}

.hm-svc__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--brand-300);
  transition: gap var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.hm-svc__more:hover {
  gap: var(--space-3);
  color: var(--text);
}

.hm-svc__ask {
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

.hm-svc__ask:hover {
  color: var(--text);
}

@media (max-width: 34rem) {
  .hm-svc {
    grid-template-columns: minmax(0, 1fr);
  }

  .hm-svc__icon {
    grid-row: auto;
    margin: 0 0 var(--space-2);
  }

  .hm-svc__links {
    grid-column: 1;
  }
}

/* --- Principles: one panel, four cells -------------------------------------- */
.hm-pillars {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2xl);
  background: var(--line-strong);
}

@media (min-width: 48rem) {
  .hm-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hm-pillar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-1));
}

.hm-pillar__icon {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  margin-block-end: var(--space-3);
  border-radius: var(--r-md);
  background: rgb(30 133 230 / 10%);
  color: var(--brand-300);
}

.hm-pillar__icon svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

.hm-pillar__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 800;
}

.hm-pillar__text {
  margin: 0;
  line-height: var(--leading-loose);
  color: var(--text-soft);
}

/* What the principle means for the person paying for the project. */
.hm-pillar__gain {
  margin: auto 0 0;
  padding-block-start: var(--space-4);
  border-block-start: 1px dashed var(--line-strong);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-300);
}

/* --- Process: a sequence, so it is numbered --------------------------------- */
.hm-steps {
  display: grid;
  gap: var(--space-10) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

@media (min-width: 48rem) {
  .hm-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 72rem) {
  .hm-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hm-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block-start: var(--space-8);
  border-block-start: 1px solid var(--line-strong);
}

/* The rail: each step's top border lights up from the start of the line. */
.hm-step::before {
  content: '';
  position: absolute;
  inset-block-start: -1px;
  inset-inline-start: 0;
  inline-size: 3rem;
  block-size: 1px;
  background: var(--brand-400);
}

.hm-step__num {
  font-size: var(--text-3xl);
  font-weight: 300;
  line-height: 1;
  color: var(--brand-300);
}

.hm-step__title {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xl);
  font-weight: 800;
}

.hm-step__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--text-soft);
}

.hm-step__out {
  display: grid;
  gap: var(--space-1);
  margin: auto 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--line);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.hm-step__out span {
  font-size: var(--text-2xs);
  font-weight: 500;
  color: var(--text-dim);
}

/* --- Doors to the rest of the site ------------------------------------------ */
.hm-doors {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 56rem) {
  .hm-doors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hm-door {
  position: relative;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-12);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--surface-1);
  color: var(--text);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.hm-door:hover {
  border-color: var(--line-brand);
  background: var(--surface-2);
}

.hm-door__label {
  font-size: var(--text-lg);
  font-weight: 800;
}

.hm-door__text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

.hm-door__go {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: var(--space-5);
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  margin-block-start: -1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  color: var(--brand-300);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}

.hm-door__go svg {
  inline-size: 1rem;
  block-size: 1rem;
}

.hm-door:hover .hm-door__go {
  transform: translateX(-0.25rem);
  border-color: var(--line-brand);
}

/* --- Stack: a reference table ----------------------------------------------- */
.hm-stack {
  display: grid;
  margin: 0;
  border-block-start: 1px solid var(--line-strong);
}

.hm-stack__row {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-block-end: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .hm-stack__row {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.hm-stack__row dt {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-soft);
}

.hm-stack__row dd {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  direction: ltr;
  justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (min-width: 40rem) {
  .hm-stack__row dd {
    justify-content: flex-start;
    direction: rtl;
  }

  .hm-stack__row dd span {
    direction: ltr;
    unicode-bidi: isolate;
  }
}

/* --- FAQ inside the split ---------------------------------------------------- */
.hm-faq {
  max-inline-size: none;
}

/* --- Footer newsletter (replaces the old status bar copy) ------------------- */
.hm-newsletter__copy {
  display: grid;
  gap: var(--space-1);
}

.hm-newsletter__title {
  margin: 0;
  font-weight: 800;
  color: var(--text);
}

.hm-newsletter__text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --- Motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .hm-svc::before {
    transition: none;
  }
}

/* =============================================================================
   Contact band and the brief window
   ========================================================================== */
.hm-head--cta {
  align-items: flex-start;
}

.hm-head--cta .btn {
  margin-block-start: var(--space-3);
}

.hm-contact {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 56rem) {
  .hm-contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
  }
}

.hm-contact__channels {
  display: contents;
}

/* The window. A sheet on a phone, a two-pane panel where there is room. */
.bf .bf__panel {
  display: flex;
  flex-direction: column;
  inline-size: min(60rem, 100%);
  block-size: 100%;
  max-block-size: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-xl);
  border-color: var(--line-strong);
  box-shadow: 0 40px 120px -30px rgb(0 0 0 / 90%);
}

.bf.dialog {
  padding: 0;
}

@media (min-width: 56rem) {
  .bf.dialog {
    padding: var(--space-6);
  }

  .bf .bf__panel {
    flex-direction: row;
    block-size: min(42rem, 100%);
  }
}

@media (max-width: 55.99rem) {
  .bf .bf__panel {
    border-radius: 0;
    border-inline: 0;
    border-block-start: 0;
  }
}

.bf .dialog__close {
  inset-block-start: var(--space-4);
  inset-inline-end: var(--space-4);
  z-index: 2;
}

/* --- left pane ------------------------------------------------------------- */
.bf__aside {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
  flex: 0 0 18.5rem;
  padding: var(--space-10) var(--space-8);
  background:
    radial-gradient(120% 70% at 0% 0%, rgb(30 133 230 / 18%), transparent 60%),
    var(--surface-2);
  border-inline-end: 1px solid var(--line);
}

@media (min-width: 56rem) {
  .bf__aside {
    display: flex;
  }
}

.bf__title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: 1.4;
}

.bf__lede {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--text-muted);
}

.bf__points {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-soft);
}

.bf__points li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.bf__points svg {
  flex: none;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  margin-block-start: 0.15rem;
  padding: 0.2rem;
  border-radius: var(--r-full);
  background: rgb(52 211 153 / 12%);
  color: var(--ok-400);
}

.bf__direct {
  margin: auto 0 0;
  padding-block-start: var(--space-4);
  border-block-start: 1px solid var(--line);
  font-size: var(--text-xs);
  line-height: var(--leading-loose);
  color: var(--text-dim);
}

.bf__direct a {
  display: block;
  color: var(--text-soft);
}

/* --- right pane: header, scrolling body, pinned footer ----------------------- */
.bf__main {
  flex: 1;
  min-block-size: 0;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
}

.bf .bf__form {
  flex: 1;
  min-block-size: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* Step track, full width at the top, clear of the close button. */
.bf .bf__progress {
  flex: none;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) 0;
  padding-inline-end: var(--space-16);
}

@media (max-width: 40rem) {
  .bf .bf__progress {
    gap: var(--space-2);
  }

  .bf .brief__tick::before {
    display: none;
  }
}

.bf .brief__tick {
  padding-block-end: var(--space-3);
  font-size: var(--text-xs);
}

/* Each step scrolls on its own; the footer never moves. */
.bf .bf__form .brief__panel {
  flex: 1;
  min-block-size: 0;
  align-content: start;
  overflow-y: auto;
  padding: var(--space-8) var(--space-6) var(--space-6);
}

.bf .bf__form .brief__panel[hidden] {
  display: none;
}

.bf .bf__form .brief__legend {
  font-size: var(--text-xl);
  margin-block-end: var(--space-1);
}

.bf .bf__form .choice {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--r-md);
}

.bf .bf__form .textarea {
  min-block-size: 11rem;
}

.bf .bf__form .brief__nav {
  flex: none;
  padding: var(--space-4) var(--space-6);
  background: var(--surface-2);
  border-block-start: 1px solid var(--line);
}

/* Without the stepper (no script) the form is one long scrolling page. */
.bf .bf__form:not(:has([data-brief-progress]:not([hidden]))) {
  overflow-y: auto;
}

.bf .bf__form:not(:has([data-brief-progress]:not([hidden]))) .brief__panel {
  flex: none;
  overflow: visible;
}

@media (prefers-reduced-motion: no-preference) {
  .bf .bf__panel {
    transform: translateY(1.5rem);
    transition: transform var(--dur-slow) var(--ease-out);
  }

  .bf.is-open .bf__panel {
    transform: none;
  }
}
