/* ==========================================
   AIFORIA — style.css
   Full Responsive Design Overhaul
   ========================================== */

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

/* --- VARIABLES --- */
:root {
  /* Backgrounds */
  --c-bg:          #F5F7FC;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #EEF2FF;

  /* Text */
  --c-text:        #0F172A;
  --c-text-2:      #1E293B;
  --c-muted:       #64748B;
  --c-muted-2:     #94A3B8;

  /* Brand */
  --c-indigo:      #4F46E5;
  --c-indigo-d:    #3730A3;
  --c-indigo-l:    #EEF2FF;
  --c-indigo-m:    #C7D2FE;
  --c-violet:      #7C3AED;
  --c-violet-l:    #F5F3FF;

  /* Accents */
  --c-teal:        #0D9488;
  --c-teal-l:      #CCFBF1;
  --c-sky:         #0284C7;
  --c-sky-l:       #E0F2FE;
  --c-orange:      #EA580C;
  --c-orange-l:    #FFF7ED;
  --c-rose:        #E11D48;
  --c-rose-l:      #FFF1F2;
  --c-emerald:     #059669;
  --c-emerald-l:   #ECFDF5;

  /* Dark surfaces */
  --c-dark:        #080E1C;
  --c-dark-2:      #0F172A;
  --c-dark-card:   #111827;
  --c-dark-card-2: #1A2235;
  --c-dark-border: rgba(255,255,255,0.07);
  --c-dark-border-2: rgba(255,255,255,0.13);
  --c-on-dark:     #F9FAFB;
  --c-on-dark-2:   #E5E7EB;
  --c-on-dark-m:   #9CA3AF;

  /* Borders */
  --c-border:      #E2E8F0;
  --c-border-2:    #CBD5E1;

  /* Status */
  --c-success:     #059669;
  --c-error:       #DC2626;

  /* Shadows */
  --sh-xs:   0 1px 2px rgba(15,23,42,0.06);
  --sh-sm:   0 2px 6px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.05);
  --sh-md:   0 6px 20px rgba(15,23,42,0.09), 0 2px 6px rgba(15,23,42,0.05);
  --sh-lg:   0 12px 36px rgba(15,23,42,0.11), 0 4px 12px rgba(15,23,42,0.06);
  --sh-xl:   0 24px 56px rgba(15,23,42,0.13), 0 8px 20px rgba(15,23,42,0.07);
  --sh-glow: 0 0 0 3px rgba(79,70,229,0.15), 0 8px 32px rgba(79,70,229,0.22);

  /* Radius */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-pill: 9999px;

  /* Fonts */
  --f-head: 'Manrope', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 220ms ease;
  --t-slow: 350ms ease;

  /* ---- ALIASES for inner pages ---- */
  --font-heading:   'Manrope', system-ui, sans-serif;
  --font-body:      'Inter', system-ui, sans-serif;
  --text:           #0F172A;
  --text-secondary: #64748B;
  --accent:         #4F46E5;
  --accent-d:       #3730A3;
  --accent-light:   #EEF2FF;
  --border:         #E2E8F0;
  --success:        #059669;
  --radius-xs:      6px;
  --radius-sm:      10px;
  --radius-md:      14px;
  --radius-lg:      18px;
  --radius-pill:    9999px;
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--f-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-width: 320px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-head);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; transition: color var(--t-fast); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* --- CONTAINER --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}
@media (min-width: 640px)  { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

/* --- SECTION PADDING --- */
.section     { padding: 4rem 0; }
.section--sm { padding: 3rem 0; }
@media (min-width: 768px) {
  .section     { padding: 5.5rem 0; }
  .section--sm { padding: 4rem 0; }
}
@media (min-width: 1024px) {
  .section     { padding: 7rem 0; }
  .section--sm { padding: 5rem 0; }
}

/* Section themes — UNIFIED: all light sections use --c-bg */
.s-light { background: var(--c-bg); }
.s-white { background: var(--c-bg); }   /* Same as s-light for unified look */
.s-alt   { background: var(--c-surface-2); }
.s-dark  { background: var(--c-dark); }

/* Inner page section classes */
.section-light { background: var(--c-bg); padding: 4rem 0; }
.section-alt   { background: var(--c-bg); padding: 4rem 0; }
.section-dark  { background: var(--c-dark); padding: 4rem 0; }
@media (min-width: 768px) {
  .section-light { padding: 5.5rem 0; }
  .section-alt   { padding: 5.5rem 0; }
  .section-dark  { padding: 5.5rem 0; }
}
@media (min-width: 1024px) {
  .section-light { padding: 7rem 0; }
  .section-alt   { padding: 7rem 0; }
  .section-dark  { padding: 7rem 0; }
}

/* --- SECTION HEADER --- */
.sec-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) { .sec-head { margin-bottom: 3rem; } }

