/* SteelFrame Studio SEO — Design System
   Matches steelframestudio.com.ar dark theme */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&display=swap');

/* === Variables === */
:root {
  --void: #070B14;
  --plate: #0C1221;
  --beam: #131B2E;
  --rivet: #1E293B;
  --weld: #334155;
  --zinc: #94A3B8;
  --bright: #E2E8F0;
  --white: #F8FAFC;
  --steel: #3B82F6;
  --steel-deep: #1D4ED8;
  --steel-glow: #60A5FA;
  --forge: #F59E0B;
  --forge-hot: #FBBF24;
  --ok: #10B981;
  --red: #EF4444;
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--void);
  color: var(--bright);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--steel-glow); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }

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

/* === Navigation === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rivet);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  display: flex; align-items: center; gap: 0.5rem;
}

.nav-logo span { color: var(--steel); }

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zinc);
  transition: color 0.25s var(--ease);
}

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

.nav-cta {
  background: var(--steel) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem !important;
  transition: background 0.25s var(--ease), box-shadow 0.25s;
}

.nav-cta:hover {
  background: var(--steel-deep) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.nav-hamburger {
  display: none;
  background: none; border: none; color: var(--bright); font-size: 1.5rem; cursor: pointer;
}

/* === Page Layout === */
.page { padding-top: 64px; min-height: 100vh; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

/* === Typography === */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

h1 em { font-style: italic; color: var(--steel-glow); }

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--white);
  margin-bottom: 1rem;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bright);
  margin-bottom: 0.75rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--zinc);
  max-width: 640px;
  margin-bottom: 2rem;
}

.mono { font-family: var(--font-mono); }
.text-steel { color: var(--steel); }
.text-forge { color: var(--forge); }
.text-ok { color: var(--ok); }
.text-zinc { color: var(--zinc); }

/* === Cards === */
.card {
  background: var(--plate);
  border: 1px solid var(--rivet);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

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

.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: var(--radius);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* === Grid === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--steel);
  color: var(--white);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background: var(--steel-deep);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.35);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--zinc);
  border: 1px solid var(--weld);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: var(--steel);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--zinc);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  background: var(--beam);
  border: 1px solid var(--rivet);
  color: var(--bright);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s;
}

.form-control:focus {
  outline: none;
  border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* === Results === */
.result-box {
  background: var(--beam);
  border: 1px solid var(--rivet);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.result-row:last-child { border-bottom: none; }

.result-label { color: var(--zinc); font-size: 0.9rem; }
.result-value { color: var(--white); font-weight: 600; font-family: var(--font-mono); }
.result-value.highlight { color: var(--steel-glow); font-size: 1.1rem; }

/* === Tables === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--beam);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zinc);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--rivet);
}

.data-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
  color: var(--bright);
}

.data-table tr:hover td { background: rgba(59, 130, 246, 0.05); }

/* === CTA Box === */
.cta-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--steel);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}

.cta-box h3 { color: var(--white); margin-bottom: 0.75rem; }
.cta-box p { color: var(--zinc); margin-bottom: 1.25rem; }

/* === Chat Widget === */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  max-width: 85%;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--steel);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--plate);
  border: 1px solid var(--rivet);
  color: var(--bright);
  border-bottom-left-radius: 4px;
}

.chat-bubble.assistant h2 { font-size: 1.1rem; margin-top: 0.75rem; }
.chat-bubble.assistant h3 { font-size: 1rem; margin-top: 0.5rem; }
.chat-bubble.assistant p { margin-bottom: 0.5rem; }
.chat-bubble.assistant ul, .chat-bubble.assistant ol { padding-left: 1.25rem; margin-bottom: 0.5rem; }
.chat-bubble.assistant table { width: 100%; margin: 0.5rem 0; font-size: 0.85rem; }
.chat-bubble.assistant th { color: var(--zinc); text-align: left; padding: 0.3rem 0.5rem; }
.chat-bubble.assistant td { padding: 0.3rem 0.5rem; border-top: 1px solid var(--rivet); }
.chat-bubble.assistant code { background: var(--beam); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85rem; font-family: var(--font-mono); }
.chat-bubble.assistant strong { color: var(--white); }

