/* ═══════════════════════════════════════════════════════════════════
   DA ArchiTech Pro — Design System
   Monochrome editorial UI. Color is reserved for generated content.
   ═══════════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:            #09090b;
  --bg-surface:    #18181b;
  --bg-elevated:   #27272a;

  /* Text */
  --text:          #fafafa;
  --text-muted:    #a1a1aa;
  --text-dim:      #71717a;

  /* Borders */
  --border:        #27272a;
  --border-hover:  #3f3f46;

  /* Accent (sparingly) */
  --accent:        #e4e4e7;
  --accent-strong: #fafafa;
  --accent-color:  #a78bfa;
  --success:       #4ade80;
  --danger:        #f87171;

  /* Shadows — minimal */
  --shadow-card:   0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-float:  0 4px 12px rgba(0, 0, 0, 0.4);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms ease;
  --t-base: 200ms ease;
  --t-slow: 350ms ease;

  /* Typography */
  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "kern";
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

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

a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--text); }

::selection { background: rgba(167, 139, 250, 0.2); color: var(--text); }

/* ── SCROLLBAR ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.nx-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nx-section {
  position: relative;
  padding: 6rem 0;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────────── */
.nx-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.nx-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.nx-heading--xl  { font-size: clamp(2.5rem, 8vw, 5.5rem); letter-spacing: -0.04em; }
.nx-heading--lg  { font-size: clamp(2rem, 5vw, 3rem); }
.nx-heading--md  { font-size: clamp(1.5rem, 3vw, 2rem); }
.nx-heading--sm  { font-size: 1.25rem; font-family: var(--font-body); font-weight: 600; }

.nx-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 540px;
}

.nx-text--lg { font-size: 1.15rem; }

/* ── NAVBAR ─────────────────────────────────────────────────────── */
.nx-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(9, 9, 11, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nx-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  height: 3.5rem;
}

.nx-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nx-nav__logo-icon {
  width: clamp(30px, 2.2vw, 36px);
  height: clamp(30px, 2.2vw, 36px);
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.nx-nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nx-nav__links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color var(--t-fast);
}

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

.nx-nav__cta {
  padding: 0.45rem 1.25rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--t-base);
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.nx-nav__cta:hover {
  transform: scale(1.02);
  color: var(--bg);
}

/* Mobile hamburger */
.nx-nav__hamburger {
  display: none;
  background: none; border: none; cursor: pointer; padding: 0.5rem;
  color: var(--text);
}

@media (max-width: 768px) {
  .nx-nav__links { display: none; }
  .nx-nav__links.show {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 3.5rem; left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .nx-nav__hamburger { display: block; }
}

/* ── HERO ───────────────────────────────────────────────────────── */
.nx-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(3.5rem + 6rem) 0 6rem;
  overflow: hidden;
}

.nx-hero__slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nx-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms var(--ease), transform 1600ms var(--ease);
}

.nx-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.nx-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.02) saturate(1.05);
}

.nx-hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 12% 86%, rgba(9, 9, 11, 0.15), transparent 70%),
    linear-gradient(90deg, rgba(9, 9, 11, 0.82) 0%, rgba(9, 9, 11, 0.6) 45%, rgba(9, 9, 11, 0.82) 100%);
}

.nx-hero__content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.nx-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
}

.nx-hero__title em {
  font-style: italic;
  color: var(--text-dim);
}

.nx-hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-top: 1.5rem;
  line-height: 1.7;
}