.sec-head h2, .section-header h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 0.625rem;
}
.sec-head p {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.sec-head--dark h2 { color: var(--c-on-dark); }
.sec-head--dark p  { color: var(--c-on-dark-m); }

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header p { color: var(--c-muted); max-width: 520px; margin: 0 auto; }

/* --- BADGE --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--r-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}
.badge--dark {
  background: rgba(79,70,229,0.14);
  color: #A5B4FC;
  border: 1px solid rgba(99,102,241,0.28);
}
.badge--light {
  background: var(--c-indigo-l);
  color: var(--c-indigo);
  border: 1px solid var(--c-indigo-m);
}
.badge--white {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.2);
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2.2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.7); }
}

/* --- CARD BASE --- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}
@media (min-width: 640px) { .card { padding: 2rem; } }
.card:hover { box-shadow: var(--sh-md); }

/* Card variants for inner pages */
.card-light {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card-hover:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast),
              box-shadow var(--t-fast), transform var(--t-fast),
              border-color var(--t-fast);
  padding: 0.8125rem 1.5rem;
}
.btn:active  { transform: scale(0.97); }
.btn:focus-visible {
  outline: 3px solid rgba(79,70,229,0.4);
  outline-offset: 2px;
}

/* Primary */
.btn-primary {
  background: var(--c-indigo);
  color: #fff;
  box-shadow: 0 1px 3px rgba(79,70,229,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: var(--c-indigo-d);
  box-shadow: var(--sh-glow);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--c-indigo);
  border: 2px solid var(--c-indigo);
}
.btn-outline:hover { background: var(--c-indigo); color: #fff; }

/* Ghost on dark bg */
.btn-ghost-dark {
  background: rgba(255,255,255,0.09);
  color: var(--c-on-dark);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-ghost-dark:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.25);
}

/* Ghost on white bg */
.btn-ghost-light {
  background: transparent;
  color: var(--c-text-2);
  border: 1.5px solid var(--c-border-2);
}
.btn-ghost-light:hover { border-color: var(--c-indigo); color: var(--c-indigo); }

/* Shadow glow (inner pages) */
.shadow-glow { box-shadow: 0 4px 24px rgba(79,70,229,0.4); }
.shadow-glow:hover { box-shadow: 0 6px 32px rgba(79,70,229,0.55); }

/* Sizes */
.btn-sm  { padding: 0.5625rem 1rem;    font-size: 0.875rem;  }
.btn-lg  { padding: 0.9375rem 1.875rem; font-size: 1rem;     }
.btn-xl  { padding: 1.125rem 2.25rem;  font-size: 1.0625rem; }
.btn-block { width: 100%; justify-content: center; }

/* =========================================
   HEADER
   ========================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: background var(--t-slow), box-shadow var(--t-slow), border-color var(--t-slow);
}
header > .container {
  height: 64px;
  display: flex;
  align-items: center;
}
header.scrolled {
  background: rgba(8,14,28,0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--c-dark-border-2);
  box-shadow: 0 4px 32px rgba(0,0,0,0.32);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

/* Logo */
.logo {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: 1.4375rem;
  color: #fff;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
  gap: 0;
}
.logo-ai, .logo .ai {
  background: linear-gradient(135deg, #818CF8 0%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-rest, .logo span:not(.ai):not(.logo-ai) { color: #fff; -webkit-text-fill-color: #fff; }

/* Nav */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-links a {
  padding: 0.5rem 0.875rem;
  color: var(--c-on-dark-m);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--c-on-dark); background: rgba(255,255,255,0.07); }

.header-cta { display: none; }
@media (min-width: 1024px) { .header-cta { display: flex; } }

/* Hamburger */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--c-on-dark);
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.menu-btn:hover { background: rgba(255,255,255,0.1); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: rgba(8,14,28,0.98);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--c-dark-border);
}
.mobile-menu.open { display: block; }
.mobile-menu ul {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-menu a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--c-on-dark-m);
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.mobile-menu a:hover { color: var(--c-on-dark); background: rgba(255,255,255,0.06); }
.mobile-menu-cta {
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--c-dark-border);
}
.mobile-menu-cta .btn,
.mobile-menu-cta a.btn { width: 100%; justify-content: center; }

