/*
 * static/css/app.css
 * nle-web — Northern Lights Epoxy public site
 * (C) 2026 Chena Innovations LLC
 * Intellectual Property of Chena Innovations LLC & Northern Lights Epoxy
 * Created by Billy Jack Wiglesworth on April 20, 2026.
 *
 * Mobile-first. Palette derived from the NLE logo: night-sky base, aurora
 * green/teal/violet ribbons, snow-white surfaces. System fonts only.
 */

:root {
  --night-1:    #0a1428;   /* deep sky base */
  --night-2:    #101a30;   /* mid sky */
  --night-3:    #1a2540;   /* lifted surface */
  --ink:        #0d1119;   /* text on light */
  --ink-2:      #2a313d;
  --ink-3:      #5a6470;

  --paper:      #ffffff;
  --paper-2:    #f6f8fa;
  --paper-3:    #eef1f4;
  --paper-line: rgba(13, 17, 25, 0.08);

  --aurora-green:  #54eab2;   /* primary aurora */
  --aurora-teal:   #40bba8;
  --aurora-cyan:   #5fffd4;
  --aurora-violet: #6887b7;
  --aurora-indigo: #5a5f89;

  --accent:        #0a8757;   /* aurora green at AA contrast on white */
  --accent-hi:     #086d47;
  --accent-bg:     rgba(10, 135, 87, 0.08);

  --danger:        #b3203b;

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: var(--font-sans);

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --max-w:     1180px;
  --max-w-narrow: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

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

.sr-skip {
  position: absolute; left: -9999px;
}
.sr-skip:focus {
  position: fixed; top: 8px; left: 8px;
  background: var(--accent); color: white;
  padding: 8px 14px; border-radius: var(--radius-sm); z-index: 1000;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--max-w-narrow); }

.muted { color: var(--ink-3); }

/* ============================================================ Topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 20, 40, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}
.topbar-brand img { border-radius: 50%; }
.topbar-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.topbar-name strong { font-size: 15px; font-weight: 600; }
.topbar-name em { font-size: 11px; font-style: normal; color: var(--aurora-green); letter-spacing: 0.04em; }

.topbar-nav {
  display: none;
  gap: 4px;
  align-items: center;
}
.topbar-nav a {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 100ms, color 100ms;
}
.topbar-nav a:hover { color: white; background: rgba(255, 255, 255, 0.06); }
.topbar-nav a.cta {
  background: var(--aurora-green);
  color: var(--night-1);
  font-weight: 600;
  margin-left: 4px;
}
.topbar-nav a.cta:hover { background: var(--aurora-cyan); }

.topbar-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 32px; height: 24px;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.topbar-toggle span {
  height: 2px; background: white; border-radius: 1px;
  transition: transform 200ms, opacity 100ms;
}

.mnav {
  background: var(--night-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mnav[hidden] { display: none; }
.mnav a {
  color: white;
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mnav a:last-child { border-bottom: none; color: var(--aurora-green); font-weight: 600; }

@media (min-width: 768px) {
  .topbar-nav { display: flex; }
  .topbar-toggle { display: none; }
  .mnav { display: none !important; }
}

/* ============================================================ Hero */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 100%);
  color: white;
  padding: 80px 20px 240px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-aurora {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-aurora .ribbon {
  position: absolute;
  top: -10%;
  width: 240px; height: 80%;
  filter: blur(40px);
  opacity: 0.55;
  border-radius: 50%;
}
.hero-aurora .r1 {
  left: 15%;
  background: radial-gradient(ellipse at 50% 0%,
    var(--aurora-green) 0%,
    rgba(84, 234, 178, 0.5) 30%,
    transparent 70%);
  transform: rotate(-12deg);
}
.hero-aurora .r2 {
  left: 45%;
  background: radial-gradient(ellipse at 50% 0%,
    var(--aurora-cyan) 0%,
    rgba(95, 255, 212, 0.4) 30%,
    transparent 70%);
  transform: rotate(8deg);
  opacity: 0.45;
}
.hero-aurora .r3 {
  left: 70%;
  background: radial-gradient(ellipse at 50% 0%,
    var(--aurora-violet) 0%,
    rgba(104, 135, 183, 0.4) 30%,
    transparent 70%);
  transform: rotate(-4deg);
  opacity: 0.4;
}
.hero-aurora .stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, white, transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 55% 30%, white, transparent),
    radial-gradient(1px 1px at 78% 50%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 88% 18%, white, transparent),
    radial-gradient(1.5px 1.5px at 22% 40%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 65% 70%, rgba(255,255,255,0.8), transparent);
  opacity: 0.7;
}

