/* ═══════════════════════════════════════════════════════════════
   NEXT ANTENNAS  |  css/home.css  — homepage only
   Loaded after style.css. Every class is prefixed .nx- so nothing
   here touches the nav, footer or other pages.
   ═══════════════════════════════════════════════════════════════ */

.nx-home {
  --nx-ink:      #0f1722;   /* headings, body              */
  --nx-ink-2:    #3b4656;   /* secondary text              */
  --nx-ink-3:    #6a7586;   /* captions                    */
  --nx-paper:    #ffffff;
  --nx-paper-2:  #f5f7fa;   /* quiet section background    */
  --nx-line:     #e3e7ee;   /* hairlines                   */
  --nx-bench:    #151b22;   /* matches the calculators' UI */
  --nx-bench-2:  #1d252e;
  --nx-bench-ln: #2c3642;
  --nx-blue:     #1a4fd6;   /* brand: actions              */
  --nx-blue-dk:  #1540b0;
  --nx-signal:   #5cc8e8;   /* live numbers on the bench   */
  --nx-copper:   #d58a4a;   /* copper, as in the layouts   */

  --nx-radius-lg: 14px;
  --nx-radius:    8px;
  --nx-wrap:      1200px;

  color: var(--nx-ink);
  background: var(--nx-paper);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.nx-wrap {
  max-width: var(--nx-wrap);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Type ─────────────────────────────────────────────────────── */
.nx-display {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 6.2vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: 0.01em;
  color: var(--nx-ink);
  margin: 0 0 1.4rem;
}

.nx-h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 3.6vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.015em;
  margin: 0 0 1.1rem;
  color: var(--nx-ink);
}

.nx-h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--nx-ink);
}

.nx-lede {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--nx-ink-2);
  max-width: 34em;
  margin: 0 0 2rem;
}

.nx-kicker {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nx-blue);
  margin: 0 0 0.35rem;
}

.nx-home p { margin: 0 0 1rem; }

/* ── Buttons and links ────────────────────────────────────────── */
.nx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.4rem;
  margin-top: 1.8rem;
}

.nx-btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: var(--nx-radius);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.nx-btn--primary { background: var(--nx-blue); color: #fff; }
.nx-btn--primary:hover { background: var(--nx-blue-dk); }
.nx-btn--ghost { border: 1.5px solid var(--nx-line); color: var(--nx-ink); }
.nx-btn--ghost:hover { border-color: var(--nx-ink); }

.nx-link {
  color: var(--nx-blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.nx-link:hover { color: var(--nx-blue-dk); }

.nx-home a:focus-visible,
.nx-home button:focus-visible,
.nx-home input:focus-visible,
.nx-home select:focus-visible {
  outline: 2px solid var(--nx-blue);
  outline-offset: 3px;
}

/* ── Screenshot frames ────────────────────────────────────────── */
.nx-shot {
  display: block;
  background: var(--nx-bench);
  border: 1px solid #0b0f14;
  border-radius: var(--nx-radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -22px rgba(15,23,34,0.55);
}
.nx-shot img { display: block; width: 100%; height: auto; }
.nx-video { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; background: #0b111a; }
.nx-shot:hover { border-color: var(--nx-blue); }

.nx-home figure { margin: 0; }
.nx-home figcaption {
  font-size: 0.85rem;
  color: var(--nx-ink-3);
  margin-top: 0.6rem;
}

/* ═════════════ HERO ═════════════ */
.nx-hero {
  padding: calc(68px + 4.5rem) 0 5rem;   /* clears the fixed nav */
  border-bottom: 1px solid var(--nx-line);
  background: var(--nx-paper);
  position: relative;
  overflow: hidden;
}
/* faint board grid, the one decorative layer on the page */
.nx-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--nx-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--nx-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,0.5) 45%, transparent 75%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,0.5) 45%, transparent 75%);
  pointer-events: none;
}

.nx-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
}

/* Quick bench */
.nx-bench {
  background: var(--nx-bench);
  color: #e6ebf2;
  border-radius: var(--nx-radius-lg);
  padding: 1.4rem 1.5rem 1.2rem;
  max-width: 560px;
}

