/*
 * ==========================================================
 * A Design by Dnwest • Author: Cristian Fernandes • https://dnwest.dev
 * ==========================================================
 *
 * INDEX
 *  01) Imports & Fonts
 *  02) Variables (CSS Custom Properties)
 *  03) Reset & Base
 *  04) Global Typography (tags & utilities)
 *  05) Layout Helpers
 *  06) Backgrounds & Logos
 *  07) Glow & Text Effects
 *  08) Navbar (Bootstrap)
 *  09) Light Theme (override of tokens and buttons)
 *  10) Footer (structure, links, social)
 *  11) Forms (contact)
 *  12) Hero (introduction)
 *  13) Sections & Reveal / Tetris Build
 *  14) Cards & Stacks
 *  15) Lists, Contacts and Utilities
 *  16) Responsive
 *  17) Accessibility (reduce motion)
 *  18) Keyframes
 *  19) Scene/Stage (visual layers, grain, glow)
 */

/* ==========================================================
 * 01) IMPORTS & FONTS
 * ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz@0,14..32;1,14..32&family=Orbitron:wght@400..900&family=Rajdhani:wght@500;600&family=Saira+Semi+Condensed:wght@500;600&family=Share+Tech+Mono&family=Space+Mono&display=swap');


/* ==========================================================
 * 02) VARIABLES
 * ========================================================== */
:root {
  /* Accents */
  --accent: oklch(80% 0.130 210);
  --purple: oklch(45% 0.160 300);

  /* Backgrounds */
  --bg: oklch(20% 0.030 250);
  --bg-1: oklch(22% 0.030 240);
  --bg-2: oklch(26% 0.035 235);

  /* Brand / feedback */
  --danger: oklch(61.676% 0.169 23.865);
  --secondary: oklch(90% 0.090 185);
  --success: oklch(92% 0.120 195);

  /* Effects */
  --border: oklch(100% 0 0 / 0.14);
  --glass: oklch(18% 0.005 260 / 0.6);

  /* FONTS */
  --font-body: "Inter", sans-serif;
  --font-logo: "Orbitron", sans-serif;
  --font-mono: "Share Tech Mono", monospace;
  --font-subtitle: "Saira Semi Condensed", sans-serif;
  --font-title: "Rajdhani", sans-serif;

  /* Neutrals */
  --grey: oklch(72% 0.010 270);
  --light: oklch(100% 0 0);

  /* Primary gradient */
  --primary: linear-gradient(
    120deg,
    var(--primary-start),
    var(--primary-end)
  );
  --primary-end: oklch(90% 0.090 185);
  --primary-start: oklch(35% 0.045 240);

  /* Text */
  --muted: oklch(78% 0.015 260);
  --text: oklch(100% 0 0);

  --nav-offset: 80px;
}


/* ==========================================================
 * 03) RESET & BASE
 * ========================================================== */
* {
  box-sizing: border-box;
  font-size: 1rem;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-offset);
}