.chat-typing {
  align-self: flex-start;
  padding: 0.75rem 1.25rem;
  background: var(--plate);
  border: 1px solid var(--rivet);
  border-radius: 12px;
  color: var(--zinc);
  font-style: italic;
  display: none;
}

.chat-typing.active { display: block; }

.chat-input-area {
  padding: 1rem 1.5rem;
  background: var(--plate);
  border-top: 1px solid var(--rivet);
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: var(--beam);
  border: 1px solid var(--rivet);
  color: var(--bright);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: none;
}

.chat-input:focus {
  outline: none;
  border-color: var(--steel);
}

.chat-send {
  background: var(--steel);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.25s;
}

.chat-send:hover { background: var(--steel-deep); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Blog === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--plate);
  border: 1px solid var(--rivet);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease), border-color 0.3s;
  display: flex;
  flex-direction: column;
}

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

.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--weld);
  margin-bottom: 0.75rem;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.blog-card h3 a { color: var(--white); }
.blog-card h3 a:hover { color: var(--steel-glow); }

.blog-card p {
  color: var(--zinc);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card .read-more {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
}

/* === Article === */
.article-content {
  max-width: 760px;
  margin: 0 auto;
}

.article-content h1 { margin-bottom: 0.5rem; }

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--weld);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rivet);
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.3);
}

.article-content h3 { margin-top: 1.5rem; }

.article-content p { margin-bottom: 1rem; color: var(--bright); }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-content li { margin-bottom: 0.4rem; color: var(--bright); }
.article-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.article-content th { background: var(--beam); padding: 0.6rem 1rem; text-align: left; font-size: 0.85rem; color: var(--zinc); font-family: var(--font-mono); border-bottom: 1px solid var(--rivet); }
.article-content td { padding: 0.6rem 1rem; border-bottom: 1px solid rgba(30, 41, 59, 0.4); }
.article-content code { background: var(--beam); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.9rem; font-family: var(--font-mono); }
.article-content blockquote { border-left: 3px solid var(--steel); padding-left: 1rem; margin: 1rem 0; color: var(--zinc); font-style: italic; }
.article-content strong { color: var(--white); }

/* === Hero === */
.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero .subtitle { margin-left: auto; margin-right: auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 6px; height: 6px;
  background: var(--ok);
  border-radius: 50%;
}

/* === Footer === */
.footer {
  background: var(--plate);
  border-top: 1px solid var(--rivet);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

.footer-brand p { color: var(--zinc); font-size: 0.9rem; margin-top: 0.75rem; }

.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--weld);
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer li a { color: var(--zinc); font-size: 0.9rem; }
.footer li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--rivet);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--weld);
}

/* === Stat Blocks === */
.stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-block {
  background: var(--plate);
  border: 1px solid var(--rivet);
  border-radius: var(--radius);
  padding: 1.25rem;
  flex: 1;
  min-width: 150px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--zinc);
  margin-top: 0.25rem;
}

/* === Loading === */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--rivet);
  border-top-color: var(--steel);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Lead Capture Modal === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7, 11, 20, 0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--plate);
  border: 1px solid var(--rivet);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 90%;
}

.modal h3 { margin-bottom: 0.5rem; }
.modal p { color: var(--zinc); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal .btn { width: 100%; justify-content: center; }
.modal-close { background: none; border: none; color: var(--zinc); cursor: pointer; float: right; font-size: 1.2rem; }

/* === Animations === */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--plate);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--rivet);
  }
  .nav-hamburger { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { flex-direction: column; }
  .blog-grid { grid-template-columns: 1fr; }
  .chat-bubble { max-width: 95%; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
