/* ============================================================
   ÁMATE — ESCUELA DE ARTE TEXTIL Y DESARROLLO CREATIVO
   main.css · Variables, reset, tipografía, layout base
   Tema: light mode — blanco cálido + negro + carmín #C8185C
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&family=Inter:wght@400;500;600&display=swap');

/* === VARIABLES === */
:root {
  /* Color principal: corazón carmín */
  --primary:        #C8185C;
  --primary-dark:   #A01248;
  --primary-light:  #E42070;
  --primary-glow:   rgba(200, 24, 92, 0.12);
  --primary-subtle: rgba(200, 24, 92, 0.06);

  /* Fondos: blanco cálido — como tela de lienzo */
  --bg-dark:        #FDF8F2;   /* Fondo principal (lino claro) */
  --bg-card:        #FFFFFF;   /* Cards: blanco puro */
  --bg-surface:     #F5ECE0;   /* Secciones alternas (arena cálida) */
  --bg-elevated:    #EDE1CE;   /* Hover / elevated */

  /* Texto */
  --text-primary:   #1C1614;   /* Negro cálido — como tinta sobre tela */
  --text-secondary: #5A4F48;   /* Gris cálido medio */
  --text-muted:     #9A8E86;   /* Gris claro cálido */

  /* Bordes */
  --border:         #E2D5C3;   /* Borde arena */
  --border-light:   #EEE5D6;   /* Borde suave */

  /* Estados */
  --success:        #1A7A40;
  --error:          #C82020;

  /* Tipografías */
  --font-display:   'Comfortaa', 'Nunito', system-ui, sans-serif;
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;

  /* Espaciado base-8 */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Radios */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   22px;
  --r-full: 9999px;

  /* Sombras (warm, no frías) */
  --shadow-sm:  0 2px 8px rgba(60, 30, 10, 0.08);
  --shadow-md:  0 4px 20px rgba(60, 30, 10, 0.10);
  --shadow-lg:  0 8px 40px rgba(60, 30, 10, 0.12);
  --shadow-pri: 0 4px 24px rgba(200, 24, 92, 0.28);

  /* Transiciones */
  --tr-fast: 0.15s ease;
  --tr-base: 0.25s ease;
  --tr-slow: 0.4s ease;

  /* Layout */
  --max-w:       1200px;
  --header-h:    70px;
  --gutter:      1.5rem;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* === TIPOGRAFÍA === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 5vw,   3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem,  2.5vw, 1.65rem); font-weight: 700; }
h4 { font-size: clamp(1rem,    2vw,   1.25rem);  font-weight: 700; }
p  { font-size: clamp(0.9375rem, 1.5vw, 1.0625rem); }

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section    { padding: var(--sp-24) 0; }
.section-sm { padding: var(--sp-16) 0; }

/* === SKIP LINK (a11y) === */
.skip-link {
  position: absolute;
  top: -60px;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  z-index: 9999;
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 600;
  transition: top var(--tr-fast);
}
.skip-link:focus { top: 0; }

/* === LOGO === */
.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

/* Wordmark geométrico */
.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  color: var(--text-primary);
  display: inline-flex;
  align-items: flex-end;
  line-height: 1;
  letter-spacing: -0.02em;
}
.logo-a {
  position: relative;
  display: inline-block;
}
.logo-heart {
  position: absolute;
  top: -9px;
  left: 1px;
  display: block;
  flex-shrink: 0;
}

/* Footer logo */
.footer-logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--text-primary);
  display: inline-flex;
  align-items: flex-end;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.footer-logo-wordmark .logo-a { position: relative; }
.footer-logo-wordmark .logo-heart {
  position: absolute;
  top: -11px;
  left: 2px;
}

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(253, 248, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--tr-fast);
  position: relative;
  padding-bottom: 2px;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--r-full);
  transition: width var(--tr-base);
}
.nav__link:hover,
.nav__link.active { color: var(--text-primary); }
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--r-full);
  transition: transform var(--tr-base), opacity var(--tr-base);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6) var(--gutter) var(--sp-8);
  flex-direction: column;
  gap: var(--sp-4);
  z-index: 199;
  box-shadow: var(--shadow-md);
}
.nav__mobile.open { display: flex; }
.nav__mobile .nav__link {
  font-size: 1.125rem;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.nav__mobile .btn-primary { width: 100%; justify-content: center; margin-top: var(--sp-4); }

/* === FOOTER === */
.footer {
  background: #1C1614;    /* Footer oscuro — contraste fuerte en tema claro */
  border-top: 1px solid #2A2420;
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
/* En footer oscuro, el logo va claro */
.footer-logo-wordmark { color: #F2F0EC; }
.footer__tagline {
  color: #9A8E86;
  font-size: 0.9375rem;
  line-height: 1.7;
  max-width: 28ch;
  margin-top: var(--sp-2);
}
.footer__col-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5A5050;
  margin-bottom: var(--sp-4);
}
.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__links a {
  color: #9A8E86;
  font-size: 0.9375rem;
  transition: color var(--tr-fast);
}
.footer__links a:hover { color: var(--primary-light); }
.footer__social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #2A2420;
  border-radius: var(--r-md);
  color: #9A8E86;
  transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast);
}
.footer__social a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.footer__bottom {
  padding-top: var(--sp-8);
  border-top: 1px solid #2A2420;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.footer__copy { color: #5A5050; font-size: 0.875rem; }
.footer__legal { display: flex; gap: var(--sp-6); }
.footer__legal a {
  color: #5A5050;
  font-size: 0.875rem;
  transition: color var(--tr-fast);
}
.footer__legal a:hover { color: #9A8E86; }

/* === HERO PRINCIPAL === */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--sp-24) 0;
  background: var(--bg-dark);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 70% 30%, rgba(200,24,92,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(200,24,92,0.05) 0%, transparent 55%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-6);
}
.hero__kicker::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: var(--r-full);
}
.hero__accent { color: var(--primary); }
.hero__desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.8;
  margin: var(--sp-6) 0 var(--sp-8);
  max-width: 44ch;
}
.hero__actions { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === HERO COMPACTO (páginas interiores) === */
.hero-compact {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-12) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-compact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(200,24,92,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-compact h1 { margin-bottom: var(--sp-4); color: var(--text-primary); }
.hero-compact .lead {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 48ch;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--primary); transition: color var(--tr-fast); }
.breadcrumb a:hover { color: var(--primary-dark); }

/* === SECTION HEADER === */
.section-header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto var(--sp-12);
}
.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-3);
}
.section-header h2 { margin-bottom: var(--sp-4); }
.section-header p { color: var(--text-secondary); line-height: 1.75; }

/* === PLACEHOLDERS DE IMAGEN === */
.img-placeholder {
  background: var(--bg-surface);
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  padding: var(--sp-8);
  position: relative;
  overflow: hidden;
}
.img-placeholder svg { opacity: 0.4; }

/* === ANIMACIONES === */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