/* =========================================
   HERO SECTION (index.html)
   ========================================= */
.hero-section {
  background: var(--c-dark);
  padding-top: calc(64px + 2.5rem);
  padding-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-section {
    padding-top: calc(64px + 3.5rem);
    padding-bottom: 3.5rem;
  }
}

/* Ambient glow decorations */
.hero-section::before,
.hero-section::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-section::before {
  top: -280px; right: -180px;
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(79,70,229,0.2) 0%, transparent 68%);
}
.hero-section::after {
  bottom: -200px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.14) 0%, transparent 70%);
}

/* Dot grid overlay */
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* Hero bento grid */
.bento-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .bento-hero {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
@media (min-width: 1024px) {
  .bento-hero {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
  }
  .bento-hero-main  { grid-column: 1 / 4; grid-row: 1 / 3; }
  .bento-stat-1     { grid-column: 4;     grid-row: 1;     }
  .bento-stat-2     { grid-column: 4;     grid-row: 2;     }
  .bento-stat-3     { grid-column: 1 / 3; grid-row: 3;     }
  .bento-cta-mini   { grid-column: 1 / 5; grid-row: 3;     }
}

/* Hero main card */
.bento-hero-main {
  background: var(--c-dark-card);
  border: 1px solid var(--c-dark-border-2);
  border-radius: var(--r-2xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .bento-hero-main {
    grid-column: 1 / 4;
    padding: 2.25rem;
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .bento-hero-main {
    padding: 2.75rem;
    gap: 1.625rem;
    min-height: 320px;
  }
}

.bento-hero-main h1 {
  font-size: clamp(1.75rem, 5vw, 3.875rem);
  font-weight: 800;
  color: var(--c-on-dark);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.bento-hero-main h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #818CF8 0%, #C4B5FD 50%, #A5B4FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--c-on-dark-m);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 520px;
}
@media (min-width: 768px) { .hero-desc { font-size: 1.0625rem; } }

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}
@media (max-width: 400px) {
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; }
}

/* Hero stat cards */
.bento-stat {
  background: var(--c-dark-card);
  border: 1px solid var(--c-dark-border-2);
  border-radius: var(--r-xl);
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.375rem;
  min-height: 112px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), transform var(--t-base);
}
@media (min-width: 1024px) {
  .bento-stat { padding: 1.625rem; min-height: 128px; }
}
.bento-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.2);
}
.bento-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.bento-stat-1::before { background: linear-gradient(90deg, #6366F1, #818CF8); }
.bento-stat-2::before { background: linear-gradient(90deg, #0D9488, #5EEAD4); }
.bento-stat-3::before { background: linear-gradient(90deg, #7C3AED, #C4B5FD); }

.stat-value {
  font-family: var(--f-head);
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 800;
  line-height: 1;
}
.bento-stat-1 .stat-value { color: #A5B4FC; }
.bento-stat-2 .stat-value { color: #5EEAD4; }
.bento-stat-3 .stat-value { color: #C4B5FD; }

.stat-label {
  font-size: 0.8125rem;
  color: var(--c-on-dark-m);
  font-weight: 500;
  line-height: 1.4;
}

/* Stat icon bg */
.stat-icon-wrap {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
}
.bento-stat-1 .stat-icon-wrap { background: #6366F1; color: #fff; }
.bento-stat-2 .stat-icon-wrap { background: #0D9488; color: #fff; }
.bento-stat-3 .stat-icon-wrap { background: #7C3AED; color: #fff; }

/* Hero CTA mini card */
.bento-cta-mini {
  background: linear-gradient(135deg, var(--c-indigo) 0%, var(--c-violet) 100%);
  border-radius: var(--r-xl);
  border: none;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.875rem;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) {
  .bento-cta-mini { grid-column: 1 / 5; }
}
@media (min-width: 1024px) {
  .bento-cta-mini { padding: 1.875rem; min-height: 128px; }
}
.bento-cta-mini::before {
  content: '';
  position: absolute;
  top: -60%; right: -15%;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.09);
  pointer-events: none;
}

.bento-cta-mini p {
  color: rgba(255,255,255,0.92);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.55;
  position: relative;
}
.bento-cta-mini .btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  position: relative;
}
.bento-cta-mini .btn:hover { background: rgba(255,255,255,0.24); }

/* =========================================
   PROBLEMS SECTION
   ========================================= */
.bento-problems {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}
@media (min-width: 600px) { .bento-problems { grid-template-columns: 1fr 1fr; } }

.problem-card {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1.5rem;
}
@media (min-width: 640px) { .problem-card { padding: 1.875rem; } }
.problem-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }

.prob-before {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.prob-x-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #FEF2F2;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.prob-x-icon svg { color: var(--c-error); }

.prob-before-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-text-2);
  line-height: 1.45;
}

.prob-arrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.125rem 0;
  color: var(--c-muted-2);
}
.prob-arrow-line {
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.prob-after {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #F0FDF9;
  padding: 0.875rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid #BBF7D0;
}
.prob-check-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c-emerald);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.prob-check-icon svg { color: #fff; }

.prob-after-text {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #065F46;
  line-height: 1.45;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.bento-services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .bento-services { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .bento-services {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
  }
  .svc-card:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
  .svc-card:nth-child(4) { grid-column: 2 / 4; }
  .svc-card:nth-child(5) { grid-column: 1 / 3; }
}

.svc-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
@media (min-width: 640px) { .svc-card { padding: 1.875rem; } }
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.svc-card:hover .svc-arrow { transform: translateX(4px); }

/* Reset grid spans on mobile/tablet for bento */
@media (max-width: 1023px) {
  .svc-card:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Featured service card (1st) */
.svc-card:nth-child(1) {
  background: var(--c-dark);
  border-color: rgba(99,102,241,0.3);
}
.svc-card:nth-child(1):hover { border-color: rgba(99,102,241,0.55); }

/* Service icon */
.svc-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@media (min-width: 640px) { .svc-icon { width: 52px; height: 52px; } }
.svc-icon--dark   { background: rgba(99,102,241,0.15); color: #A5B4FC; }
.svc-icon--indigo { background: var(--c-indigo-l);    color: var(--c-indigo); }
.svc-icon--violet { background: var(--c-violet-l);    color: var(--c-violet); }
.svc-icon--teal   { background: var(--c-teal-l);      color: var(--c-teal); }
.svc-icon--orange { background: var(--c-orange-l);    color: var(--c-orange); }
.svc-icon--sky    { background: var(--c-sky-l);       color: var(--c-sky); }
.svc-icon--rose   { background: var(--c-rose-l);      color: var(--c-rose); }

/* Service icon (inner pages) */
.service-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  background: var(--c-indigo-l);
  color: var(--c-indigo);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-icon svg { width: 24px; height: 24px; }

.svc-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.3;
}
@media (min-width: 640px) { .svc-card h3 { font-size: 1.125rem; } }
.svc-card:nth-child(1) h3 { color: var(--c-on-dark); font-size: 1.125rem; }
@media (min-width: 640px) { .svc-card:nth-child(1) h3 { font-size: 1.25rem; } }

.svc-card > p {
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.7;
  flex: 1;
}
.svc-card:nth-child(1) > p { color: rgba(255,255,255,0.65); }

.svc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-indigo);
  margin-top: auto;
}
.svc-card:nth-child(1) .svc-link { color: #A5B4FC; }
.svc-arrow { transition: transform var(--t-fast); }

/* Services grid for inner pages */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr 1fr; } }

/* =========================================
   PROCESS SECTION
   ========================================= */
.bento-process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}
@media (min-width: 600px) { .bento-process { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .bento-process { grid-template-columns: 1fr 1fr 1fr 1fr; gap: 1.25rem; } }

.process-card {
  background: var(--c-dark-card);
  border: 1px solid var(--c-dark-border-2);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  position: relative;
  transition: border-color var(--t-base), transform var(--t-base);
}
@media (min-width: 640px) { .process-card { padding: 2rem; } }
.process-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-3px);
}

.process-number {
  font-family: var(--f-head);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(99,102,241,0.15));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.process-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-on-dark);
  margin-bottom: 0.625rem;
}
.process-card p {
  font-size: 0.875rem;
  color: var(--c-on-dark-m);
  line-height: 1.7;
}

/* Connector between cards */
@media (min-width: 1024px) {
  .process-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -0.875rem;
    width: 0.875rem;
    height: 1px;
    background: rgba(99,102,241,0.25);
    transform: translateY(-50%);
  }
}

/* =========================================
   CASES SECTION
   ========================================= */
.bento-cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) { .bento-cases { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .bento-cases { grid-template-columns: 1fr 1fr 1fr; }
  .case-card-featured { grid-column: 1 / 3; }
}

.case-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
@media (min-width: 640px) { .case-card { padding: 2rem; } }
.case-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }

.case-card-featured {
  background: linear-gradient(150deg, #0A0F1E 0%, #131A2E 55%, #190E36 100%);
  border: 1px solid rgba(99,102,241,0.22);
}
.case-card-featured:hover { border-color: rgba(99,102,241,0.4); }

.case-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  align-self: flex-start;
  background: var(--c-indigo-l);
  color: var(--c-indigo);
}
.case-card-featured .case-tag {
  background: rgba(99,102,241,0.15);
  color: #A5B4FC;
}

.case-metric {
  font-family: var(--f-head);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--c-emerald);
}
.case-card-featured .case-metric {
  color: #6EE7B7;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
}

