/*
  NXT Agency stylesheet, matched to the screen recording.

  Colors marked "sampled" were read from pixels in the recording.
  Colors and fonts marked "PLACEHOLDER" are estimates to confirm later.
*/

:root {
  --color-bg: #ffffff;            /* sampled: page background */
  --color-scan: #f9f9f9;          /* sampled: faint scanline tone */
  --color-text: #000000;          /* sampled: headings, labels, buttons */
  --color-muted: #555555;         /* PLACEHOLDER: secondary text */
  --color-line: #000000;          /* sampled: panel borders, header rule */
  --color-line-soft: #d4d4d4;     /* sampled: startup button outline */
  --color-accent: #000000;        /* sampled: primary button fill */
  --color-accent-text: #ffffff;
  --color-status: #23be56;        /* sampled: status dot */
  --color-menu-bg: #000000;       /* sampled: menu panel */
  --color-menu-text: #ffffff;
  --color-error: #b3261e;         /* PLACEHOLDER */

  /* PLACEHOLDER fonts. Swap for the reference typefaces and add @font-face in assets/fonts/. */
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --container: 1120px;
  --space: clamp(1rem, 5vw, 2rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html.is-startup,
html.nav-open {
  overflow: hidden;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Faint horizontal scanlines behind the page, as in the reference. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    var(--color-bg) 0 2px,
    var(--color-scan) 2px 3px
  );
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 0.4em;
}

p {
  margin: 0 0 1em;
  max-width: 60ch;
}

.container {
  width: min(calc(100% - 2 * var(--space)), var(--container));
  margin-inline: auto;
}

section {
  position: relative;
}

/* Anchor targets land just below the sticky header, not under it. */
section[id] {
  scroll-margin-top: 64px;
}

.skip-link {
  position: absolute;
  left: var(--space);
  top: -100px;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.skip-link:focus {
  top: var(--space);
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header and menu ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo {
  width: 28px;
  height: 28px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  color: var(--color-text);
  cursor: pointer;
}

.nav-toggle-bars {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transition: background-color 0.25s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.nav-toggle-bars::before {
  top: -7px;
}

.nav-toggle-bars::after {
  top: 7px;
}

/* Open state: bars become an X, as in the reference. */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu: full-width black panel with mono items, as in the reference. */
.site-nav {
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem var(--space);
  background: var(--color-menu-bg);
  color: var(--color-menu-text);
}

.site-nav.is-open {
  display: flex;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #333333;
}

.site-nav li {
  border-bottom: 1px solid #333333;
}

.site-nav a {
  display: block;
  padding: 1.1rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  text-decoration: none;
  color: var(--color-menu-text);
  transition: background-color 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  background: var(--color-menu-text);
  color: var(--color-menu-bg);
}

.sound-toggle {
  align-self: flex-start;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-menu-text);
  background: none;
  border: 1px solid #555555;
  cursor: pointer;
}

.sound-toggle:hover {
  border-color: var(--color-menu-text);
}

.sound-toggle[aria-pressed="false"] {
  opacity: 0.6;
}

@media (min-width: 800px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    background: none;
    color: var(--color-text);
  }

  .site-nav ul {
    flex-direction: row;
    border: 0;
  }

  .site-nav li {
    border: 0;
  }

  .site-nav a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    color: var(--color-text);
  }

  .site-nav a:hover,
  .site-nav a[aria-current="true"] {
    background: var(--color-text);
    color: var(--color-bg);
  }

  .sound-toggle {
    min-height: 34px;
    color: var(--color-text);
    border-color: var(--color-text);
  }

  .sound-toggle:hover {
    border-color: var(--color-text);
  }
}

/* ---------- Startup screen ---------- */

.startup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space);
  background: var(--color-bg);
  transition: opacity 0.6s var(--ease);
}

.startup.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.startup-inner {
  width: min(100%, 520px);
  text-align: center;
}

.startup-title {
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.startup-log {
  min-height: 7rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-muted);
  text-align: center;
}

.startup-sub {
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-muted);
  max-width: none;
}

.startup-btn {
  min-width: 260px;
  box-shadow: 0 0 0 4px var(--color-bg), 0 0 0 5px var(--color-line-soft);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-text);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.btn-primary:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(4rem, 14vh, 8rem) 0 clamp(3rem, 8vh, 5rem);
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-status);
}

.hero h1 {
  font-size: clamp(3rem, 15vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

/* Typing line with a block cursor, as in the reference. */
.typing {
  margin: 0;
  max-width: none;
  min-height: 1.6em;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
}

.typing::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.1em;
  vertical-align: -0.15em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-lede {
  margin: 0;
  max-width: 48ch;
  color: var(--color-muted);
  font-size: 1rem;
}

.hero .btn-block {
  max-width: 420px;
  margin-top: 0.5rem;
}

.scroll-cue {
  margin-top: 1.5rem;
  color: var(--color-text);
  animation: bob 1.8s var(--ease) infinite;
}

@keyframes bob {
  50% {
    transform: translateY(6px);
  }
}

@media (min-width: 800px) {
  .hero-inner {
    max-width: 900px;
    margin-inline: auto;
  }
}

/* ---------- Panels (sections below the hero) ---------- */

.panel {
  padding: clamp(3.5rem, 9vw, 6rem) 0;
  border-top: 2px solid var(--color-line);
}

.panel-title {
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.panel-note {
  margin-bottom: 2rem;
  color: var(--color-muted);
}

.stack {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .stack {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .stack {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Cards ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
}

.card-title {
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--color-muted);
}

.project-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--color-line);
}

.project-placeholder {
  display: grid;
  place-items: center;
  background: var(--color-scan);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--color-line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.text-link {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-underline-offset: 4px;
}

.package {
  height: 100%;
}

.package.is-highlighted {
  border-width: 2px;
}

.package-price {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text) !important;
}

.check-list {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
}

.package .btn {
  margin-top: auto;
}

/* ---------- Workflow (why NXT) ---------- */

.workflow {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .workflow {
    grid-template-columns: repeat(3, 1fr);
  }
}

.workflow-step {
  padding: 1.5rem;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
}

.workflow-tag {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.workflow-step p:last-child {
  margin: 0;
  color: var(--color-muted);
}

/* ---------- Custom quote ---------- */

.custom-quote {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px dashed var(--color-line);
  display: grid;
  gap: 1rem;
}

.custom-quote p {
  margin: 0;
  color: var(--color-muted);
}

/* ---------- Quote form ---------- */

.quote-form {
  display: grid;
  gap: 1.5rem;
  max-width: 720px;
}

.form-row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field,
fieldset {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  min-width: 0;
  border: 0;
}

.field label,
legend {
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 0;
}

input::placeholder,
textarea::placeholder {
  color: #9a9a9a;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .check-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-text);
}

/* Honeypot: off-screen for people, still present in the markup for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  max-width: 720px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-line);
}

.form-status.is-error {
  border-color: var(--color-error);
  color: var(--color-error);
}

.package-note {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 2px solid var(--color-line);
  font-size: 0.85rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-id,
.footer-status {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ---------- Scroll reveals (only when JavaScript runs) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

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

  .typing::after {
    animation: none;
  }

  .scroll-cue {
    animation: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
.status-online {
  color: #23be56;
  font-weight: 700;
}