.hero-mountains {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 200px;
  z-index: 1;
  pointer-events: none;
}
.hero-mountains svg { width: 100%; height: 100%; display: block; }

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
}
.hero-logo {
  border-radius: 50%;
  margin: 0 auto 20px;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}
.hero-headline {
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}
.hero-sub {
  font-size: clamp(15px, 2.4vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.55;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 80ms, background 100ms, border-color 100ms, color 100ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--aurora-green);
  color: var(--night-1);
  border-color: var(--aurora-green);
}
.btn-primary:hover {
  background: var(--aurora-cyan);
  border-color: var(--aurora-cyan);
  color: var(--night-1);
}
.btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: white;
  color: white;
}
.btn-block { width: 100%; padding: 14px; }

/* ============================================================ Sections */

.section { padding: 72px 0; }
.section-light { background: var(--paper); color: var(--ink); }
.section-dark  { background: var(--night-2); color: white; }
.section-aurora {
  background: linear-gradient(180deg, var(--night-2) 0%, var(--night-1) 100%);
  color: white;
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 700;
}
.section-head p { margin: 12px 0 0; }
.section-dark .section-head p { color: rgba(255, 255, 255, 0.7); }
.section-aurora .section-head p { color: rgba(255, 255, 255, 0.78); }

/* ============================================================ Services */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}
.service-card {
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 120ms, border-color 120ms;
}
.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.service-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}
.service-card p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* ============================================================ Gallery */

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 540px)  { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night-3);
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 300ms;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78), rgba(0,0,0,0));
  color: white;
  font-size: 13px;
}
.gallery-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--night-3);
  border-radius: var(--radius);
}
.gallery-empty p { margin: 0 0 6px; }
.gallery-empty .muted { color: rgba(255, 255, 255, 0.6); }

/* ============================================================ About */

.prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  text-align: center;
}

/* ============================================================ Form */

.quote-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
.quote-form label {
  display: block;
  margin-bottom: 16px;
}
.quote-form label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}
.quote-form label em {
  margin-left: 8px;
  font-style: normal;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="tel"],
.quote-form input[type="number"],
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: box-shadow 100ms, background 100ms;
}
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px var(--aurora-green);
}
.quote-form textarea { resize: vertical; min-height: 110px; }
.quote-form .form-foot { margin: 14px 0 0; font-size: 13px; text-align: center; }

/* Honeypot — invisible to humans, present in DOM for bots */
.hp {
  position: absolute;
  left: -10000px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ============================================================ Footer */

.foot {
  background: var(--night-1);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.foot-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  text-align: center;
}
@media (min-width: 768px) {
  .foot-inner {
    grid-template-columns: 1fr auto 1fr;
    text-align: left;
    align-items: center;
  }
  .foot-inner .foot-legal { text-align: right; }
}
.foot strong { color: white; font-size: 15px; }
.foot p { margin: 4px 0 0; font-size: 13px; }
.foot-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.foot-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.foot-links a:hover { color: var(--aurora-green); }
.foot-legal { font-size: 12px; }

/* ============================================================ Blank pages */

.page-blank {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--night-1), var(--night-2));
  color: white;
}
.msg-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.msg-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.msg-card img { margin: 0 auto 20px; border-radius: 50%; }
.msg-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.msg-card .muted { color: rgba(255, 255, 255, 0.7); margin-bottom: 24px; }
.msg-card .btn { background: var(--aurora-green); color: var(--night-1); border-color: var(--aurora-green); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
