/* ============================================================
   Cuthu — modern bold dark theme
   Hand-written, dependency-free. Design tokens at :root.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* surfaces */
  --bg: #0a0a12;
  --bg-2: #0d0d18;
  --surface: #13131f;
  --surface-2: #181826;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* text */
  --text: #f4f4f7;
  --text-muted: #9a9ab0;
  --text-dim: #6c6c82;

  /* brand gradient */
  --c-blue: #4f6bff;
  --c-violet: #8b5cf6;
  --c-magenta: #ff5da2;
  --gradient: linear-gradient(120deg, var(--c-blue), var(--c-violet) 52%, var(--c-magenta));
  --gradient-soft: linear-gradient(120deg, rgba(79, 107, 255, 0.18), rgba(255, 93, 162, 0.18));

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* layout */
  --container: 1200px;
  --radius: 18px;
  --radius-sm: 12px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ambient page glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 60rem at 75% -10%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(50rem 50rem at 0% 30%, rgba(79, 107, 255, 0.12), transparent 55%);
  pointer-events: none;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

::selection {
  background: rgba(139, 92, 246, 0.4);
  color: #fff;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  position: relative;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 3.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
}

.section-intro {
  margin-top: 1.1rem;
  font-size: 1.12rem;
  max-width: 40rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 0.85rem;
  --btn-pad-x: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.25s var(--ease);
}

.btn-primary {
  background: var(--gradient);
  background-origin: border-box; /* size gradient to border box so the 1px transparent border has no edge-colour fringe */
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(123, 99, 255, 0.6);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(123, 99, 255, 0.75);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
}

.nav-logo img {
  height: 1.7rem;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 60;
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 9rem;
  padding-bottom: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

.aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 80%;
  z-index: -1;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: drift 18s var(--ease) infinite alternate;
}

.aurora .b1 {
  width: 38rem;
  height: 38rem;
  left: 8%;
  top: 0;
  background: radial-gradient(circle, var(--c-blue), transparent 65%);
}
.aurora .b2 {
  width: 32rem;
  height: 32rem;
  right: 10%;
  top: -8%;
  background: radial-gradient(circle, var(--c-magenta), transparent 65%);
  animation-delay: -6s;
}
.aurora .b3 {
  width: 30rem;
  height: 30rem;
  left: 38%;
  top: 6%;
  background: radial-gradient(circle, var(--c-violet), transparent 65%);
  animation-delay: -12s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(4rem, 2.5rem, 0) scale(1.12);
  }
}

.hero-inner {
  max-width: 56rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43e0a0;
  box-shadow: 0 0 0 4px rgba(67, 224, 160, 0.18);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  letter-spacing: -0.035em;
}

.hero-sub {
  margin-top: 1.6rem;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 38rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 3.5rem;
}

.hero-meta .stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
}

.hero-meta .stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Brand strip ---------- */
.brands {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.brands-statement {
  max-width: 50rem;
  margin: 0 auto;
  text-align: center;
}

.brands-statement .eyebrow {
  justify-content: center;
}

.brands-statement p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--text-muted);
}

.brands-statement strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Services ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.card:hover::after {
  transform: scaleX(1);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

.card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: #fff;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}

.card p {
  font-size: 0.98rem;
}

/* ---------- Process ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  counter-reset: step;
}

.step {
  padding: 1.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), transparent);
  position: relative;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.step p {
  font-size: 0.95rem;
}

/* ---------- Tech stack ---------- */
.tech {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  padding-block: clamp(3.5rem, 7vw, 5rem);
}

.tech-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tech-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  max-width: 52rem;
  margin: 0 auto;
}

.chip {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), transform 0.25s var(--ease);
}

.chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

/* ---------- Why / stats ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.why-list {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.why-list li {
  display: flex;
  gap: 1rem;
}

.why-list .check {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-top: 0.15rem;
}

.why-list .check svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: var(--c-magenta);
}

.why-list h4 {
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
}

.why-list p {
  font-size: 0.95rem;
}

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

.stat-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-card .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card .label {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  margin: 0 auto;
  max-width: var(--container);
  border-radius: 28px;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
  background: var(--gradient);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(40rem 20rem at 50% -40%, rgba(255, 255, 255, 0.35), transparent 60%);
}

.cta-band > * {
  position: relative;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 34rem;
  margin: 1rem auto 2rem;
  font-size: 1.1rem;
}

.cta-band .btn {
  background: #0a0a12;
  color: #fff;
}

.cta-band .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.6);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info .detail {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-info .detail:last-of-type {
  border-bottom: 0;
}

.contact-info .detail .ico {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.contact-info .detail .ico svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: #fff;
}

.contact-info .detail .k {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.contact-info .detail .v {
  color: var(--text);
  font-weight: 500;
}

.contact-info .detail a.v:hover {
  color: var(--c-blue);
}

.socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.socials a {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease), background 0.25s var(--ease);
}

.socials a:hover {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
  transform: translateY(-2px);
}

.socials svg {
  width: 1.1rem;
  height: 1.1rem;
}

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

.field {
  margin-bottom: 1.1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-violet);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.field textarea {
  resize: vertical;
  min-height: 7rem;
}

.field .error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #ff7a90;
}

.field.invalid input,
.field.invalid textarea {
  border-color: #ff7a90;
}

.field.invalid .error {
  display: block;
}

.contact-form .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2rem;
}

.form-note.success {
  color: #43e0a0;
}

.form-note.error {
  color: #ff7a90;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 3.5rem 2rem;
  background: var(--bg-2);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand img {
  height: 1.6rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  max-width: 22rem;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s var(--ease);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.08s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.16s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.24s;
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 4.75rem 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(12, 12, 22, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.75rem;
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
  }

  .nav.open .nav-menu {
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav-menu .btn {
    margin-top: 1.25rem;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-meta {
    gap: 1.75rem;
  }

  .footer-top {
    flex-direction: column;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