html,
body {
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

.btn-gradient {
  -webkit-background-clip: text;
  background-clip: text;
  border: 1px solid color-mix(in srgb-linear, var(--accent) 60%, var(--danger) 20%);
  border-radius: .4rem !important;
  color: transparent;
  filter: brightness(5px);
  transition: all ease-in-out .5s;
}

.btn-gradient:hover {
  border: 1px solid color-mix(in srgb-linear, var(--accent) 50%, #0a1625 10%);
  box-shadow: 0 0 28px rgba(0, 255, 153, 0.3), 0 0 8px rgba(0, 255, 153, .4);
  color: var(--accent);
  filter: brightness(10px);
  transition: all ease-in-out .5s;
}

h1 {
  background-size: contain;
}

img,
svg {
  height: auto;
  max-width: 100%;
}

.stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.stack-badges .badge {
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  padding: 6px 12px;
  transition: 0.25s ease;
}

.stack-badges .badge:hover {
  border-color: rgba(0, 255, 153, 0.4);
  box-shadow: 0 0 8px rgba(0, 255, 153, 0.2);
  transform: translateY(-2px);
}


/* ==========================================================
 * 04) GLOBAL TYPOGRAPHY
 * ========================================================== */
.font-logo {
  font-family: var(--font-logo);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text) !important;
  font-family: var(--font-title);
  letter-spacing: 0.03em;
}

.link,
.link-faded,
a,
.btn-link {
  color: var(--accent);
  text-decoration: none;
  transition: color .2s;
}

.link-faded:hover,
.link:hover,
a:hover,
.btn-link:hover {
  color: var(--accent);
}

.link-faded {
  color: var(--muted);
}

.link-faded:hover {
  color: var(--text);
}

code,
pre {
  font-family: var(--font-mono);
}

.icon-list li,
.mini-list li,
p,
.small,
.text-muted {
  color: var(--muted);
}


/* ==========================================================
 * 05) LAYOUT HELPERS
 * ========================================================== */
.center-element {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.label {
  color: var(--light);
  font-size: 30px;
  font-weight: 500;
  margin-bottom: 16px;
  opacity: 0.85;
  text-align: center;
  transition: opacity 0.25s ease-out;
}

.left-element {
  display: flex;
  justify-content: flex-start;
}

.right-element {
  display: flex;
  justify-content: flex-end;
}

.sticky-bottom {
  bottom: 0;
  height: 100%;
  opacity: .10;
  position: sticky;
  transform: rotateX(1deg) rotateY(0deg);
  transform-style: preserve-3d;
  width: 100%;
  z-index: -95;
}


/* ==========================================================
 * 06) BACKGROUNDS & LOGOS
 * ========================================================== */
.background {
  align-content: center;
  display: flex;
  justify-content: center;
  z-index: -10;
}

.logo-dnwest {
  background-image: url(../../public/images/logoComp-DnWest.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 17rem;
  width: 17rem;
  z-index: 99999;
}

.logoSVG {
  height: 100vh;
  pointer-events: none;
  position: relative;
  width: 100vw;
}


/* ==========================================================
 * 07) GLOW & TEXT EFFECTS
 * ========================================================== */
.disappearing {
  animation: disappearing 1s ease-out;
  animation-timeline: view();
  align-self: flex-end;
}

.disappearing-scroll {
  animation: disappearing 1s ease-out;
  animation-timeline: scroll();
  animation-range: cover 30% cover 100%;
}

.glow-behind {
  color: var(--light);
  display: inline-block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  padding: 0.5em 1em;
  position: relative;
  text-align: center;
  z-index: 1;
}

.glow-behind::before {
  animation: glowFlow var(--glow-speed) linear infinite;
  background: var(--glow-gradient);
  background-size: 300% 300%;
  border-radius: 60%;
  content: "";
  filter: blur(80px) brightness(1.8) saturate(150%);
  inset: -40%;
  opacity: 0.55;
  position: absolute;
  z-index: -1;
}

.glow-text {
  color: var(--light);
  filter: brightness(1.1);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.015em;
  position: relative;
  z-index: 1;
}

.glow-text::after,
.glow-text::before {
  animation: gradientShift 12s ease-in-out infinite;
  background: linear-gradient(90deg, #00cfff, #a600ff, #ff006e, #ff8800);
  background-clip: text;
  -webkit-background-clip: text;
  content: attr(data-text);
  inset: 0;
  mix-blend-mode: color-burn;
  pointer-events: none;
  position: absolute;
}

.glow-text::after {
  filter: blur(3px) brightness(1.3);
}

.glow-text::before {
  filter: blur(20px) brightness(0.8);
  opacity: 0.7;
  border-radius: 100px;
  z-index: -1;
}


/* ==========================================================
 * 08) NAVBAR (Bootstrap)
 * ========================================================== */
.has-fixed-bg .logoSVG {
  filter: brightness(4.5);
  height: auto;
  inset: 0 auto auto 0;
  opacity: 0.12;
  pointer-events: none;
  position: fixed;
  width: 32vw;
  z-index: -1;
}

.header-brand {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  position: relative;
}

.header-brand .wordmark {
  display: inline-block;
}

.header-brand i {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, .25));
}

.navbar .nav-link {
  color: var(--muted);
  position: relative;
}

.navbar .nav-link.active::after {
  background: linear-gradient(90deg, var(--secondary), var(--purple));
  border-radius: 2px;
  bottom: .2rem;
  content: "";
  height: 2px;
  left: .5rem;
  position: absolute;
  right: .5rem;
  transition: left .25s ease, right .25s ease;
}

.navbar .nav-link:focus,
.navbar .nav-link:hover {
  color: var(--text);
}

.navbar-brand {
  color: var(--text) !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
  color: var(--text) !important;
  font-weight: 600;
}

.navbar.glass {
  backdrop-filter: blur(8px);
  background: var(--glass);
  border-bottom: 1px solid var(--border);
}


/* ==========================================================
 * 10) FOOTER
 * ========================================================== */
.back-to-top {
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: .35rem .6rem;
}

.dev-west {
  left: 278px;
  opacity: .9;
  position: absolute;
  transform: rotate(50deg);
}

.footer-accent {
  background: linear-gradient(90deg, var(--secondary), var(--purple));
  border-radius: 2px;
  display: block;
  height: 3px;
  inset: 0 0 auto 0;
  opacity: .9;
  position: absolute;
}

.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-brand {
  color: var(--text);
}

.footer-brand .badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.footer-brand i {
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(0, 255, 255, .25));
}

.footer-nav a {
  position: relative;
  text-decoration: none;
}

.footer-nav a::after {
  background: linear-gradient(90deg, var(--secondary), var(--purple));
  border-radius: 2px;
  bottom: -4px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.footer-nav a:hover::after {
  transform: scaleX(1);
}

.footer-sep {
  border-color: var(--border);
  opacity: .7;
}

.footer-social .btn {
  --bs-btn-font-size: .875rem;
  --bs-btn-padding-x: .5rem;
  --bs-btn-padding-y: .325rem;
  border-radius: 10px;
}

.footer-top {
  position: relative;
  z-index: 1;
}

.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  overflow: clip;
  position: relative;
}

.site-footer::before {
  background:
    radial-gradient(60% 120% at 20% 50%, rgba(0, 255, 255, .10), transparent 60%),
    radial-gradient(60% 120% at 80% 50%, rgba(166, 0, 255, .08), transparent 60%);
  content: "";
  filter: blur(40px) saturate(110%);
  height: 220px;
  inset: auto -20% -40% -20%;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.west {
  color: var(--muted);
  transition: all .4s ease-in-out;
}

@media (max-width: 768px) {
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .footer-nav,
  .footer-social {
    gap: 1rem;
    justify-content: space-between;
    width: 100%;
  }

  .footer-top {
    gap: 1rem;
  }
}


/* ==========================================================
 * 11) FORMS (CONTACT)
 * ========================================================== */
#captchaAnswer {
  -moz-appearance: textfield;
  appearance: textfield;
}

#captchaAnswer::-webkit-inner-spin-button,
#captchaAnswer::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

#formStatus.error {
  color: #ef4444;
}

