/* ================================================
   CodigoFlow — Global Styles
   Dark theme with blue gradient accents
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Custom Properties ─────────────────────────── */
:root {
  --bg: #080b14;
  --bg-surface: #0f1623;
  --bg-card: #111827;
  --border: #1e2d4a;
  --accent: #6c63ff;
  --accent-2: #00d4ff;
  --gradient: linear-gradient(135deg, #6c63ff, #00d4ff);
  --gradient-subtle: linear-gradient(135deg, rgba(108, 99, 255, 0.12), rgba(0, 212, 255, 0.08));
  --text: #f0f4ff;
  --text-muted: #8899bb;
  --text-faint: #4a5a7a;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.2);
  --transition: 0.25s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

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

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

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

ul {
  list-style: none;
}

/* ── Typography ─────────────────────────────────── */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

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

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-right: 0.05em;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* ── Layout Utilities ───────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-header p {
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #000;
  box-shadow: 0 4px 24px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(108, 99, 255, 0.55);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.06);
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.875rem;
}

/* ── Navigation ─────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

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

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

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

.nav-cta {
  margin-left: 0.5rem;
  color: #000 !important;
}

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

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

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

  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-open .nav-links {
    opacity: 1;
    pointer-events: all;
  }

  .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 Section ───────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 5rem 0;
}

.bg-logo {
  position: fixed;
  width: 900px;
  max-width: 90vw;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: grayscale(1);
  z-index: 0;
}


.hero-content {
  position: relative;
  z-index: 1;
  max-width: 840px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 1.75rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Services Grid ──────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

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

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.service-card p {
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* ── Stats Bar ──────────────────────────────────── */
.stats-bar {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
}

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

.stat-value {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── CTA Banner ─────────────────────────────────── */
.cta-banner {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 4rem;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
}

.cta-banner::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.cta-banner h2 {
  margin-bottom: 1rem;
}

.cta-banner p {
  max-width: 480px;
  margin: 0 auto 2rem;
}

/* ── Page Hero (inner pages) ────────────────────── */
.page-hero {
  padding: 6rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ── About Page ─────────────────────────────────── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-visual {
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
}

.story-text h2 {
  margin-bottom: 1.25rem;
}

.story-text p+p {
  margin-top: 1rem;
}

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

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.value-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

/* ── Contact Page ───────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
  width: 100%;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ff4d6d;
}

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

.field-error {
  font-size: 0.78rem;
  color: #ff4d6d;
  margin-top: 0.2rem;
  display: none;
}

.field-error.show {
  display: block;
}

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 1.5rem;
}

.form-message {
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  background: rgba(0, 200, 100, 0.1);
  border: 1px solid rgba(0, 200, 100, 0.3);
  color: #00c864;
  display: block;
}

.form-message.error {
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid rgba(255, 77, 109, 0.3);
  color: #ff4d6d;
  display: block;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.contact-info-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-info-card p {
  font-size: 0.9rem;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* ── Footer ─────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 4rem;
}

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

.footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-logo-img {
  height: 28px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

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

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-visual {
    display: none;
  }

  .values-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

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

  .values-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 2.5rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}