/* =============================================
   NexThing - Custom Styles
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
  --cyan: #00C4FF;
  --blue: #3D7EFF;
  --purple: #7B2FBE;
  --navy: #0B0B1E;
  --surface: #12122A;
  --surface-2: #1A1A38;
  --text-primary: #FFFFFF;
  --text-secondary: #A0AEC0;
  --border: rgba(61, 126, 255, 0.2);
  --glow-cyan: rgba(0, 196, 255, 0.15);
  --glow-purple: rgba(123, 47, 190, 0.15);
  --gradient-brand: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  --gradient-subtle: linear-gradient(135deg, var(--surface), var(--surface-2));
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--navy);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* --- Gradient Text Utility --- */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Section Base --- */
section {
  padding: 6rem 1.5rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.section-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.75;
}

/* --- Divider --- */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 2px;
  margin-bottom: 2rem;
}

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background: rgba(11, 11, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  height: 88px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 196, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(123, 47, 190, 0.1) 0%, transparent 60%),
    var(--navy);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(0, 196, 255, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}

.hero-headline {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-subline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-2px);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}

.hero-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-secondary), transparent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   ABOUT US
   ============================================= */
#about {
  background: var(--surface);
  clip-path: polygon(0 2rem, 100% 0, 100% calc(100% - 2rem), 0 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

blockquote.turing-quote {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--cyan);
  background: rgba(0, 196, 255, 0.05);
  border-radius: 0 8px 8px 0;
}

blockquote.turing-quote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

blockquote.turing-quote cite {
  font-size: 0.8rem;
  color: var(--cyan);
  font-style: normal;
  letter-spacing: 0.05em;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-logo-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--cyan), var(--blue), var(--purple), var(--cyan));
  opacity: 0.15;
  filter: blur(20px);
  animation: spin 8s linear infinite;
}

.about-logo-wrap img {
  position: relative;
  width: 200px;
  height: auto;
  z-index: 1;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =============================================
   OUR PROMISE
   ============================================= */
#promise {
  background: var(--navy);
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.promise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.promise-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 196, 255, 0.5);
  box-shadow: 0 8px 32px var(--glow-cyan);
}

.promise-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.promise-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.promise-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.promise-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   OUR EXPERTISE
   ============================================= */
#expertise {
  background: var(--surface);
  clip-path: polygon(0 2rem, 100% 0, 100% calc(100% - 2rem), 0 100%);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.expertise-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.expertise-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.expertise-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 196, 255, 0.15);
}

.expertise-card:hover::before {
  opacity: 0.06;
}

.expertise-card > * {
  position: relative;
  z-index: 1;
}

.expertise-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  background: rgba(0, 196, 255, 0.08);
  border: 1px solid rgba(0, 196, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.expertise-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expertise-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.expertise-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   CONTACT
   ============================================= */
#contact {
  background: var(--navy);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info .section-subtext {
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-detail svg {
  width: 18px;
  height: 18px;
  stroke: var(--cyan);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 196, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-message {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-message.success {
  display: block;
  border: 1px solid rgba(0, 196, 255, 0.4);
  background: rgba(0, 196, 255, 0.08);
  color: var(--cyan);
}

.form-message.error {
  display: block;
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
  color: #ff6b6b;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  height: 72px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* =============================================
   SCROLL ANIMATION
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  section {
    padding: 5rem 1.25rem;
  }

  #about {
    clip-path: polygon(0 1rem, 100% 0, 100% calc(100% - 1rem), 0 100%);
  }

  #expertise {
    clip-path: polygon(0 1rem, 100% 0, 100% calc(100% - 1rem), 0 100%);
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-visual {
    display: none;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 11, 30, 0.97);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.85rem 2rem;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}