.case-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.35;
}
@media (min-width: 640px) { .case-card h3 { font-size: 1.0625rem; } }
.case-card-featured h3 {
  color: var(--c-on-dark);
  font-size: 1.125rem;
}
@media (min-width: 640px) { .case-card-featured h3 { font-size: 1.375rem; } }

.case-card > p {
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.7;
  flex: 1;
}
.case-card-featured > p { color: var(--c-on-dark-m); }

.case-results {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 0.25rem;
}
.case-result { display: flex; flex-direction: column; gap: 0.125rem; }
.result-number {
  font-family: var(--f-head);
  font-size: 1.375rem;
  font-weight: 700;
  color: #6EE7B7;
}
@media (min-width: 640px) { .result-number { font-size: 1.5rem; } }
.result-text { font-size: 0.75rem; color: var(--c-on-dark-m); }

/* =========================================
   ABOUT SECTION
   ========================================= */
.bento-about {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .bento-about { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .bento-about { grid-template-columns: 5fr 4fr 4fr; gap: 1.25rem; }
  .about-main { grid-row: 1 / 3; }
}

.about-main {
  background: var(--c-indigo);
  border: none;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .about-main { grid-column: 1 / 3; padding: 2.25rem; }
}
@media (min-width: 1024px) {
  .about-main { grid-column: auto; padding: 2.5rem; }
}

.about-main h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  color: #fff;
  line-height: 1.2;
}
.about-main > p {
  color: rgba(255,255,255,0.78);
  font-size: 0.9375rem;
  line-height: 1.75;
  flex: 1;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.about-stat-item { display: flex; flex-direction: column; gap: 0.125rem; }
.about-stat-num {
  font-family: var(--f-head);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.about-stat-lab {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  line-height: 1.4;
}
.about-main .btn-outline {
  align-self: flex-start;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.about-main .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.65);
}

/* Testimonials */
.about-testimonial {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) { .about-testimonial { padding: 2rem; } }
.quote-mark {
  position: absolute;
  top: 0.75rem; right: 1.25rem;
  font-family: Georgia, serif;
  font-size: 6rem;
  line-height: 1;
  color: var(--c-indigo-m);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}
.testimonial-text {
  font-size: 0.9375rem;
  color: var(--c-text-2);
  line-height: 1.78;
  flex: 1;
  position: relative;
  z-index: 1;
  font-style: italic;
  padding-right: 1rem;
}
.testi-stars {
  display: flex;
  gap: 0.2rem;
  color: #F59E0B;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  position: relative;
  z-index: 1;
  margin-top: auto;
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-indigo), var(--c-violet));
}
.author-avatar-2 { background: linear-gradient(135deg, var(--c-teal), var(--c-sky)); }

