@import url("tokens.d80b4fcfa743.css");

/* Reset y base portados del sistema de diseño de ago.cl */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: var(--lh-base);
  overflow-x: hidden;
  font-feature-settings: "ss01" on, "cv02" on, "cv11" on;
  font-weight: var(--fw-regular);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--petrol);
  text-wrap: balance;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}
h1 { font-size: var(--fs-h1); font-weight: var(--fw-regular); letter-spacing: var(--ls-tighter); line-height: var(--lh-tight); margin-bottom: var(--space-6); }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-5); }
h3 { font-size: var(--fs-h3); margin-bottom: var(--space-4); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

.hero h1, h1.display { font-size: var(--fs-display); font-weight: var(--fw-regular); letter-spacing: var(--ls-tighter); line-height: var(--lh-tight); }

em { font-style: italic; }
.hero em, h1 em, h2 em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--terracota);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
}

p { font-family: var(--font-body); font-size: var(--fs-body); color: var(--text-secondary); line-height: var(--lh-relaxed); margin-bottom: var(--space-4); }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terracota); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--selection-bg); color: var(--selection-fg); }

.mono { font-family: var(--font-mono); font-weight: var(--fw-medium); letter-spacing: var(--ls-wide); font-size: var(--fs-tiny); text-transform: uppercase; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-24) 0; }
main { flex: 1; }
@media (max-width: 768px) { .section { padding: var(--space-16) 0; } }

.eyebrow {
  font-size: var(--fs-small); font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: var(--ls-wider); color: var(--terracota); margin-bottom: var(--space-4); display: block;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-8); font-size: 1rem; font-weight: var(--fw-semibold);
  border-radius: var(--radius); transition: all var(--transition); white-space: nowrap;
  cursor: pointer; font-family: var(--font-body); border: 2px solid transparent;
}
.btn-primary { background: var(--terracota); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--terracota-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-secondary { background: transparent; color: var(--petrol); border-color: var(--petrol); }
.btn-secondary:hover { background: var(--petrol); color: var(--white); }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--white); border-radius: var(--radius); padding: var(--space-8);
  border: 1px solid var(--gray); transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--terracota); }

/* Grids */
.grid { display: grid; gap: var(--space-8); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Badge de estado */
.badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); font-size: var(--fs-tiny); font-weight: var(--fw-semibold); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--ls-wide); }
.badge-ok { background: var(--linki-soft); color: var(--linki); }
.badge-off { background: var(--gray); color: var(--gray-medium); }
.badge-warn { background: rgba(255, 122, 60, 0.14); color: #E6642A; }
.link-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); text-decoration: none; color: var(--petrol); font-weight: var(--fw-semibold); font-family: var(--font-display); }
.link-card:hover { color: var(--terracota); transform: translateY(-2px); }
.link-card-arrow { color: var(--terracota); font-family: var(--font-body); }
.badge-dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }

/* Header */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(251, 248, 243, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-soft); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: baseline; gap: var(--space-2); font-family: var(--font-display); font-size: 1.35rem; font-weight: var(--fw-semibold); color: var(--petrol); letter-spacing: var(--ls-tight); }
.brand span { color: var(--terracota); }
.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav a { font-size: var(--fs-small); font-weight: var(--fw-medium); color: var(--text-secondary); }
.nav a:hover { color: var(--terracota); }
.nav .btn { padding: var(--space-2) var(--space-5); }
@media (max-width: 720px) { .nav .nav-link { display: none; } }

/* Hero */
.hero { padding: var(--space-24) 0 var(--space-20); }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-8); }

/* Pasos */
.step-num { font-family: var(--font-mono); font-size: var(--fs-tiny); color: var(--terracota); font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); }
.step h4 { margin: var(--space-3) 0; }

/* Planes */
.plan { display: flex; flex-direction: column; }
.plan-featured { border-color: var(--terracota); box-shadow: var(--shadow-md); }
.plan-price { font-family: var(--font-display); font-size: 2.6rem; color: var(--petrol); line-height: 1; margin: var(--space-4) 0 var(--space-1); }
.plan-price small { font-size: var(--fs-small); color: var(--text-muted); font-family: var(--font-body); }
.plan ul { list-style: none; margin: var(--space-6) 0; display: flex; flex-direction: column; gap: var(--space-3); }
.plan li { font-size: var(--fs-small); color: var(--text-secondary); padding-left: var(--space-6); position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--linki); font-weight: var(--fw-bold); }
.plan .btn { margin-top: auto; }

/* Bloque oscuro (alcance / nota foro) */
.panel-dark { background: var(--petrol); border-radius: var(--radius-lg); padding: var(--space-12); color: var(--cream); }
.panel-dark h2, .panel-dark h3 { color: var(--white); }
.panel-dark p { color: rgba(244, 239, 230, 0.78); }

/* Formularios (login, registro, allauth) */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.form-field { margin-bottom: var(--space-5); }
.form-field label { display: block; font-size: var(--fs-small); font-weight: var(--fw-semibold); color: var(--petrol); margin-bottom: var(--space-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: var(--space-3) var(--space-4); font-family: var(--font-body); font-size: var(--fs-body);
  color: var(--petrol); background: var(--cream); border: 1px solid var(--border-mid); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--terracota); background: var(--white); box-shadow: 0 0 0 3px rgba(255, 122, 60, 0.12); }
.form-help { font-size: var(--fs-tiny); color: var(--text-muted); margin-top: var(--space-2); }
.errorlist { list-style: none; color: var(--terracota-deep); font-size: var(--fs-small); margin-bottom: var(--space-3); }
.filters select, form.filters select { width: auto; }
.data-table th, .data-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-soft); font-size: var(--fs-small); white-space: nowrap; }
.data-table th { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: var(--ls-wide); font-size: var(--fs-tiny); color: var(--text-muted); }
.form-aux { font-size: var(--fs-small); color: var(--text-secondary); margin-top: var(--space-5); text-align: center; }
.form-aux a { color: var(--terracota); font-weight: var(--fw-medium); }

/* Mensajes */
.messages { list-style: none; margin-bottom: var(--space-6); }
.messages li { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-size: var(--fs-small); margin-bottom: var(--space-2); background: var(--cream); border: 1px solid var(--border-soft); }
.messages li.error { background: #fdece5; color: var(--terracota-deep); }
.messages li.success { background: var(--linki-soft); color: var(--linki); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(244, 239, 230, 0.7); padding: var(--space-16) 0 var(--space-10); margin-top: var(--space-24); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: var(--space-8); justify-content: space-between; }
.site-footer a { color: rgba(244, 239, 230, 0.7); font-size: var(--fs-small); }
.site-footer a:hover { color: var(--terracota); }
.footer-col { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col strong { color: var(--white); font-family: var(--font-display); font-weight: var(--fw-medium); margin-bottom: var(--space-2); }
.footer-legal { width: 100%; border-top: 1px solid rgba(255,255,255,0.08); margin-top: var(--space-8); padding-top: var(--space-6); font-size: var(--fs-tiny); color: rgba(244,239,230,0.45); }
