/* ===================================
   CSS VARIABLES & RESET
   =================================== */
:root {
  --bg-dark: #0b1f2a;
  --bg-light: #f4f6fb;
  --text-primary: #0f1c2d;
  --text-secondary: #4a6478;
  --accent: #ffb347;
  --accent-dark: #f29a25;
  --max-width: 1120px;
  --transition: 200ms ease;
  --header-height: 80px;
}

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

/* ===================================
   BASE STYLES
   =================================== */
body {
  margin: 0;
  font-family: "Lora", "Times New Roman", serif;
  color: var(--text-primary);
  background: var(--bg-light);
  line-height: 1.5;
}

h1,
h2,
h3,
.section-title {
  font-family: "Lora", "Times New Roman", serif;
}

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

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

/* ===================================
   SHARED COMPONENTS
   =================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

section {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 5vw, 6rem);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1.5rem;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #13212f;
  box-shadow: 0 10px 25px rgba(255, 179, 71, 0.35);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(242, 154, 37, 0.4);
}

/* Feature Cards Grid */
.features {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 18px 40px rgba(15, 28, 45, 0.08);
  border: 1px solid rgba(15, 28, 45, 0.05);
  transition: transform var(--transition), box-shadow var(--transition);
  isolation: isolate;
}

.feature-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 31, 42, 0.7);
  backdrop-filter: blur(10px);
  color: #fff;
}

.nav {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo img {
  width: 34px;
  height: auto;
  display: block;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: "Lora", "Times New Roman", serif;
}

.nav a {
  font-size: 0.95rem;
  transition: color var(--transition);
}

.nav a:hover {
  color: var(--accent);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(255, 194, 120, 0.45), transparent 55%),
              radial-gradient(circle at bottom left, rgba(108, 190, 255, 0.3), transparent 50%),
              #0b1f2a;
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("NuancedLabsHero.png");
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 31, 42, 0.85), rgba(11, 31, 42, 0.35));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 6rem);
}

.eyebrow {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 0 0 1.25rem;
  line-height: 1.05;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 0 0 2rem;
  color: rgba(255, 255, 255, 0.82);
}

.scroll-indicator {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 3rem);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.scroll-indicator span:first-child {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* ===================================
   MAIN SECTIONS
   =================================== */

/* Services Section */
#services {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(244, 246, 251, 1) 0%, rgba(227, 236, 247, 0.95) 55%, rgba(208, 224, 239, 0.9) 100%);
}

#services::before,
#services::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  filter: blur(110px);
  z-index: 0;
  pointer-events: none;
}

#services::before {
  top: -200px;
  left: -200px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at center, rgba(102, 196, 255, 0.28), transparent 74%);
}

#services::after {
  bottom: -200px;
  right: -180px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at center, rgba(62, 170, 255, 0.22), transparent 72%);
}

#services .container {
  position: relative;
  z-index: 1;
}

#services .feature-card {
  background: #fff;
  border: none;
  box-shadow: 0 24px 48px rgba(58, 117, 165, 0.18);
}

/* Partner Section */
#partner {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(140deg, #13263a 0%, #1e3d57 52%, #27516f 100%);
}

#partner::before,
#partner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  filter: blur(140px);
  opacity: 0.55;
  pointer-events: none;
}

#partner::before {
  top: -220px;
  right: -220px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(88, 192, 255, 0.4), transparent 74%);
}

#partner::after {
  bottom: -240px;
  left: -240px;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle at center, rgba(54, 150, 255, 0.32), transparent 76%);
}

#partner .container {
  position: relative;
  z-index: 1;
}

#partner .section-title {
  color: rgba(255, 255, 255, 0.92);
}

#partner .feature-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 55px rgba(12, 25, 39, 0.35);
  backdrop-filter: blur(6px);
}

#partner .feature-card h3 {
  color: #fff;
}

#partner .feature-card p {
  color: rgba(255, 255, 255, 0.78);
}

/* Projects Section */
#projects {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 251, 253, 0.92) 45%, rgba(235, 241, 249, 0.9) 100%);
}

#projects::before,
#projects::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

#projects::before {
  top: -160px;
  left: -150px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(108, 198, 255, 0.24), transparent 72%);
}

#projects::after {
  bottom: -180px;
  left: -120px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at center, rgba(72, 168, 255, 0.2), transparent 70%);
}

#projects .container {
  position: relative;
  z-index: 1;
}

#projects .feature-card {
  background: #fff;
  border: none;
  box-shadow: 0 22px 44px rgba(73, 129, 178, 0.16);
}

/* Hover Effects for Feature Cards */
#services .feature-card:hover,
#projects .feature-card:hover,
#partner .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 55px rgba(28, 56, 85, 0.2);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #0f1c2d, #1f3248);
  color: #fff;
  border-radius: 24px;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  box-shadow: 0 20px 60px rgba(15, 28, 45, 0.25);
}

.cta-section p {
  max-width: 620px;
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
}

/* ===================================
   FOOTER
   =================================== */
footer {
  padding: 2rem clamp(1.5rem, 5vw, 6rem);
  background: #fff;
  color: var(--text-secondary);
  border-top: 1px solid rgba(15, 28, 45, 0.08);
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 108px;
  }

  header {
    background: rgba(11, 31, 42, 0.85);
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-list {
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
  }

  .hero {
    min-height: 76vh;
  }

  .scroll-indicator {
    bottom: 1.5rem;
  }
}

@media (max-width: 520px) {
  :root {
    --header-height: 88px;
  }

  .nav-list {
    display: none;
  }

  .hero-content {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .cta-section {
    border-radius: 16px;
  }
}