.author-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--c-text);
  display: block;
}
.author-pos {
  font-size: 0.8125rem;
  color: var(--c-muted);
  display: block;
}

/* Trust / NDA card */
.about-nda {
  background: var(--c-dark);
  border-color: var(--c-dark-border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
@media (min-width: 640px) { .about-nda { padding: 2rem; } }

/* Tech stack card */
.about-tech {
  background: var(--c-dark);
  border-color: var(--c-dark-border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
@media (min-width: 640px) { .about-tech { padding: 2rem; } }
.about-tech h3 { font-size: 1rem; font-weight: 700; color: var(--c-on-dark); }
.about-tech > p { font-size: 0.875rem; color: var(--c-on-dark-m); line-height: 1.65; }
.nda-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  color: #A5B4FC;
  flex-shrink: 0;
}
.about-nda h3 { font-size: 1rem; font-weight: 700; color: var(--c-on-dark); }
.about-nda > p { font-size: 0.875rem; color: var(--c-on-dark-m); line-height: 1.65; }

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.25rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--c-on-dark-m);
}
.trust-item svg { color: var(--c-on-dark-m); flex-shrink: 0; opacity: 0.5; }

/* =========================================
   FAQ SECTION
   ========================================= */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--c-surface);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.faq-item:hover { border-color: var(--c-indigo-m); }
