/* ==========================================================================
   NIGHTWING — BASE
   Reset, root element behaviour, typography, and small utility classes.
   ========================================================================== */

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

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

/* Prevent horizontal scroll under any circumstance */
html, body { max-width: 100%; overflow-x: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, button { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

::selection {
  background: var(--color-accent);
  color: var(--white);
}

/* Visible, accessible focus ring for keyboard users everywhere */
:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar (progressive enhancement, webkit only) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--ink-800);
  border-radius: var(--r-pill);
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--blue-800); }

/* ---- Layout utilities ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { position: relative; padding-block: var(--section-pad-y); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -60px;
  background: var(--color-accent);
  color: var(--white);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm);
  z-index: 2000;
  transition: top var(--dur-base) var(--ease-out);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

/* ---- Section heading kit (shared across sections) ---------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-bright);
  margin-bottom: var(--sp-3);
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent-bright);
  box-shadow: 0 0 12px 2px var(--color-accent-bright);
  flex-shrink: 0;
}

.section-head { max-width: 720px; margin-bottom: var(--sp-9); }
.section-head.center { margin-inline: auto; text-align: center; }

.section-title {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--color-text);
}
.section-title .accent { color: var(--color-accent-bright); }

.section-desc {
  margin-top: var(--sp-4);
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  max-width: 56ch;
}
.section-head.center .section-desc { margin-inline: auto; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9rem 1.7rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  white-space: nowrap;
  min-height: 48px;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-accent);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(20,112,214,0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20,112,214,0.42);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-ghost:hover {
  border-color: var(--color-accent-bright);
  background: rgba(20,112,214,0.08);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.6rem 1.1rem; font-size: var(--fs-xs); min-height: 38px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Chips / tags -------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  background: var(--ink-800);
  border: 1px solid var(--color-border);
  color: var(--grey-300);
}

/* ---- Placeholder media block (used wherever a real photo is pending) ---- */
.ph-block {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.028) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--ink-850) 0%, var(--ink-900) 100%);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--r-lg);
  color: var(--grey-500);
  overflow: hidden;
  min-height: 160px;
}
.ph-block .ph-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--sp-4);
}
.ph-block .ph-icon {
  width: 34px; height: 34px;
  opacity: 0.6;
}
.ph-block .ph-dims {
  color: var(--grey-700);
  font-size: 0.62rem;
}
