/* Nightshift Crafts — studio site
   Dark industrial / craft aesthetic. Self-contained. No external fonts or scripts. */

:root {
  --bg: #0B0E14;
  --bg-elevated: #10141C;
  --card: #131822;
  --border: #232A3A;
  --border-strong: #2E3648;
  --text: #F3F4F6;
  --muted: #9CA3AF;
  --faint: #6B7280;
  --accent: #F59E0B;
  --accent-hover: #FBBF24;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-glow: rgba(245, 158, 11, 0.22);
  --live: #34D399;
  --live-soft: rgba(52, 211, 153, 0.12);
  --radius: 14px;
  --radius-sm: 999px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --max: 1080px;
  --header-h: 68px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(245, 158, 11, 0.07), transparent 60%),
    radial-gradient(700px 420px at 100% 8%, rgba(35, 42, 58, 0.7), transparent 55%),
    linear-gradient(180deg, #0B0E14 0%, #0B0E14 100%);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  background: var(--accent);
  color: #111827;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.brand-name {
  font-weight: 650;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: 72px 0 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 5.4vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 14ch;
}

.hero .lede {
  margin: 0 0 32px;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #111827;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #111827;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--card);
  color: var(--text);
  border-color: #3A4358;
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-hover);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 28px 0 72px;
}

.section-head {
  margin-bottom: 28px;
  max-width: 40rem;
}
.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.section-head p {
  margin: 0;
  color: var(--muted);
}

/* App cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.app-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.app-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.app-card p {
  margin: 0 0 16px;
  color: var(--muted);
  flex: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex: 0 0 auto;
}
.badge-live {
  color: var(--live);
  background: var(--live-soft);
}
.badge-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}
.badge-dev {
  color: var(--muted);
  background: rgba(156, 163, 175, 0.1);
  border: 1px solid var(--border);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.disclaimer {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: #D1D5DB;
  font-size: 0.82rem;
  line-height: 1.5;
  border-radius: 0 8px 8px 0;
}

.coming-note {
  margin-top: auto;
  color: var(--faint);
  font-size: 0.88rem;
}

/* Principles */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.pillar-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  color: var(--accent);
}
.pillar h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}
.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Support */
.support-panel {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.05), transparent 42%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 24px;
  display: grid;
  gap: 18px;
}
.support-panel h2 { margin: 0 0 6px; letter-spacing: -0.03em; }
.support-panel p { margin: 0; color: var(--muted); max-width: 40rem; }
.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.mail-link {
  font-family: var(--mono);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* Legal / inner pages */
.page-main {
  position: relative;
  z-index: 1;
  padding: 48px 0 80px;
}
.legal {
  max-width: 42rem;
}
.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}
.effective {
  margin: 0 0 32px;
  color: var(--faint);
  font-size: 0.92rem;
}
.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.legal p, .legal li {
  color: var(--muted);
}
.legal ul {
  padding-left: 1.15rem;
}
.legal li { margin: 0 0 8px; }

/* 404 */
.not-found {
  min-height: calc(100vh - var(--header-h) - 120px);
  display: grid;
  align-content: center;
  padding: 64px 0;
  text-align: left;
}
.not-found .code {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.035em;
}
.not-found p {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 32rem;
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero { padding: 96px 0 72px; }
  .support-panel { padding: 36px 32px; }
}

@media (max-width: 699px) {
  .site-header { height: auto; min-height: var(--header-h); padding: 10px 0; }
  .header-inner { flex-wrap: wrap; gap: 6px 12px; }
  .nav { flex-wrap: wrap; gap: 2px; margin-left: -8px; }
  .nav a { padding: 6px 8px; font-size: 0.9rem; white-space: nowrap; }
  .hero { padding: 52px 0 36px; }
  .wrap, .header-inner, .footer-inner { width: min(var(--max), calc(100% - 32px)); }
}

.brand-mark {
  border-radius: 9px;
  object-fit: cover;
}
.app-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex: 0 0 44px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}
.app-tagline {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 550;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .site-header { height: auto; padding: 10px 0; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .brand { width: 100%; }
  .nav { width: 100%; justify-content: flex-start; gap: 4px; margin-left: -8px; }
}