.faq-item.active {
  border-color: var(--c-indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}

.faq-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.125rem 1.375rem;
  text-align: left;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--f-head);
  transition: background var(--t-fast);
}
@media (min-width: 640px) { .faq-btn { padding: 1.25rem 1.625rem; } }
.faq-btn:hover { background: var(--c-bg); }
.faq-btn[aria-expanded="true"] { background: var(--c-indigo-l); }

.faq-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.4;
}
@media (min-width: 640px) { .faq-question { font-size: 1rem; } }
.faq-icon {
  color: var(--c-muted-2);
  flex-shrink: 0;
  transition: transform 0.25s ease, color var(--t-fast);
}
.faq-icon.open {
  transform: rotate(180deg);
  color: var(--c-indigo);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
.faq-answer.open { max-height: 400px; }
.faq-answer p {
  padding: 0 1.375rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.78;
}
@media (min-width: 640px) { .faq-answer p { padding: 0 1.625rem 1.375rem; } }

/* =========================================
   CTA SECTION
   ========================================= */
.section-cta {
  background: var(--c-dark);
  padding: 4rem 0;
}
@media (min-width: 768px) { .section-cta { padding: 5.5rem 0; } }
@media (min-width: 1024px) { .section-cta { padding: 7rem 0; } }

/* Inner pages CTA */
.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-section .cta-glow,
.cta-glow {
  position: absolute;
  bottom: -160px; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79,70,229,0.24) 0%, transparent 70%);
  pointer-events: none;
}
.cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}
.cta-content h2 {
  font-size: clamp(1.625rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--c-on-dark);
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 640px;
}
.cta-content > p {
  color: var(--c-on-dark-m);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.75;
}
@media (min-width: 768px) { .cta-content > p { font-size: 1.0625rem; } }

.cta-card {
  background: linear-gradient(150deg, #080E1C 0%, #13102A 55%, #1A1040 100%);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: var(--r-2xl);
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 840px;
  margin: 0 auto;
}
@media (min-width: 640px) { .cta-card { padding: 3.5rem 2.5rem; } }
@media (min-width: 1024px) { .cta-card { padding: 4rem 3rem; } }
.cta-card:hover { border-color: rgba(99,102,241,0.4); }

.cta-card .cta-glow {
  position: absolute;
  bottom: -160px; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79,70,229,0.24) 0%, transparent 70%);
  pointer-events: none;
}
.cta-card .cta-content { position: relative; z-index: 1; }

.cta-card .cta-content h2 {
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  margin-bottom: 1rem;
}
.cta-card .cta-content > p {
  margin: 0 auto 2rem;
}

.cta-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
}

/* =========================================
   PAGE HERO (inner pages)
   ========================================= */
.page-hero {
  background: var(--c-dark);
  padding-top: calc(64px + 2.5rem);
  padding-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .page-hero {
    padding-top: calc(64px + 3.5rem);
    padding-bottom: 3.5rem;
  }
}

.grid-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
.grid-pattern::after {
  content: '';
  position: absolute;
  top: -200px; right: -150px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79,70,229,0.2) 0%, transparent 68%);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--c-on-dark);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
}
.page-hero > .container > p,
.page-hero p {
  color: var(--c-on-dark-m);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}