#formStatus.success {
  color: #22c55e;
}

.contact-form .form-control {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.contact-form .form-control:focus {
  box-shadow: 0 0 28px rgba(0, 255, 153, 0.3), 0 0 8px rgba(0, 255, 153, .4);
  color: var(--text);
}

.contact-form .form-label {
  color: var(--text);
  font-weight: 600;
}

html[data-theme='light'] .contact-form .form-control {
  background: var(--light);
}

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

/* ==========================================================
 * 12) HERO
 * ========================================================== */
.eyebrow {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .08em;
  padding: .35rem .6rem;
  text-transform: uppercase;
}

.floating {
  animation: floating 4s ease-in-out infinite;
}

.gradient-text {
  -webkit-background-clip: text;
  background: linear-gradient(90deg, var(--secondary), var(--purple), var(--danger));
  background-clip: text;
  color: transparent;
}

.hero-image {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 0 22px rgba(0, 255, 153, 0.15), 0 0 6px rgba(0, 255, 153, .2);
  max-width: 330px;
  padding: 10px;
  transition: transform .5s ease, box-shadow .5s ease;
}

.hero-image:hover {
  box-shadow: 0 0 28px rgba(0, 255, 153, 0.3), 0 0 8px rgba(0, 255, 153, .4);
  transform: translateY(-8px) scale(1.03);
}

.hero-image img {
  border-radius: 12px;
}

.hero-wrapper {
  background:
    radial-gradient(1200px 500px at 0% 0%, rgba(0, 255, 255, 0.08), transparent 60%),
    radial-gradient(1200px 500px at 100% 0%, rgba(166, 0, 255, 0.07), transparent 60%);
  overflow-x: clip;
  padding-top: 6rem;
  position: relative;
}

.hero-wrapper::after,
.hero-wrapper::before {
  animation: bgPulse 12s ease-in-out infinite alternate;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(0, 255, 255, .08), transparent 60%),
    radial-gradient(700px 320px at 80% 0%, rgba(166, 0, 255, .07), transparent 60%);
  content: "";
  filter: saturate(110%);
  inset: -10%;
  position: absolute;
  z-index: -1;
}

.primary-text {
  -webkit-background-clip: text;
  background: linear-gradient(20deg, var(--secondary), var(--purple));
  background-clip: text;
  color: transparent;
}

@keyframes bgPulse {
  from {
    opacity: .9;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0px);
  }
}


/* ==========================================================
 * 13) SECTIONS & REVEAL / TETRIS BUILD
 * ========================================================== */
