:root {
  --bg: #0f172a;
  --accent: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle, #0f172a 0%, #020617 65%, #000 100%);
  color: var(--text);
  line-height: 1.6;
}

/* NAVBAR */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 4.5vw;
  background: radial-gradient(circle at 5% 5%, rgba(15,23,42,.8) 0%, rgba(2,6,23,.35) 70%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;   
  color: inherit;
}
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
#-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}
.logo-text span {
  color: var(--accent);
}
nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  transition: 0.15s ease-out;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
}

nav a:hover,
nav a:focus {
  color: #38bdf8;               
  border-bottom-color: #38bdf8;
}
nav a[href="#services"].active,
nav a[href="#services"]:target {
  color: #fff;
}
.btn-small {
  background: rgba(56,189,248,0.1);
  border: 1px solid rgba(56,189,248,0.5);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* HERO */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 2.5rem 4.5vw 0.8rem;
  min-height: 340px;
  background: linear-gradient(140deg, #020617 0%, #07111f 45%, #020617 100%);
  overflow: hidden;
}

/* center image and make it a background accent */
.hero-bg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -110px;
  width: 760px;
  opacity: 0.28; /* 🔽 slightly lower = more premium */
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.25));
  pointer-events: none;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.14), rgba(2, 6, 23, 0.9));
  z-index: 1;
}

/* subtle fade at bottom so hero joins next section */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 120px;
  background: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,1) 90%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  gap: 1.7rem;
  width: min(1180px, 100%); /* 👈 keeps it premium on big screens */
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
}
.hero-text h1 {
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  margin: 0.35rem 0 0.35rem;
  line-height: 1.02;
}
.hero-text .sub {
  color: var(--muted);
  max-width: 540px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin: 1rem 0 0.85rem;
}
.footnote {
  font-size: 0.72rem;
  color: var(--muted);
}

/* HERO CARD */
.hero-card {
  background: radial-gradient(circle at top, rgba(8,12,19,.9) 0%, rgba(2,6,23,.75) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.4rem;
  padding: 1.05rem 1.15rem 1.2rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 18px 38px rgba(0,0,0,.32);
  align-self: flex-start;
}
.hero-card h2 {
  margin-top: 0;
  font-size: 1.03rem;
}
.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}
.hero-card li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  font-size: 0.84rem;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56,189,248,.7);
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  box-shadow: 0 12px 22px rgba(14,165,233,.35);
}
.btn-primary:hover {
  filter: brightness(1.03);
}
.btn-secondary {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148,163,184,0.3);
  color: var(--text);
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

/* SECTIONS */
.section {
  padding: 3rem 4.5vw;
}

/* important: when clicking "Services", show heading */
#top,
#services {
  scroll-margin-top: 90px;
}

.section.alt {
  background: radial-gradient(circle, rgba(15, 23, 42, .35) 0%, rgba(2, 6, 23, 0) 90%);
}

/* first section after hero → tight */
.section-first {
  padding-top: 0.8rem;
}

.section h2 {
  font-size: 1.65rem;
  margin-bottom: 0.4rem;
}
.section .intro {
  color: var(--muted);
  max-width: 680px;
}

/* GRID */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.3rem;
  margin-top: 1.5rem;
}

.card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem 1.4rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 20px 35px rgba(0,0,0,.12);
  transition: transform .15s ease-out, border .15s ease-out;
}
.card:hover {
  transform: translateY(-3px);
  border: 1px solid rgba(148,163,184,0.25);
}

.card-icon {
  position: relative;
  padding-top: 3rem;
}
.icon-circle {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* CONTACT */
.contact-form {
  max-width: 520px;
  margin-top: 1.2rem;
  background: rgba(15,23,42,0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 1rem;
  padding: 1.3rem 1.3rem 1.5rem;
}
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
label {
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}
input,
textarea {
  background: rgba(15,23,42,0.32);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 0.55rem;
  padding: 0.5rem 0.6rem;
  color: var(--text);
  font: inherit;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(56,189,248,0.9);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.1);
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 2.1rem 4.5vw 3rem;
  color: var(--muted);
  font-size: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  background: #020617;
}
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.75rem;
}
.footer-links a:hover {
  color: #fff;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  nav { display: none; }

  .hero {
    padding-top: 4.3rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-bg {
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    bottom: -40px;
  }

  .hero-card {
    margin-top: 1.1rem;
  }
}

@media (max-width: 520px) {
  .hero-text h1 {
    font-size: 2.3rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo-text {
    font-size: 1rem;
  }
}

/* --- MOBILE FIX: ensure hero background is visible on all browsers --- */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll !important;
    background-position: center top !important;
    background-size: cover !important;
    display: block !important;
    opacity: 0.28 !important;
  }
}

/* --- MOBILE: ensure the AI artwork shows on phones (Android/iOS) --- */
@media (max-width: 980px) {
  /* hide the inline image on small screens to avoid clipping */
  .hero-bg { display: none !important; }

  /* paint the artwork as a background layer inside the hero */
  .hero {
    position: relative;               /* anchor the pseudo-element */
    min-height: 480px;                /* give it room so the image is visible */
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;                         /* cover the hero */
    background-image: url("assets/hero-tech.jpg");
    background-repeat: no-repeat;
    background-position: center 92%;  /* sit near the bottom */
    background-size: 640px auto;      /* sized for typical phones */
    opacity: 0.28;                    /* same subtle look */
    z-index: 0;                       /* under .hero-overlay (z:1) and content (z:2) */
    pointer-events: none;
    filter: drop-shadow(0 14px 24px rgba(0,0,0,.25));
  }
}

@media (max-width: 520px) {
  .hero { min-height: 520px; }        /* a touch taller on very small devices */
  .hero::before {
    background-size: 700px auto;      /* slightly larger for small phones */
    background-position: center 96%;
  }
}