@media (min-width: 768px) { .page-hero > .container > p, .page-hero p { font-size: 1.0625rem; } }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--c-on-dark-m);
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--c-on-dark-m);
  transition: color var(--t-fast);
}
.breadcrumbs a:hover { color: var(--c-on-dark); }
.breadcrumbs span { color: rgba(255,255,255,0.55); }

/* =========================================
   CONTACT PAGE
   ========================================= */
.contact-section { padding: 4rem 0; }
@media (min-width: 768px) { .contact-section { padding: 5.5rem 0; } }
@media (min-width: 1024px) { .contact-section { padding: 7rem 0; } }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* Service detail grid (services page) */
.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* =========================================
   FOOTER
   ========================================= */
body > footer {
  background: var(--c-dark-2);
  color: var(--c-on-dark-m);
  border-top: 1px solid var(--c-dark-border);
  overflow-wrap: break-word;
  word-break: break-word;
}
.footer-inner { padding: 3rem 0 2rem; }
@media (min-width: 768px) { .footer-inner { padding: 3.5rem 0 2rem; } }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 600px)  { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2.5fr 1fr 1fr 1.25fr; gap: 2.5rem; margin-bottom: 2.5rem; } }

.footer-brand .logo { margin-bottom: 1rem; display: inline-flex; }
.footer-brand > p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 260px;
  margin-bottom: 1.25rem;
}
.social-links {
  display: flex;
  gap: 0.625rem;
}
.social-link {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-on-dark-m);
  transition: background var(--t-fast), color var(--t-fast);
}
.social-link:hover { background: var(--c-indigo); color: #fff; }

.footer-col h3 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-on-dark);
  margin-bottom: 1rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.footer-col a {
  font-size: 0.875rem;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--c-on-dark); }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  word-break: break-word;
}
.footer-contact-item svg { color: var(--c-indigo); flex-shrink: 0; }
.footer-contact-item a:hover { color: var(--c-on-dark); }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-dark-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-bottom a:hover { color: var(--c-on-dark); }

/* =========================================
   MODAL
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Glass modal box */
.modal-box {
  position: relative;
  z-index: 1;
  background: rgba(15, 20, 40, 0.78);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-2xl);
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
/* Ambient glow inside glass */
.modal-box::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(79,70,229,0.2) 0%, transparent 70%);
  pointer-events: none;
}
@media (min-width: 640px) { .modal-box { padding: 2rem; } }
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: background var(--t-fast), color var(--t-fast);
  z-index: 2;
}
.modal-close:hover {
  background: rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.4);
  color: #FDA4AF;
}

.modal-header { margin-bottom: 1.25rem; }
.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}
@media (min-width: 640px) { .modal-title { font-size: 1.375rem; } }
.modal-subtitle { color: rgba(255, 255, 255, 0.5); font-size: 0.85rem; }

/* Form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 420px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}
.required { color: #F87171; }

.form-input, .form-textarea {
  padding: 0.6875rem 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-family: var(--f-body);
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  outline: none;
  width: 100%;
}
.form-input::placeholder, .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}
.form-input:focus, .form-textarea:focus {
  border-color: rgba(99, 102, 241, 0.7);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  background: rgba(255, 255, 255, 0.11);
}
.form-input.error, .form-textarea.error {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.form-textarea { resize: none; min-height: 72px; }

.field-error {
  font-size: 0.75rem;
  color: #F87171;
  min-height: 1rem;
  display: block;
}

.form-note {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.625rem;
}
.form-note a { color: #A5B4FC; text-decoration: underline; }

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.875rem;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 0.9375rem;
}
.form-success.show { display: flex; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6EE7B7;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.875rem;
  font-weight: 700;
}
.form-success h3 { font-size: 1.25rem; color: #fff; }
.form-success p  { color: rgba(255,255,255,0.55); font-size: 0.9rem; font-weight: 400; }

/* =========================================
   UTILITIES
   ========================================= */
.text-center { text-align: center; }
.mt-4   { margin-top: 1rem; }
.mt-8   { margin-top: 2rem; }
.mt-10  { margin-top: 2.5rem; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; justify-content: center; }
.max-w-sm { max-width: 480px; margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 640px; margin-left: auto; margin-right: auto; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.fade-in { animation: fadeUp 0.5s ease forwards; }

/* =========================================
   SCROLLBAR
   ========================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-muted-2); }