.intro-done .section {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.intro-inner {
  align-items: center;
  display: flex;
  height: 100vh;
  justify-content: center;
  position: relative;
  width: 100vw;
}

.intro-inner-b {
  background-image: url(../img/backgound.png);
  z-index: -100;
}

.intro-overlay {
  background:
    radial-gradient(1200px 500px at 10% 0%, rgba(0, 255, 255, .06), transparent 60%),
    radial-gradient(1200px 500px at 90% 0%, rgba(255, 64, 129, .05), transparent 60%),
    var(--secondary);
  display: grid;
  inset: 0;
  place-items: center;
  position: fixed;
  transition: opacity .6s ease, visibility .6s ease;
  z-index: 9999;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.scroll-cue {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  gap: .3rem;
  padding: .75rem 1rem .5rem;
  transition: transform .2s ease, border-color .2s ease;
}

.scroll-cue .chev {
  animation: cueDown 1.5s ease-in-out infinite;
  border-bottom: 2px solid var(--success);
  border-right: 2px solid var(--success);
  height: 14px;
  opacity: 0.9;
  transform: rotate(45deg);
  width: 14px;
}

.scroll-cue .chev:nth-child(2) {
  animation-delay: .2s;
}

.scroll-cue .chev:nth-child(3) {
  animation-delay: .4s;
}

.section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity .8s ease, transform .8s ease;
  will-change: transform, opacity;
}

.section.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .8s ease;
}

.site-content {
  position: relative;
  z-index: 1;
}

.tetris-build .section[data-ord="1"] {
  animation: tetrisFromTop .7s var(--e) .05s forwards;
}

.tetris-build .section[data-ord="2"] {
  animation: tetrisFromLeft .7s var(--e) .15s forwards;
}

.tetris-build .section[data-ord="3"] {
  animation: tetrisFromRight .7s var(--e) .25s forwards;
}

.tetris-build .section[data-ord="4"] {
  animation: tetrisFromBottom .7s var(--e) .35s forwards;
}

.cue-text {
  color: var(--grey);
  font-size: .8rem;
  margin-top: .25rem;
}

@keyframes cueDown {
  0% {
    opacity: .6;
    transform: translateY(-3px) rotate(45deg);
  }

  50% {
    opacity: 1;
    transform: translateY(3px) rotate(45deg);
  }

  100% {
    opacity: .6;
    transform: translateY(-3px) rotate(45deg);
  }
}

@keyframes tetrisFromBottom {
  from {
    opacity: 0;
    transform: translateY(80px) rotate(2deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tetrisFromLeft {
  from {
    opacity: 0;
    transform: translateX(-80px) rotate(-3deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tetrisFromRight {
  from {
    opacity: 0;
    transform: translateX(80px) rotate(3deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tetrisFromTop {
  from {
    opacity: 0;
    transform: translateY(-80px) rotate(-2deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}


/* ==========================================================
 * 14) CARDS & STACKS
 * ========================================================== */
.card.feature {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card.feature .card-body {
  padding: 1.5rem;
}

.card.feature:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transform: translateY(-4px);
}

html[data-theme='light'] .card.feature {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
}

.stack-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.stack-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.stack-card .tags span {
  border: 1px dashed var(--border);
  border-radius: .5rem;
  color: var(--muted);
  font-size: .9rem;
  padding: .35rem .6rem;
}


/* ==========================================================
 * 15) LISTS, CONTACTS AND UTILITIES
 * ========================================================== */
.contact-card {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
}

.contact-card i {
  color: var(--muted);
  font-size: 1.25rem;
}

.icon-list,
.mini-list {
  list-style: none;
  padding-left: 0;
}

.icon-list li {
  align-items: center;
  display: flex;
  gap: .5rem;
  margin: .35rem 0;
}

.mini-list li {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: .5rem;
  margin: .25rem 0;
}

.py-6 {
  padding-bottom: 4.5rem !important;
  padding-top: 4.5rem !important;
}


/* ==========================================================
 * 16) RESPONSIVE
 * ========================================================== */
@media (max-width: 740px) {
  .logoSVG {
    width: 64vw;
  }
}


/* ==========================================================
 * 17) ACCESSIBILITY (REDUCE MOTION)
 * ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .card.feature,
  .hero-wrapper::after,
  .hero-wrapper::before {
    animation: none !important;
  }

  .scroll-cue .chev {
    animation: none;
  }

  .section {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tetris-build .section {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  [data-stagger] .card.feature {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ==========================================================
 * 18) KEYFRAMES
 * ========================================================== */
@keyframes disappearing {
  0% {
    opacity: 1;
  }

  30% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes glowFlow {
  0% {
    background-position: 0% 50%;
    transform: translate(0, 0) scale(1);
  }

  50% {
    background-position: 100% 50%;
    transform: translate(20px, -20px) scale(1.1);
  }

  100% {
    background-position: 0% 50%;
    transform: translate(-20px, 20px) scale(1);
  }
}


/* ==========================================================
 * 19) Selection
 * ========================================================== */

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