.nx-bench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem 1rem;
  margin-bottom: 1.1rem;
}
.nx-bench-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.nx-bench-presets { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nx-bench-presets button {
  font: 500 0.8rem/1 'DM Sans', sans-serif;
  color: #b9c3d0;
  background: transparent;
  border: 1px solid var(--nx-bench-ln);
  border-radius: 100px;
  padding: 0.42rem 0.7rem;
  cursor: pointer;
}
.nx-bench-presets button:hover { color: #fff; border-color: #4a5868; }
.nx-bench-presets button[aria-pressed="true"] {
  color: var(--nx-bench);
  background: var(--nx-signal);
  border-color: var(--nx-signal);
}

.nx-bench-inputs {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.nx-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.nx-field > span:first-child { font-size: 0.82rem; color: #9aa6b5; }

.nx-input-row { display: flex; min-width: 0; }
.nx-bench input,
.nx-bench select {
  font: 500 0.95rem/1.2 'DM Sans', sans-serif;
  color: #fff;
  background: var(--nx-bench-2);
  border: 1px solid var(--nx-bench-ln);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  min-width: 0;
  width: 100%;
}
.nx-bench input {
  font-family: 'Space Mono', monospace;
  border-radius: 6px 0 0 6px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.nx-bench input::-webkit-inner-spin-button,
.nx-bench input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.nx-input-row select { width: auto; flex: 0 0 auto; min-width: 4.8rem; border-left: 0; border-radius: 0 6px 6px 0; }

.nx-bench-out {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--nx-bench-ln);
  border: 1px solid var(--nx-bench-ln);
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
.nx-out {
  display: block;
  background: var(--nx-bench);
  padding: 0.85rem 1rem;
  text-decoration: none;
  transition: background-color 0.15s;
}
.nx-out:hover { background: var(--nx-bench-2); }
.nx-out dt { font-size: 0.8rem; color: #9aa6b5; margin: 0 0 0.25rem; }
.nx-out dd {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--nx-signal);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nx-bench-note {
  font-size: 0.8rem;
  color: #8592a3;
  margin: 0.85rem 0 0 !important;
}

/* Hero figure: two stacked "windows" */
.nx-hero-fig {
  position: relative;
  padding-bottom: 3.5rem;
}
.nx-shot--hero { aspect-ratio: 560 / 340; }
.nx-shot--hero img { height: 100%; object-fit: cover; }
.nx-shot--inset {
  position: absolute;
  left: -2.5rem;
  bottom: 0;
  width: 42%;
  border: 1px solid #0b0f14;
  box-shadow: 0 0 0 6px var(--nx-paper), 0 20px 40px -18px rgba(15,23,34,0.6);
}
.nx-hero-fig figcaption {
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  width: 52%;
  text-align: right;
  margin: 0;
}

/* ═════════════ TOOL FEATURE ROWS ═════════════ */
.nx-tool { padding: 6rem 0; }
.nx-tool--micro { background: var(--nx-paper-2); border-block: 1px solid var(--nx-line); }

.nx-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 4.5rem;
  align-items: center;
}
.nx-tool-grid--flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.nx-tool-grid--flip .nx-tool-copy { order: 2; }

.nx-tool-copy > p { color: var(--nx-ink-2); max-width: 36em; }

/* Patch: the five workflow steps really are a sequence */
.nx-steps {
  list-style: none;
  counter-reset: nx-step;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--nx-line);
}
.nx-steps li {
  counter-increment: nx-step;
  position: relative;
  padding: 0.7rem 0 0.7rem 2.4rem;
  border-bottom: 1px solid var(--nx-line);
  color: var(--nx-ink-2);
  font-size: 0.95rem;
}
.nx-steps li::before {
  content: counter(nx-step);
  position: absolute;
  left: 0; top: 0.72rem;
  width: 1.55rem; height: 1.55rem;
  border-radius: 50%;
  background: var(--nx-ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.nx-steps strong { color: var(--nx-ink); font-weight: 700; }

/* Patch mosaic: polar large, S11 offset beneath */
.nx-mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 6rem auto;   /* middle row = overlap band */
  column-gap: 1.2rem;
}
.nx-mosaic-a { grid-column: 1 / 10; grid-row: 1 / 3; }
.nx-mosaic-a figcaption { max-width: 38%; }
.nx-mosaic-b { grid-column: 6 / 13; grid-row: 2 / 4; position: relative; }
.nx-mosaic-b .nx-shot { box-shadow: 0 0 0 6px var(--nx-paper), 0 20px 40px -18px rgba(15,23,34,0.6); }

/* Microstrip facts */
.nx-facts {
  display: grid;
  gap: 0;
  margin: 1.4rem 0 0;
  border-top: 1px solid var(--nx-line);
}
.nx-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--nx-line);
  font-size: 0.95rem;
}
.nx-facts dt { color: var(--nx-ink-2); }
.nx-facts dd { margin: 0; font-weight: 600; color: var(--nx-ink); text-align: right; }

.nx-micro-figs {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}
.nx-micro-figs > figure:first-child { grid-column: 1 / 13; }
.nx-micro-figs > figure:first-child figcaption { max-width: 44%; }
.nx-micro-small {
  grid-column: 7 / 13;
  margin-top: -3rem !important;
  position: relative;
}
.nx-micro-small .nx-shot { box-shadow: 0 0 0 6px var(--nx-paper-2), 0 20px 40px -18px rgba(15,23,34,0.6); }

/* ═════════════ TRIO ═════════════ */
.nx-trio { padding: 6rem 0 5rem; }
.nx-trio .nx-h2 { margin-bottom: 2.4rem; }

.nx-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.nx-shot--square { aspect-ratio: 1.1 / 1; }
.nx-shot--square img { height: 100%; object-fit: cover; object-position: center top; }

.nx-trio-item h3 { font-size: 1.2rem; font-weight: 700; margin: 1.2rem 0 0.45rem; }
.nx-trio-item h3 a { color: var(--nx-ink); text-decoration: none; }
.nx-trio-item h3 a:hover { color: var(--nx-blue); text-decoration: underline; text-underline-offset: 3px; }
.nx-trio-item p { color: var(--nx-ink-2); font-size: 0.97rem; }

/* ═════════════ INDEX LISTS ═════════════ */
.nx-index { padding: 4.5rem 0 5rem; border-top: 1px solid var(--nx-line); }
.nx-index-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
}
.nx-list { list-style: none; margin: 0 0 1.2rem; padding: 0; border-top: 1px solid var(--nx-line); }
.nx-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--nx-line);
}
.nx-list a { color: var(--nx-ink); font-weight: 600; text-decoration: none; }
.nx-list a:hover { color: var(--nx-blue); text-decoration: underline; text-underline-offset: 3px; }
.nx-list span { color: var(--nx-ink-3); font-size: 0.88rem; text-align: right; }

