/* ============================================================
   CRIVELLA.AI — Main Stylesheet
   Clean, modern, international — Arthur Ray Crivella
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --bg: #0c0c12;
  --surface: #111119;
  --surface-2: #1a1a27;
  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(196, 30, 30, 0.35);
  --red: #c41e1e;
  --red-hover: #a61818;
  --red-light: #e05555;
  --text: #f0f0f0;
  --text-muted: #8892b0;
  --text-faint: #4a5272;
  --nav-height: 64px;
  --max-width: 1100px;
  --radius: 10px;
  --radius-sm: 6px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--red-light);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--text);
}

ul {
  list-style: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
}
h4 {
  font-size: 1rem;
  font-weight: 600;
}

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

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-light);
  display: block;
  margin-bottom: 16px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}
.section-sm {
  padding: 60px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Spacing helpers */
.mb-8 {
  margin-bottom: 8px;
}
.mb-12 {
  margin-bottom: 12px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mb-24 {
  margin-bottom: 24px;
}
.mb-32 {
  margin-bottom: 32px;
}
.mb-48 {
  margin-bottom: 48px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mt-32 {
  margin-top: 32px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  letter-spacing: 0.01em;
  font-family: "Inter", sans-serif;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(196, 30, 30, 0.3);
}

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

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

/* ── Nav ────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(12, 12, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.nav-logo-mark {
  width: 30px;
  height: 30px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links .nav-cta {
  background: var(--red);
  color: #fff !important;
  margin-left: 8px;
}

.nav-links .nav-cta:hover {
  background: var(--red-hover);
}

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

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* ── Mobile Nav ─────────────────────────────────────────────── */
.nav-mobile {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px 20px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile a {
  display: block;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-mobile a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    ellipse,
    rgba(196, 30, 30, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    ellipse,
    rgba(167, 139, 250, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 55%, var(--red-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 560px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Page Hero ───────────────────────────────────────────────── */
.page-hero {
  padding: 120px 0 72px;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 1.05rem;
  max-width: 560px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.card:hover {
  border-color: rgba(196, 30, 30, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(196, 30, 30, 0.12);
  color: var(--red-light);
  border: 1px solid rgba(196, 30, 30, 0.2);
}

/* ── Work list cards ─────────────────────────────────────────── */
.work-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Contact Form ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
}

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

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

/* ── Placeholder box ─────────────────────────────────────────── */
.placeholder-box {
  background: var(--surface);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
  min-height: 240px;
  width: 100%;
}

/* ── Footer ──────────────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-faint);
  line-height: 1.7;
  max-width: 300px;
}

.footer-nav h5,
.footer-contact h5 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-contact p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-contact a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-contact a:hover {
  color: var(--red-light);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-bottom a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--red-light);
}

/* ── Global overflow guard ──────────────────────────────────── */
html,
body {
  overflow-x: hidden;
}

/* ── Animations ─────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-1 {
  animation-delay: 0.1s;
}
.fade-up-2 {
  animation-delay: 0.22s;
}
.fade-up-3 {
  animation-delay: 0.38s;
}

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

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .work-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* Override large inline gaps on feature-rows when stacked */
  .feature-row[style*="gap: 72px"],
  .feature-row[style*="gap:72px"] {
    gap: 40px;
  }
  .feature-row[style*="gap: 48px"],
  .feature-row[style*="gap:48px"] {
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .hero-content {
    padding: 60px 24px;
  }
  .hero-content img[style*="height: 80px"] {
    height: 56px !important;
  }
  .section {
    padding: 64px 0;
  }
  .section-sm {
    padding: 40px 0;
  }
  .page-hero {
    padding: 96px 0 48px;
  }
  .page-hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }
  .hero-sub {
    font-size: 1rem;
  }
  /* Tighten inline gaps on mobile */
  .feature-row[style*="gap: 72px"],
  .feature-row[style*="gap:72px"],
  .feature-row[style*="gap: 48px"],
  .feature-row[style*="gap:48px"] {
    gap: 32px;
  }
  /* Stat numbers slightly smaller on phone */
  .stats-strip p[style*="font-size: 3rem"],
  .stats-strip p[style*="font-size: 2.6rem"] {
    font-size: 2.2rem !important;
  }
  /* Prevent horizontal overflow */
  .card {
    min-width: 0;
  }
  .btn {
    white-space: nowrap;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }
}
