/* ============================================================
   Conta Sistemia — Material 3 tokens compartidos
   Hereda paleta de Focus MX (terra cotta) para coherencia portfolio.
   ============================================================ */

:root {
  /* Primary terra */
  --md-sys-color-primary: #9d422a;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #ffdbd2;
  --md-sys-color-on-primary-container: #3c0800;

  --md-sys-color-secondary: #77574f;
  --md-sys-color-secondary-container: #ffdbd2;

  --md-sys-color-tertiary: #6d5d2e;
  --md-sys-color-tertiary-container: #f8e0a4;

  --md-sys-color-background: #fefbf9;
  --md-sys-color-on-background: #201a19;
  --md-sys-color-surface: #fefbf9;
  --md-sys-color-on-surface: #201a19;
  --md-sys-color-surface-variant: #f5ddd7;
  --md-sys-color-on-surface-variant: #534340;
  --md-sys-color-outline: #85736f;
  --md-sys-color-outline-variant: #e6d3ce;

  --md-sys-color-surface-dim: #f0d3ce;
  --md-sys-color-surface-bright: #fcefea;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #fff5f1;
  --md-sys-color-surface-container: #fbeeea;
  --md-sys-color-surface-container-high: #f5e6e1;
  --md-sys-color-surface-container-highest: #efddd8;

  /* Acentos */
  --md-custom-anil: #405aa9;
  --md-custom-on-anil: #ffffff;
  --md-custom-anil-container: #dce1ff;
  --md-custom-nopal: #4c6707;
  --md-custom-nopal-container: #cdee85;

  /* Estados */
  --md-color-success: #2e7d32;
  --md-color-success-container: #d4f5d4;
  --md-color-warning: #c77a00;
  --md-color-warning-container: #ffe5b3;
  --md-color-error: #b3261e;
  --md-color-error-container: #f9dedc;

  /* Type */
  --type-display: 'Fraunces', Georgia, serif;
  --type-body: 'Inter', system-ui, -apple-system, sans-serif;
  --type-mono: 'JetBrains Mono', 'Menlo', monospace;

  /* Shape */
  --shape-xs: 4px;
  --shape-s: 8px;
  --shape-m: 12px;
  --shape-l: 16px;
  --shape-xl: 24px;
  --shape-2xl: 32px;
  --shape-pill: 999px;

  /* Elevation */
  --elev-1: 0 1px 2px rgba(60, 8, 0, 0.06), 0 1px 3px rgba(60, 8, 0, 0.04);
  --elev-2: 0 2px 4px rgba(60, 8, 0, 0.05), 0 4px 12px rgba(60, 8, 0, 0.06);
  --elev-3: 0 4px 8px rgba(60, 8, 0, 0.06), 0 12px 28px rgba(60, 8, 0, 0.08);
  --elev-4: 0 8px 16px rgba(60, 8, 0, 0.08), 0 24px 48px rgba(60, 8, 0, 0.10);

  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --gutter: clamp(20px, 4vw, 56px);
  --max-w: 1200px;
  --section-y: clamp(80px, 12vh, 140px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--type-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-background);
  letter-spacing: 0.0125em;
  overflow-x: hidden;
}

a { color: inherit; }
::selection { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
img { display: block; max-width: 100%; }

/* Tipografía */
.display-l {
  font-family: var(--type-display);
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 50, "wght" 500;
}
.display-m {
  font-family: var(--type-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 500;
  font-variation-settings: "opsz" 100, "SOFT" 50, "wght" 500;
}
.title {
  font-family: var(--type-display);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 24, "wght" 600;
}
.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--md-sys-color-on-surface-variant);
}
.body-l { font-size: 16px; line-height: 1.65; }
.label {
  font-family: var(--type-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  display: inline-block;
}
em.serif-italic {
  font-family: var(--type-display);
  font-style: italic;
  color: var(--md-sys-color-primary);
  font-weight: 400;
  letter-spacing: 0;
  font-variation-settings: "opsz" 144, "SOFT" 100, "wght" 400;
}

/* Layout */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; position: relative; }
.section-head { margin-bottom: 56px; max-width: 760px; }
.section-head .label { margin-bottom: 18px; }
.section-head .lede { margin-top: 22px; }

/* Nav */
nav.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(254, 251, 249, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(133, 115, 111, 0.12);
}
.topnav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--type-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 24, "wght" 700;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.brand .punto { color: var(--md-sys-color-primary); }
.brand small {
  font-family: var(--type-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  margin-left: 8px;
  letter-spacing: 0;
  padding: 3px 10px;
  background: var(--md-sys-color-surface-container);
  border-radius: var(--shape-pill);
}
.topnav-links { display: flex; gap: 28px; font-size: 14px; font-weight: 500; }
.topnav-links a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  transition: color 150ms var(--ease-standard);
}
.topnav-links a:hover { color: var(--md-sys-color-primary); }
@media (max-width: 760px) { .topnav-links { display: none; } }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--type-body);
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 14px 26px;
  border-radius: var(--shape-pill);
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all 200ms var(--ease-emphasized);
  font-size: 15px;
}
.btn-primary {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow: var(--elev-2);
}
.btn-primary:hover {
  background: #7e2b16;
  box-shadow: var(--elev-3);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline-variant);
}
.btn-secondary:hover {
  background: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--md-sys-color-primary);
  padding: 10px 18px;
}
.btn-ghost:hover { background: var(--md-sys-color-primary-container); }

/* Cards */
.card {
  background: var(--md-sys-color-surface-container-low);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--shape-xl);
  padding: 32px;
  transition: all 220ms var(--ease-standard);
}
.card:hover { box-shadow: var(--elev-2); border-color: var(--md-sys-color-primary); }

/* Footer */
footer.foot {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 48px 0 32px;
  margin-top: 80px;
  background: var(--md-sys-color-surface-container-low);
}
.foot-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 760px) {
  .foot-inner { grid-template-columns: 1fr 1fr; }
}
.foot h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 600;
}
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot a {
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  font-size: 14px;
}
.foot a:hover { color: var(--md-sys-color-primary); }
.foot-legal {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding: 24px var(--gutter) 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  font-size: 12px;
  color: var(--md-sys-color-outline);
}
