/* ============================================================
   CUBICORNIO DESIGN SYSTEM
   Brand UI Foundations
============================================================ */

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


/* ============================================================
   1. DESIGN TOKENS
============================================================ */

:root {

  /* -------------------------
     TYPOGRAPHY
  ------------------------- */

  --font-brand: 'Nunito Sans', sans-serif;
  --font-ui: 'Nunito', sans-serif;


  /* -------------------------
     BRAND COLORS
  ------------------------- */

  --cubi-blue: #2563eb;
  --cubi-blue-hover: #1d4ed8;
  --cubi-blue-soft: #eff6ff;

  --cubi-red: #ef4444;
  --cubi-red-hover: #dc2626;
  --cubi-red-soft: #fef2f2;

  --cubi-green: #16a34a;
  --cubi-yellow: #facc15;

  --cubi-purple: #7c3aed;


  /* -------------------------
     TEXT
  ------------------------- */

  --cubi-text: #111827;
  --cubi-text-secondary: #374151;
  --cubi-text-muted: #6b7280;
  --cubi-text-soft: #9ca3af;


  /* -------------------------
     SURFACES
  ------------------------- */

  --cubi-bg: #ffffff;
  --cubi-surface: #ffffff;
  --cubi-surface-soft: #f8fafc;

  --cubi-border: #e5e7eb;
  --cubi-border-strong: #d1d5db;


  /* -------------------------
     BORDER RADIUS
  ------------------------- */

  --radius-sm: .75rem;
  --radius-md: 1rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-pill: 999px;


  /* -------------------------
     SHADOWS
  ------------------------- */

  --shadow-sm:
    0 4px 15px rgba(15, 23, 42, .05);

  --shadow-md:
    0 12px 30px rgba(15, 23, 42, .08);

  --shadow-lg:
    0 20px 45px rgba(15, 23, 42, .12);


  /* -------------------------
     TRANSITIONS
  ------------------------- */

  --transition-fast: 160ms ease;
  --transition-base: 220ms ease;

  --transition-spring:
    350ms cubic-bezier(.22, 1, .36, 1);


  /* -------------------------
     CONTENT WIDTH
  ------------------------- */

  --content-width: 1280px;
  --content-wide: 1440px;
}


/* ============================================================
   2. GLOBAL TYPOGRAPHY
============================================================ */

html {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-ui);
  color: var(--cubi-text);
  background: var(--cubi-bg);
}


/* Brand headings */

h1,
h2,
h3 {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.025em;
}


/* Smaller structural headings */

h4,
h5,
h6 {
  font-family: var(--font-ui);
  font-weight: 800;
}


/* Regular interface */

p,
span,
a,
button,
input,
textarea,
select,
label,
table,
th,
td {
  font-family: inherit;
}


/* Textos inline: SIEMPRE heredan tamaño y grosor del padre */

span,
a {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}


/* Texto base */

p,
td {
  font-weight: 600;
}


/* Forms */

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

input,
textarea,
select {
  font-size: 1rem;
  font-weight: 700;
}

button {
  font-weight: 800;
}


/* Tables */

table {
  font-size: 1rem;
}

th {
  font-size: 1rem;
  font-weight: 800;
}

td {
  font-weight: 600;
}


/* ============================================================
   3. BRAND TYPOGRAPHY UTILITIES
============================================================ */

.cubi-brand {
  font-family: var(--font-brand);
}

.cubi-ui {
  font-family: var(--font-ui);
}


/* Display / Marketing */

.cubi-display {
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: .9;
}

.cubi-title {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.cubi-subtitle {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.25;
}

.cubi-body {
  font-family: var(--font-ui);
  font-weight: 500;
  line-height: 1.55;
}

.cubi-label {
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: .01em;
}


/* ============================================================
   4. CONTENT CONTAINERS
============================================================ */

.cubi-container {
  width: min(var(--content-width), calc(100% - 2rem));
  margin-inline: auto;
}

.cubi-container-wide {
  width: min(var(--content-wide), calc(100% - 2rem));
  margin-inline: auto;
}


/* ============================================================
   5. BUTTON FOUNDATIONS
============================================================ */

.cubi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  min-height: 44px;
  padding: .75rem 1.15rem;

  border-radius: var(--radius-md);

  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 800;

  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cubi-btn:hover {
  transform: translateY(-1px);
}

.cubi-btn:active {
  transform: translateY(0) scale(.98);
}


.cubi-btn-blue {
  color: #ffffff;
  background: var(--cubi-blue);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .18);
}

.cubi-btn-blue:hover {
  background: var(--cubi-blue-hover);
}


.cubi-btn-red {
  color: #ffffff;
  background: var(--cubi-red);
  box-shadow: 0 10px 24px rgba(239, 68, 68, .18);
}

.cubi-btn-red:hover {
  background: var(--cubi-red-hover);
}


/* ============================================================
   6. CARD FOUNDATION
============================================================ */

.cubi-card {
  background: var(--cubi-surface);
  border: 1px solid var(--cubi-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   7. INPUT FOUNDATION
============================================================ */

.cubi-input {
  width: 100%;
  min-height: 44px;

  padding: .7rem .9rem;

  border: 1px solid var(--cubi-border);
  border-radius: var(--radius-md);

  background: var(--cubi-surface);

  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;

  outline: none;

  transition:
    border var(--transition-fast),
    box-shadow var(--transition-fast);
}

.cubi-input:focus {
  border-color: var(--cubi-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}


/* ============================================================
   8. DARK MODE
============================================================ */

.dark {

  --cubi-bg: #030712;
  --cubi-surface: #111827;
  --cubi-surface-soft: #0f172a;

  --cubi-text: #f9fafb;
  --cubi-text-secondary: #d1d5db;
  --cubi-text-muted: #9ca3af;

  --cubi-border: #1f2937;
  --cubi-border-strong: #374151;
}


/* ============================================================
   NAVIGATION TYPOGRAPHY
============================================================ */

.cubi-navbar {
  font-family: var(--font-brand);
}

.cubi-navbar * {
  font-family: inherit;
}