/*
 * KINOS REAL ESTATE — base.css
 * Estilos base: body, headings, párrafos, listas, formularios, enlaces.
 * Aplica los tokens de tokens.css al sistema tipográfico y de color base.
 * Mobile-first.
 */

/* ── Body ── */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--surface-editorial);
}

/* ── Headings — Cormorant Garamond (display) ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--font-regular);
  line-height: var(--leading-tight);
  color: var(--text-authority);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-light);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ── Párrafos ── */
p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  max-width: 65ch;
}

p + p {
  margin-top: var(--space-4);
}

/* ── Eyebrow — etiqueta superior editorial ── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-gold);
}

/* ── Lead text ── */
.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* ── Caption ── */
.caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-normal);
}

/* ── Microcopy ── */
.microcopy {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* ── Dato técnico — DM Mono ── */
.data,
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
}

/* ── Enlace base ── */
a {
  color: var(--color-kinos-blue);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-gold);
}

/* ── Enlace editorial (sin subrayado) ── */
.link-editorial {
  color: var(--text-authority);
  border-bottom: 1px solid var(--border-gold);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.link-editorial:hover {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

/* ── Listas ── */
ul.list-editorial,
ol.list-editorial {
  list-style: none;
  padding: 0;
}

ul.list-editorial li,
ol.list-editorial li {
  padding-left: var(--space-4);
  position: relative;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

ul.list-editorial li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: var(--font-medium);
}

/* ── Divisor ── */
hr {
  border: none;
  border-top: 1px solid var(--border-warm);
  margin: var(--space-8) 0;
}

hr.divider-gold {
  border-top: 1px solid var(--border-gold);
}

/* ── Blockquote editorial ── */
blockquote {
  border-left: 2px solid var(--color-gold);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-authority);
  line-height: var(--leading-snug);
}

/* ── Código ── */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface-neutral);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--color-kinos-blue);
}

/* ── Formularios base ── */
label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-authority);
  margin-bottom: var(--space-1);
  letter-spacing: var(--tracking-wide);
}

input,
textarea,
select {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);   /* 16px — evita zoom en iOS */
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--surface-editorial);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: var(--touch-target-min);
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-kinos-blue);
  box-shadow: 0 0 0 3px rgba(12, 44, 127, 0.10);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--color-kinos-blue-25);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2306184A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

/* ── Checkbox y Radio ── */
input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: unset;
  cursor: pointer;
  accent-color: var(--color-kinos-blue);
}

/* ── Imágenes ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ── Strong / Em ── */
strong,
b {
  font-weight: var(--font-semibold);
  color: var(--text-authority);
}

em,
i {
  font-style: italic;
}

/* ── Small ── */
small {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Responsive: escala headings en desktop ── */
@media (min-width: 1024px) {
  h1 {
    font-size: var(--text-6xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-3xl);
  }

  h4 {
    font-size: var(--text-2xl);
  }
}
