/* =============================================
   ACLASES.CL — Nelson A. Poblete
   styles.css
   Paleta oficial: #121212 #A9A9A9 #FEAE00 #20724B
   ============================================= */

:root {
  --black:       #121212;
  --gray:        #A9A9A9;
  --yellow:      #FEAE00;
  --yellow-dark: #d4900a;
  --green:       #20724B;
  --white:       #ffffff;
  --off-white:   #f9f9f7;
  --light-gray:  #f2f2f0;
  --text:        #1a1a1a;
  --text-muted:  #666666;
  --border:      #e8e8e4;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  background: var(--white);
  color: var(--text);
  line-height: 1.6;
}

/* =============================================
   NAV
   ============================================= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 64px;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.nav-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width 0.25s;
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active { color: var(--black); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--yellow);
  color: var(--black);
  padding: 11px 26px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--yellow-dark); }

/* =============================================
   HERO
   ============================================= */
.hero {
  background: #1c1c1c;
  min-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 80px 64px;
  position: relative;
  overflow: hidden;
  gap: 60px;
}

/* Fondo sutil */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(254,174,0,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-left { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 28px;
  font-weight: 500;
}

.hero-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--yellow);
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero h1 .static { display: block; }

/* Texto animado */
.hero h1 .dynamic-wrap {
  display: block;
  height: 1.15em;
  overflow: hidden;
  position: relative;
}

.dynamic-text {
  display: block;
  color: var(--yellow);
  font-weight: 700;
  animation: slideWords 9s infinite;
}

@keyframes slideWords {
  0%, 22%   { transform: translateY(0%);    opacity: 1; }
  25%, 47%  { transform: translateY(-100%); opacity: 0; }
  50%, 72%  { transform: translateY(-200%); opacity: 0; }
  75%, 97%  { transform: translateY(-300%); opacity: 0; }
  100%      { transform: translateY(0%);    opacity: 1; }
}

.word-list {
  display: flex;
  flex-direction: column;
}

.word-list span {
  display: block;
  height: 1.15em;
  line-height: 1.15em;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 420px;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-yellow {
  background: var(--yellow);
  color: var(--black);
  padding: 14px 36px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(254,174,0,0.25);
}

.btn-yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(254,174,0,0.35);
}

.btn-ghost {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.btn-ghost:hover { color: var(--white); }

/* Hero foto */
.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.photo-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  display: block;
  filter: grayscale(15%);
}

/* Borde amarillo decorativo */
.photo-frame::before {
  content: '';
  position: absolute;
  top: -12px; left: -12px;
  right: 12px; bottom: 12px;
  border: 2px solid var(--yellow);
  border-radius: 16px;
  opacity: 0.3;
  z-index: -1;
}

.photo-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--yellow);
  color: var(--black);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(254,174,0,0.3);
}

.photo-badge strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
}

/* =============================================
   FEATURES STRIP (cuadros verdes)
   ============================================= */
.features {
  background: var(--green);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.feature-item {
  padding: 32px 28px;
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: background 0.2s;
}

.feature-item:last-child { border-right: none; }
.feature-item:hover { background: rgba(255,255,255,0.06); }

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.feature-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
}

/* =============================================
   SOBRE MÍ
   ============================================= */
.about {
  padding: 100px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  background: var(--off-white);
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow-dark);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--yellow);
  border-radius: 2px;
}

h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.about-text p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.creds {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
}

.cred-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cred-row:first-child { border-top: 1px solid var(--border); }

.cred-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  flex-shrink: 0;
  margin-top: 7px;
}

.cred-row p { font-size: 0.88rem; color: var(--text-muted); font-weight: 300; line-height: 1.5; }
.cred-row strong { display: block; color: var(--text); font-weight: 600; font-size: 0.9rem; margin-bottom: 1px; }

/* Stats box */
.about-stats {
  background: var(--black);
  border-radius: 16px;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.stat-item { text-align: center; }

.stat-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* =============================================
   MATERIAS
   ============================================= */
.materias {
  padding: 100px 64px;
  background: var(--white);
}

.materias-header { margin-bottom: 56px; }

.materias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.materia-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

.materia-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.materia-card:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.07);
}

.materia-card:hover::after { transform: scaleX(1); }

.materia-icon { font-size: 1.8rem; margin-bottom: 12px; display: block; }
.materia-title { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.materia-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; font-weight: 300; }

/* =============================================
   CONTACTO
   ============================================= */
.contacto {
  background: #2a2a2a;
  padding: 80px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contacto-left .section-label { color: rgba(255,255,255,0.5); }
.contacto-left .section-label::before { background: var(--yellow); }
.contacto-left h2 { color: var(--white); margin-bottom: 14px; }
.contacto-left p { font-size: 1rem; color: rgba(255,255,255,0.65); font-weight: 300; line-height: 1.75; margin-bottom: 28px; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(37,211,102,0.25);
}

.btn-whatsapp:hover {
  background: #1ebe5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}

.nav-whatsapp {
  padding: 10px 20px;
  font-size: 0.8rem;
}

.nav-whatsapp svg {
  width: 16px;
  height: 16px;
  fill: white;
}

.contacto-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s;
}

.contacto-item:hover {
  background: rgba(254,174,0,0.1);
  border-color: rgba(254,174,0,0.35);
}

.contacto-icon {
  font-size: 1.3rem;
  width: 44px; height: 44px;
  background: rgba(254, 174, 0, 0.648);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contacto-label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 3px; }
.contacto-val { font-size: 0.98rem; font-weight: 500; color: var(--white); }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: #181818;
  padding: 20px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

footer img { height: 28px; opacity: 0.5; }
footer p { font-size: 0.73rem; color: rgba(255,255,255,0.2); }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow { animation: fadeUp 0.5s 0.1s ease both; }
.hero h1      { animation: fadeUp 0.6s 0.2s ease both; }
.hero-desc    { animation: fadeUp 0.6s 0.35s ease both; }
.hero-actions { animation: fadeUp 0.6s 0.5s ease both; }
.hero-right   { animation: fadeUp 0.8s 0.25s ease both; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  nav { padding: 16px 40px; }
  .hero { padding: 72px 40px; gap: 40px; }
  .about { padding: 80px 40px; gap: 48px; }
  .materias { padding: 80px 40px; }
  .contacto { padding: 72px 40px; gap: 48px; }
  footer { padding: 20px 40px; }
}

@media (max-width: 768px) {
  nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-cta { padding: 9px 18px; font-size: 0.75rem; }

  .hero { grid-template-columns: 1fr; padding: 52px 24px 64px; min-height: auto; gap: 48px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-right { order: -1; }
  .photo-frame { max-width: 300px; margin: 0 auto; }
  .photo-badge { right: -8px; bottom: -8px; }

  .features { grid-template-columns: 1fr 1fr; }
  .feature-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .feature-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }
  .feature-item:nth-last-child(-n+2) { border-bottom: none; }

  .about { grid-template-columns: 1fr; padding: 60px 24px; gap: 40px; }
  .materias { padding: 60px 24px; }
  .materias-grid { grid-template-columns: 1fr 1fr; }
  .contacto { grid-template-columns: 1fr; padding: 60px 24px; gap: 40px; }
  footer { padding: 18px 24px; flex-direction: column; gap: 8px; text-align: center; }
  h2 { font-size: 1.9rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.1rem; }
  .materias-grid { grid-template-columns: 1fr; }
  .btn-yellow { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; width: 100%; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 20px; padding: 32px 24px; }
}
