/*
Theme Name:  evelincaicedo
Theme URI:   https://evelincaicedo.com
Author:      Evelin Caicedo
Author URI:  https://evelincaicedo.com
Description: Tema personal de Evelin Caicedo — estratega de marca personal y marketing digital. Tema clásico PHP, mobile-first, construido desde cero.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: evelincaicedo
Tags:        blog, custom-menu, footer-widgets, full-width-template, custom-logo
*/

/* ==========================================================================
   Variables de diseño
   ========================================================================== */

:root {
  /* Paleta */
  --color-marfil: #F7F3EC;
  --color-beige:  #E9E0D3;
  --color-taupe:  #B7A08C;
  --color-verde:  #2F5D50;
  --color-marron: #4A342C;
  --color-cobre:  #B88147;

  /* Texto */
  --color-texto:        #2C2520;
  --color-texto-suave:  #6B5B52;
  --color-texto-claro:  #9C8880;

  /* Tipografías — sistema de 4 fuentes */
  --font-titulo: 'Playfair Display', Georgia, serif;        /* encabezados y títulos */
  --font-cuerpo: 'Cormorant Garamond', Georgia, serif;      /* cuerpo de lectura (mín. 18px) */
  --font-ui:     'DM Sans', system-ui, sans-serif;          /* nav, botones, labels, bullets */
  --font-small:  'Lato', system-ui, sans-serif;             /* textos legales y muy pequeños */

  /* Escala tipográfica — mobile primero */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.125rem;  /* 18px */
  --text-lg:   1.25rem;   /* 20px */
  --text-xl:   1.5rem;    /* 24px */
  --text-2xl:  2rem;      /* 32px */
  --text-3xl:  2.5rem;    /* 40px */
  --text-4xl:  3.25rem;   /* 52px */

  /* Pesos tipográficos */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold: 600;

  /* Espaciado */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --max-width-content: 720px;
  --max-width-wide:    1100px;
  --gutter:            1.25rem;

  /* Transiciones */
  --transition-base: 200ms ease;

  /* Bordes */
  --radius-sm: 2px;
  --radius-md: 4px;
}

/* ==========================================================================
   Reset y base
   ========================================================================== */

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Evita que el header sticky tape el destino al navegar por anclas */
  scroll-padding-top: 92px; /* se sobreescribe abajo para admin-bar */
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.7;
  color: var(--color-texto);
  background-color: var(--color-marfil);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Sticky footer: body como columna flex */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Tipografía base
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titulo);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  color: var(--color-marron);
  letter-spacing: 0;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-bottom: var(--space-4);
  max-width: 68ch;
}

a {
  color: var(--color-verde);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}

a:hover,
a:focus {
  color: var(--color-cobre);
}

a:focus-visible {
  outline: 2px solid var(--color-cobre);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

li {
  margin-bottom: var(--space-2);
}

blockquote {
  border-left: 3px solid var(--color-cobre);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-cuerpo);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.85;
  color: var(--color-texto-suave);
}

hr {
  border: none;
  border-top: 1px solid var(--color-beige);
  margin: var(--space-8) 0;
}

strong { font-weight: var(--weight-semibold); }
em     { font-style: italic; }

/* ==========================================================================
   Layout — contenedores
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--max-width-content);
}

/* ==========================================================================
   Enlace de salto (accesibilidad)
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-verde);
  color: var(--color-marfil);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  z-index: 999;
  text-decoration: none;
  transition: top var(--transition-base);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ==========================================================================
   Header del sitio
   ========================================================================== */

.site-header {
  background-color: var(--color-marfil);
  border-bottom: 1px solid transparent;
  padding-block: var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: border-color 250ms ease, box-shadow 250ms ease, padding-block 200ms ease;
}

/* Estado compacto al hacer scroll — JS añade .has-scrolled */
.site-header.has-scrolled {
  border-bottom-color: var(--color-beige);
  box-shadow: 0 2px 20px rgba(44, 37, 32, 0.07);
  padding-block: var(--space-5); /* 1.25rem — se compacta con aire visible arriba y abajo */
}

