/* ============================================
   CyDEXT — Dark Editorial
   Typography: Playfair Display + DM Sans
   Palette: Deep charcoal + CyDEXT blue
   ============================================ */

:root {
  --bg:          #0e0e0e;
  --bg-elevated: #131318;
  --bg-card:     #17171e;
  --surface:     #222230;
  --border:      #262636;
  --text:        #e8e8f0;
  --text-muted:  #8a8a9e;
  --text-dim:    #55556a;
  --accent:      #4a7af7;
  --accent-light:#6b94ff;
  --accent-dark: #3560d4;
  --accent-glow: rgba(74, 122, 247, 0.12);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

em {
  font-style: italic;
  color: var(--accent);
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

/* ---- Grain Overlay ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---- Section Tag ---- */
.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.9rem 2.2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 122, 247, 0.3);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 1.1rem 2.8rem;
  font-size: 0.95rem;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: all 0.5s var(--ease-smooth);
}

.nav.scrolled {
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  transition: opacity 0.3s;
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__logo-svg {
  height: 46px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__link {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s var(--ease-out);
}

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

.nav__link:hover::after {
  width: 100%;
}

.nav__link--cta {
  color: var(--accent);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 2px;
}

.nav__link--cta::after { display: none; }

.nav__link--cta:hover {
  background: var(--accent);
  color: var(--bg);
}

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
  z-index: 110;
}

.nav__burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.4s var(--ease-out);
}

.nav__burger span:first-child { top: 4px; }
.nav__burger span:last-child  { bottom: 4px; }

.nav__burger.active span:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.nav__burger.active span:last-child {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(14, 14, 14, 0.98);
  backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-menu__link {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text);
  transition: color 0.3s;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.5s var(--ease-out);
}

.mobile-menu.active .mobile-menu__link {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu.active .mobile-menu__link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-menu__link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-menu__link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-menu__link:nth-child(4) { transition-delay: 0.4s; }

.mobile-menu__link:hover {
  color: var(--accent);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.hero__orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: -10%;
  right: -10%;
  animation: float1 20s ease-in-out infinite;
}

.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 122, 247, 0.08), transparent 70%);
  bottom: 10%;
  left: -5%;
  animation: float2 25s ease-in-out infinite;
}

.hero__orb--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(74, 122, 247, 0.05), transparent 70%);
  top: 40%;
  left: 40%;
  animation: float3 18s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-40px, 30px) scale(1.05); }
  66%      { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(50px, -40px) scale(1.1); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 40px); }
}

.hero__content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero__dot {
  color: var(--accent);
  font-size: 1.2em;
}

.hero__sub {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 3rem;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: revealUp 0.9s var(--ease-out) forwards;
}

.reveal[data-delay="1"] { animation-delay: 0.15s; }
.reveal[data-delay="2"] { animation-delay: 0.3s; }
.reveal[data-delay="3"] { animation-delay: 0.45s; }
.reveal[data-delay="4"] { animation-delay: 0.6s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

/* ---- About ---- */
.about {
  padding: clamp(6rem, 12vw, 12rem) 0;
  border-top: 1px solid var(--border);
}

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

.about__heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 620px;
  margin-bottom: 3rem;
}

.about__stats {
  display: flex;
  gap: 4rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat__suffix {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* ---- Services ---- */
.services {
  padding: clamp(6rem, 12vw, 12rem) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services__header {
  margin-bottom: 4rem;
}

.services__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ---- Service Card ---- */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-smooth);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}

.service-card:hover {
  border-color: rgba(74, 122, 247, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card__number {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-card__tags li {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.35rem 0.75rem;
  border-radius: 1px;
}

/* ---- Clients ---- */
.clients {
  padding: clamp(5rem, 10vw, 8rem) 0;
  overflow: hidden;
}

.clients__header {
  text-align: center;
  margin-bottom: 3rem;
}

.clients__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
}

.clients__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.client-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  transition: all 0.4s var(--ease-smooth);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.client-card:hover {
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(74, 122, 247, 0.12);
}

.client-card img {
  max-height: 44px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.4s;
}

.client-card:hover img {
  opacity: 1;
}

/* ---- Process ---- */
.process {
  padding: clamp(6rem, 12vw, 12rem) 0;
  border-top: 1px solid var(--border);
}

.process__header {
  text-align: center;
  margin-bottom: 5rem;
}

.process__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
}

.process__steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.process__step {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.process__step-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1;
}

.process__step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.process__step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.process__connector {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--accent), var(--border));
  margin-top: 1.8rem;
  flex-shrink: 0;
}

/* ---- Contact ---- */
.contact {
  padding: clamp(6rem, 12vw, 10rem) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.contact__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.contact__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact__form {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
}

/* Style overrides for the embedded JotForm */
.contact__form iframe {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  border: none !important;
  display: block !important;
}

.contact__phone {
  text-align: center;
  margin-top: 2rem;
}

.contact__phone p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact__phone a {
  color: var(--accent);
  font-weight: 500;
  transition: color 0.3s;
}

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

/* ---- Footer ---- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  align-items: center;
}

.footer__logo-svg {
  height: 34px;
  width: auto;
}

.footer__links {
  display: flex;
  gap: 2rem;
}

.footer__links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.3s;
}

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

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .nav__links {
    display: none;
  }

  .nav__burger {
    display: block;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .process__steps {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .process__connector {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--border), var(--accent), var(--border));
    margin-top: 0;
  }

  .about__stats {
    gap: 2.5rem;
  }

  .clients__grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
  }

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

@media (max-width: 640px) {
  .nav__logo-svg {
    height: 36px;
  }

  .hero {
    padding: 7rem 1.5rem 4rem;
    min-height: 90vh;
  }

  .clients__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .client-card {
    padding: 1rem;
  }

  .client-card img {
    max-height: 32px;
  }

  .about__stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .contact__form {
    padding: 1rem 0.75rem;
    border-radius: 6px;
  }

  .btn--lg {
    width: 100%;
  }

  .footer__links {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ---- Selection ---- */
::selection {
  background: rgba(74, 122, 247, 0.3);
  color: #fff;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}