/* ═════════════ PRINCIPLES + CLOSING ═════════════ */
.nx-principles {
  background: var(--nx-bench);
  color: #c9d2de;
  padding: 5.5rem 0;
}
.nx-principles .nx-h2 { color: #fff; margin-bottom: 2.4rem; }
.nx-principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}
.nx-principles-grid > div { border-top: 2px solid var(--nx-signal); padding-top: 1rem; }
.nx-principles h3 { color: #fff; font-size: 1.1rem; font-weight: 700; margin: 0 0 0.5rem; }
.nx-principles p { font-size: 0.97rem; color: #a9b4c3; }

.nx-closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--nx-bench-ln);
}
.nx-closing p { font-size: 1.3rem; font-weight: 600; color: #fff; margin: 0; }
.nx-closing .nx-actions { margin: 0; }
.nx-principles .nx-btn--ghost { color: #fff; border-color: #3d4a5a; }
.nx-principles .nx-btn--ghost:hover { border-color: #fff; }

/* ═════════════ ONE LOAD MOMENT ═════════════ */
@media (prefers-reduced-motion: no-preference) {
  .nx-hero-fig .nx-shot--hero  { animation: nx-rise 0.7s 0.1s cubic-bezier(.2,.7,.2,1) both; }
  .nx-hero-fig .nx-shot--inset { animation: nx-rise 0.7s 0.3s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes nx-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ═════════════ RESPONSIVE ═════════════ */
@media (max-width: 1024px) {
  .nx-hero-grid,
  .nx-tool-grid,
  .nx-tool-grid--flip { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .nx-tool-grid--flip .nx-tool-copy { order: 0; }
  .nx-bench { max-width: none; }
  .nx-hero-fig { max-width: 640px; margin-left: 2.5rem; }
  .nx-trio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

@media (max-width: 760px) {
  .nx-wrap { padding: 0 1rem; }
  .nx-hero { padding: calc(68px + 2.5rem) 0 3.5rem; }
  .nx-lede { font-size: 1.05rem; }
  .nx-bench { padding: 1.1rem 1rem 1rem; }
  .nx-bench-inputs { grid-template-columns: 1fr; }
  .nx-out dd { font-size: 1rem; }
  .nx-hero-fig { margin-left: 0; padding-bottom: 0; }
  .nx-shot--inset { display: none; }
  .nx-hero-fig figcaption { position: static; width: auto; text-align: left; margin-top: 0.6rem; }

  .nx-tool { padding: 4rem 0; }
  .nx-mosaic, .nx-micro-figs { display: block; }
  .nx-mosaic-b, .nx-micro-small { margin-top: 1.5rem !important; }
  .nx-mosaic-b .nx-shot, .nx-micro-small .nx-shot { box-shadow: 0 18px 40px -22px rgba(15,23,34,0.55); }
  .nx-mosaic-a figcaption,
  .nx-micro-figs > figure:first-child figcaption { max-width: none; }

  .nx-trio { padding: 4rem 0 3.5rem; }
  .nx-trio-grid, .nx-index-grid, .nx-principles-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .nx-list li { flex-direction: column; gap: 0.1rem; }
  .nx-list span { text-align: left; }
  .nx-principles { padding: 4rem 0; }
  .nx-closing { margin-top: 3rem; }
}