/* Barra de administración de WordPress (usuarios logueados): 32 px en escritorio,
   46 px en móvil. El header sticky debe bajar su punto de anclaje para no quedar
   oculto detrás de la barra. */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-branding {
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-titulo);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  margin: 0;
}

.site-title a {
  color: var(--color-marron);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--color-cobre);
}

.site-description {
  font-size: var(--text-xs);
  color: var(--color-texto-claro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

/* ==========================================================================
   Navegación principal
   ========================================================================== */

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-marron);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.primary-navigation {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-marfil);
  border-bottom: 1px solid var(--color-beige);
  padding: var(--space-6) var(--gutter);
}

.primary-navigation.is-open {
  display: block;
}

.primary-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.primary-navigation a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-marron);
  text-decoration: none;
  transition: color var(--transition-base);
}

.primary-navigation a:hover {
  color: var(--color-cobre);
}

/* Ítem activo: cobre + subrayado fino */
.primary-navigation .current-menu-item > a {
  color: var(--color-cobre);
  border-bottom: 1.5px solid var(--color-cobre);
  padding-bottom: 2px;
}

/* ==========================================================================
   Contenido principal
   ========================================================================== */

.site-main {
  flex: 1; /* crece para empujar el footer al borde inferior */
  padding-block: var(--space-12);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--color-marron);
  color: var(--color-beige);
  padding-block: var(--space-8) var(--space-6);
}

.site-footer a {
  color: var(--color-taupe);
}

.site-footer a:hover {
  color: var(--color-cobre);
}

/* Grid de 3 columnas — mobile primero */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
}

/* Columna 1 del footer — contenido centrado */
.footer-brand {
  text-align: center;
}

.footer-brand__name {
  font-family: var(--font-titulo);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-marfil);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-2);
}

.footer-brand__tagline {
  font-family: var(--font-small);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--color-taupe);
  font-style: italic;
  margin: 0;
}

/* Nav horizontal con separadores · — centrada en la columna */
.footer-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  justify-content: center;
}

.footer-nav__list li {
  display: flex;
  align-items: center;
}

.footer-nav__list li + li::before {
  content: '·';
  margin: 0 0.4rem;
  color: rgba(247, 243, 236, 0.22);
  font-weight: 300;
}

.footer-nav__list a {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-taupe);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-nav__list a:hover {
  color: var(--color-cobre);
}

.footer-social {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.footer-social a {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-taupe);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-social a:hover {
  color: var(--color-cobre);
}

.footer-newsletter__row {
  display: flex;
  gap: var(--space-2);
}

.footer-newsletter__input {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  background-color: rgba(247, 243, 236, 0.08);
  border: 1px solid rgba(247, 243, 236, 0.18);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--color-marfil);
  flex: 1;
  min-width: 0;
  outline: none;
  transition: border-color var(--transition-base);
}

.footer-newsletter__input::placeholder {
  color: rgba(247, 243, 236, 0.35);
}

.footer-newsletter__input:focus {
  border-color: var(--color-cobre);
}

.footer-newsletter__btn {
  background-color: var(--color-cobre);
  color: var(--color-marfil);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-base);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--transition-base);
}

.footer-newsletter__btn:hover {
  background-color: var(--color-taupe);
}

/* Barra inferior centrada */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-small);
  font-size: var(--text-xs);
  color: var(--color-texto-claro);
  margin: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
}

.footer-bottom a {
  color: var(--color-taupe);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-bottom a:hover {
  color: var(--color-cobre);
}

.footer-bottom__sep {
  color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Media queries — tablet y desktop
   ========================================================================== */

@media (min-width: 768px) {
  :root {
    --gutter: 2rem;
  }

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

  .nav-toggle {
    display: none;
  }

  .primary-navigation {
    display: block;
    position: static;
    background: none;
    border: none;
    padding: 0;
  }

  .primary-navigation ul {
    flex-direction: row;
    gap: var(--space-8);
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    align-items: start;
  }
}

@media (min-width: 1100px) {
  :root {
    --gutter: 2.5rem;
  }

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