/* NRGWEB — shared styles */

:root {
  --bg: #0a0a0a;
  --bg-2: #131313;
  --bg-3: #1a1a1a;
  --ink: #f5f3ee;
  --ink-dim: #9a9892;
  --ink-mute: #5a5852;
  --line: #2a2a28;
  --orange: #ff5a14;
  --orange-soft: #ff7a3a;
  --lime: #c5ff3a;
  --lime-soft: #a8e024;
  --warn: #ff5a14;
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-xl: 36px;
  --font-display: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  position: relative;
}

/* Grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

p {
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255, 90, 20, 0.15);
}

/* Layout */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .nav-inner { padding: 14px 20px; }
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}
.logo .slash {
  color: var(--orange);
  display: inline-block;
  transform: skewX(-12deg);
  margin: 0 1px;
}
.logo .dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
  align-self: center;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--orange);
}
@media (max-width: 900px) {
  .nav-links { display: none; }
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--lime);
  color: #0a0a0a;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  background: #d4ff5e;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: #ff7036;
  transform: translateY(-2px);
}
.btn-lime {
  background: var(--lime);
  color: #0a0a0a;
}
.btn-lime:hover {
  background: #d4ff5e;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* Sections */
section {
  position: relative;
  padding: 100px 0;
}
@media (max-width: 768px) {
  section { padding: 64px 0; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  max-width: 18ch;
}
.section-head .sub {
  max-width: 36ch;
  color: var(--ink-dim);
  font-size: 1rem;
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 22px 0;
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: scroll-x 30s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.marquee-track .star {
  color: var(--orange);
  display: inline-block;
}
.marquee-track .lime-text {
  color: var(--lime);
}
.marquee.reverse .marquee-track {
  animation-direction: reverse;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, background 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--orange);
}

/* Footer */
.footer {
  background: #050505;
  border-top: 1px solid var(--line);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h5 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
  font-weight: 500;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer a {
  color: var(--ink);
  font-size: 0.95rem;
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--orange);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-mega {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 18vw, 18rem);
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-mute);
  text-align: center;
  margin: 40px 0;
  user-select: none;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Tags / chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 90, 20, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 90, 20, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chip.lime {
  background: rgba(197, 255, 58, 0.08);
  color: var(--lime);
  border-color: rgba(197, 255, 58, 0.3);
}
.chip.ghost {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line);
}

/* Page hero (sub-pages) */
.page-hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.92;
  max-width: 16ch;
}
.page-hero .lead {
  margin-top: 32px;
  max-width: 50ch;
  font-size: 1.15rem;
  color: var(--ink-dim);
}
.page-hero .crumbs {
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.page-hero .crumbs a {
  color: var(--ink-dim);
}

/* Utility */
.text-orange { color: var(--orange); }
.text-lime { color: var(--lime); }
.text-dim { color: var(--ink-dim); }
.bg-orange { background: var(--orange); }
.bg-lime { background: var(--lime); color: #0a0a0a; }

/* Live chat widget */
.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(255, 90, 20, 0.4);
  transition: transform 0.2s;
}
.chat-fab:hover {
  transform: translateY(-2px) scale(1.02);
}
.chat-fab .dot {
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(197, 255, 58, 0.25);
  animation: pulse 1.5s infinite;
}
.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 48px);
  z-index: 60;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open {
  display: flex;
  animation: chatPop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes chatPop {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: none; }
}
.chat-head {
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--orange), #ff7036);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-head .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.chat-head .sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.chat-head .sub .dot {
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  display: inline-block;
}
.chat-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}
.chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.92rem;
}
.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.4;
}
.chat-msg.bot {
  background: var(--bg-3);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  color: var(--ink);
}
.chat-msg.me {
  background: var(--lime);
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.chat-quick button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}
.chat-quick button:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.chat-input {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
}
.chat-input input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
}
.chat-input input:focus { border-color: var(--orange); }
.chat-input button {
  background: var(--orange);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}