.nx-hero__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.nx-promptbox {
  margin-top: 1.25rem;
  background: rgba(24, 24, 27, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  padding: 1rem;
  max-width: 680px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.nx-promptbox__label {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.nx-promptbox__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nx-promptbox__counter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.nx-promptbox__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.nx-promptbox__input {
  min-height: 2.75rem;
}

.nx-promptbox__row--textarea {
  align-items: start;
}

.nx-promptbox__textarea {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.5;
}

.nx-promptbox__tools {
  margin-top: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  background: rgba(9, 9, 11, 0.45);
  overflow: hidden;
}

.nx-promptbox__tools summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-promptbox__tools summary::-webkit-details-marker {
  display: none;
}

.nx-promptbox__tools summary::after {
  content: '+';
  float: right;
  color: var(--text-dim);
}

.nx-promptbox__tools[open] summary::after {
  content: '-';
}

.nx-promptbox__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem;
}

.nx-promptbox__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nx-promptbox__field span {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.nx-promptbox__utility {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.75rem 0.75rem;
}

.nx-promptbox__status {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--r-xs);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.nx-promptbox__status.is-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.nx-promptbox__status.is-success {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.nx-promptbox__chips {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nx-promptbox__chip {
  border: 1px solid var(--border-hover);
  background: rgba(9, 9, 11, 0.45);
  color: var(--text-muted);
  border-radius: var(--r-pill);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--t-fast);
}

.nx-promptbox__chip:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.nx-slider-controls {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--r-pill);
  background: rgba(9, 9, 11, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nx-slider-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--border-hover);
  background: rgba(24, 24, 27, 0.65);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.nx-slider-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.nx-slider-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
}

.nx-slider-dot.is-active {
  transform: scale(1.2);
  background: var(--text);
}

/* ── BUTTONS ────────────────────────────────────────────────────── */
.nx-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.75rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--t-base);
  text-decoration: none;
  line-height: 1;
}

.nx-btn:focus-visible {
  outline: dashed 2px var(--text-dim);
  outline-offset: 3px;
}

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

.nx-btn--primary:hover {
  transform: scale(1.02);
  color: var(--bg);
}

.nx-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

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

.nx-btn--danger {
  background: var(--danger);
  color: var(--bg);
}

.nx-btn--lg { padding: 0.75rem 2rem; font-size: 0.95rem; }
.nx-btn--sm { padding: 0.45rem 1.15rem; font-size: 0.8rem; }

/* ── CARDS ──────────────────────────────────────────────────────── */
.nx-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.75rem;
  transition: border-color var(--t-base);
}

.nx-card:hover {
  border-color: var(--border-hover);
}

.nx-card__icon {
  width: 2.25rem; height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

.nx-card__icon svg { width: 20px; height: 20px; stroke-width: 1.5; }

.nx-card__title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.nx-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── GRID ───────────────────────────────────────────────────────── */
.nx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1024px) { .nx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .nx-grid { grid-template-columns: 1fr; } }

/* ── DIVIDER ────────────────────────────────────────────────────── */
.nx-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── STEPS ──────────────────────────────────────────────────────── */
.nx-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.nx-step { position: relative; }

.nx-step__number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
}

.nx-step__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.nx-step__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .nx-steps { grid-template-columns: 1fr; gap: 2rem; }
}

/* ── CTA SECTION ────────────────────────────────────────────────── */
.nx-cta {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.nx-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.nx-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
}

.nx-footer__brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nx-footer__brand-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.nx-footer__logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.nx-footer__desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 280px;
}

.nx-footer__heading {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
}

.nx-footer__link {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  transition: color var(--t-fast);
}

.nx-footer__link:hover { color: var(--text); }

.nx-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .nx-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .nx-footer__bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .nx-footer__grid { grid-template-columns: 1fr; }
}

/* ── GALLERY HEADER ─────────────────────────────────────────────── */
.nx-gallery-header {
  background: rgba(9, 9, 11, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ── FORM ELEMENTS ──────────────────────────────────────────────── */
.nx-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--t-fast);
}

.nx-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.15);
}

.nx-input::placeholder { color: var(--text-dim); }

/* ── ADMIN LOGIN ────────────────────────────────────────────────── */
.nx-login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 2rem;
  width: min(100%, 380px);
}

/* ── UTILITIES ──────────────────────────────────────────────────── */
.nx-reveal {
  opacity: 0;
  transform: translateY(12px);
}

.nx-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.nx-glass-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

/* ── LOADER ─────────────────────────────────────────────────────── */
.nx-loader {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--text-dim);
  animation: nx-spin 0.7s linear infinite;
}

@keyframes nx-spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nx-hero { min-height: auto; padding: calc(3.5rem + 4rem) 0 4rem; }
  .nx-section { padding: 4rem 0; }
  .nx-promptbox__row { grid-template-columns: 1fr; }
  .nx-promptbox__grid { grid-template-columns: 1fr; }
  .nx-promptbox__topline { align-items: baseline; }
  .nx-slider-controls { width: 100%; justify-content: space-between; }
}

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