/* ---------------------------------------------------------------
   orianamramos.cl — hoja de estilos
   Fondo fotográfico cálido + paneles translúcidos superpuestos
   Tipografía: Poppins (títulos y texto) + Playfair Display (portada)
   --------------------------------------------------------------- */

:root {
  /* ============================================================
     PANEL DE CONTROL — puedes cambiar solo estos números.
     Guarda el archivo y recarga el navegador (Cmd+Shift+R).
     ============================================================ */
  --tam-texto:        16px;    /* texto normal */
  --tam-titulo:       30px;    /* títulos de sección y pregunta de portada */
  --tam-tarjeta:      24px;    /* títulos de las tarjetas de servicios */
  --ancho:            1240px;  /* ancho de los bloques de color */
  --alto-foto:        460px;   /* alto mínimo de la foto de portada */
  --opacidad-panel:   0.68;    /* 1 = sólido · 0.5 = muy transparente */
  --fuerza-sombras:   1;       /* 1.4 = sombras más marcadas · 0.6 = más suaves */
  --fuerza-grano:     0.34;    /* grano de película: 0 = ninguno · 0.6 = mucho */
  /* ============================================================ */

  /* Fondo */
  --muro:        #7A5340;
  --muro-claro:  #96694F;
  --muro-oscuro: #5A3B2C;

  /* Paneles */
  --crema:       250, 243, 231;
  --crema-claro: 254, 250, 242;
  --salvia:      224, 233, 208;
  --oliva:       151, 161, 92;
  --verde-suave: 231, 239, 217;

  /* Tinta */
  --tinta:       #4A3D0E;
  --tinta-suave: #4E4113;
  --tinta-clara: #FBF5E8;
  --dorado:      #B8A97F;

  /* Texto: Nunito Sans para todos por igual. */
  --texto:  "Nunito Sans", -apple-system, "Segoe UI", sans-serif;
  --titulo: "Poppins", -apple-system, "Segoe UI", sans-serif;

  --prosa:  68ch;
}

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

body {
  margin: 0;
  font-family: var(--texto);
  font-size: var(--tam-texto);
  font-weight: 400;
  line-height: 1.7;
  color: var(--tinta-suave);
  background-color: var(--muro);
  background-image:
    radial-gradient(ellipse 900px 620px at 12% 8%,  rgba(150,105,79,.75), transparent 62%),
    radial-gradient(ellipse 780px 900px at 88% 34%, rgba(90,59,44,.72),  transparent 66%),
    radial-gradient(ellipse 1100px 700px at 46% 78%, rgba(122,83,64,.65), transparent 70%),
    radial-gradient(ellipse 620px 520px at 72% 96%, rgba(70,46,34,.6),   transparent 68%);
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--tinta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #3F3410; }

:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; border-radius: 2px; }

/* ---------- Grano de película sobre el muro ---------- */

body::before {
  content: "";
  position: fixed;
  inset: -3%;
  z-index: -2;
  pointer-events: none;
  opacity: var(--fuerza-grano);
  background-image: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='220'%20height='220'><filter%20id='g'><feTurbulence%20type='fractalNoise'%20baseFrequency='0.75'%20numOctaves='4'%20stitchTiles='stitch'/><feColorMatrix%20type='saturate'%20values='0'/></filter><rect%20width='220'%20height='220'%20filter='url(%23g)'/></svg>");
  background-size: 220px 220px;
  background-repeat: repeat;
}

/* ---------- Sombras de hojas sobre todo el sitio ---------- */

.fondo-hojas {
  position: fixed;
  inset: -10% -8%;
  z-index: -1;
  pointer-events: none;
}
.fondo-hojas svg { width: 100%; height: 100%; display: block; }
.fondo-hojas g { fill: #1E1108; transform-box: view-box; will-change: transform; }

/* Manchas suaves: se ven a través de los paneles de color */
.mancha-1 { opacity: calc(.52 * var(--fuerza-sombras)); filter: blur(32px);
            transform-origin: 400px 200px; animation: vaiven-a 13s ease-in-out infinite alternate; }
.mancha-2 { opacity: calc(.44 * var(--fuerza-sombras)); filter: blur(46px);
            transform-origin: 700px 450px; animation: vaiven-b 17s ease-in-out infinite alternate; }
.mancha-3 { opacity: calc(.36 * var(--fuerza-sombras)); filter: blur(58px);
            transform-origin: 600px 700px; animation: vaiven-c 21s ease-in-out infinite alternate; }

/* Hojas nítidas: dan el detalle y hacen visible el movimiento */
.hoja-1 { opacity: calc(.34 * var(--fuerza-sombras)); filter: blur(3px);
          transform-origin: 200px 60px; animation: mecer-a 7s ease-in-out infinite alternate; }
.hoja-2 { opacity: calc(.27 * var(--fuerza-sombras)); filter: blur(5px);
          transform-origin: 900px 400px; animation: mecer-b 9s ease-in-out infinite alternate; }
.hoja-3 { opacity: calc(.22 * var(--fuerza-sombras)); filter: blur(8px);
          transform-origin: 500px 800px; animation: mecer-c 11s ease-in-out infinite alternate; }

@keyframes vaiven-a {
  from { transform: rotate(-2.2deg) translate(-30px, -14px); }
  to   { transform: rotate(2.6deg)  translate(34px, 18px); }
}
@keyframes vaiven-b {
  from { transform: rotate(2deg)    translate(28px, 16px) scale(1.05); }
  to   { transform: rotate(-2.8deg) translate(-32px, -18px) scale(1); }
}
@keyframes vaiven-c {
  from { transform: rotate(-1.8deg) translate(22px, -16px); }
  to   { transform: rotate(2.4deg)  translate(-26px, 20px); }
}
@keyframes mecer-a {
  from { transform: rotate(-4.5deg) translate(-42px, -18px); }
  to   { transform: rotate(5.2deg)  translate(46px, 22px); }
}
@keyframes mecer-b {
  from { transform: rotate(4.2deg)  translate(40px, 20px) scale(1.04); }
  to   { transform: rotate(-5deg)   translate(-44px, -24px) scale(1); }
}
@keyframes mecer-c {
  from { transform: rotate(-3.6deg) translate(34px, -22px); }
  to   { transform: rotate(4.4deg)  translate(-38px, 26px); }
}

/* ---------- Paneles ---------- */

section { padding: 0; }
main > section + section { margin-top: clamp(2rem, 4.5vw, 4rem); }

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4.5rem);
  background: rgba(var(--crema), var(--opacidad-panel));
}

.panel-claro  { background: rgba(var(--crema-claro), var(--opacidad-panel)); }
.panel-salvia { background: rgba(var(--salvia), calc(var(--opacidad-panel) + .04)); }
.panel-verde  { background: rgba(var(--verde-suave), calc(var(--opacidad-panel) + .02)); }

.panel-oscuro {
  background: rgba(52, 34, 24, .50);
  color: var(--tinta-clara);
}
.panel-oscuro h1, .panel-oscuro h2, .panel-oscuro h3 { color: #E9DCBE; }
.panel-oscuro .rotulo { color: #DFD3AE; }
.panel-oscuro a { color: #F2E6C4; }
.panel-oscuro blockquote { color: #FBF5E8; border-left-color: #C9B98A; }

.centrado { text-align: center; }
.centrado .prosa, .centrado .regla { margin-inline: auto; }
.centrado .acciones { justify-content: center; }

.prosa { max-width: var(--prosa); }
.prosa p { margin: 0 0 1.4em; }

/* ---------- Tipografía ---------- */

h1, h2, h3, h4 {
  font-family: var(--titulo);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--tinta);
  margin: 0;
  text-wrap: balance;
}

.display {
  font-family: var(--titulo);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, var(--tam-titulo));
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.titulo-seccion {
  font-family: var(--titulo);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, var(--tam-titulo));
  line-height: 1.28;
}

.rotulo {
  font-family: var(--texto);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--tinta);
  margin: 0 0 0.2rem;
}

.entrada { font-size: 16px; line-height: 1.75; }

/* ---------- Encabezado ---------- */

.sitio-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
}
.sitio-header .barra {
  max-width: var(--ancho);
  margin-inline: auto;
  padding: 1.4rem clamp(1.5rem, 5vw, 4.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: transparent;
}

.marca {
  font-family: var(--texto);
  font-size: 16px;
  font-weight: 700;
  color: #FBF3E4;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(45,28,18,.5);
}
.marca span { display: none; }

.nav-principal ul {
  display: flex; align-items: center; gap: 1.75rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-principal a {
  font-size: 16px;
  color: #FBF3E4;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(45,28,18,.45);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav-principal a:hover { border-bottom-color: #FBF3E4; }
.nav-principal a[aria-current="page"] { color: #D9C9A4; }

.abrir-menu {
  display: none;
  background: rgba(45,28,18,.3);
  border: 1px solid rgba(251,243,228,.5);
  border-radius: 4px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
  font-family: var(--texto);
  font-size: 0.95rem;
  color: #FBF3E4;
}

/* ---------- Botones ---------- */

.boton {
  display: inline-block;
  font-family: var(--texto);
  font-size: 16px;
  font-weight: 400;
  padding: 0.85rem 1.9rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.boton-lleno { background: var(--dorado); color: #4A3F14; }
.boton-lleno:hover { background: var(--tinta); color: #FBF5E8; }
.boton-linea { border-color: var(--tinta); color: var(--tinta); }
.boton-linea:hover { background: var(--tinta); color: #FBF5E8; }
.panel-oscuro .boton-linea { border-color: #F2E6C4; color: #F2E6C4; }
.panel-oscuro .boton-linea:hover { background: #F2E6C4; color: #3F3410; }

.regla { width: 72px; height: 2px; background: var(--dorado); border: 0; margin: 1.5rem 0 2rem; }

/* ---------- Portada ---------- */

.portada .contenedor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  align-items: stretch;
}
.portada-texto {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.75rem, 4vw, 3.5rem);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.portada-texto .display { margin-bottom: 1.8rem; max-width: 20ch; }
.portada-texto .prosa { margin-bottom: 2rem; max-width: 46ch; }
.portada-foto { width: 100%; height: 100%; min-height: var(--alto-foto); object-fit: cover; }

.acciones { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: flex-start; }

.atencion {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(90,74,22,.28);
  font-size: 16px;
  color: #4E4113;
  max-width: 42ch;
}
.flecha { display: block; font-size: 1.4rem; color: var(--tinta); margin: 1.4rem auto .4rem; }

/* ---------- Sobre mí ---------- */

.dos-columnas { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* Alterna el lado de la foto para dar ritmo entre secciones */
.dos-columnas.foto-izquierda > img { order: -1; }

.sobre-mi { text-align: left; }
.sobre-mi .titulo-seccion { margin-bottom: 1.4rem; }
.sobre-mi .prosa { max-width: 48ch; }

.retrato { aspect-ratio: 4/5; width: 100%; object-fit: cover; background: rgba(0,0,0,.06); }
.retrato-ancho { aspect-ratio: 16/9; width: 100%; object-fit: cover; background: rgba(0,0,0,.06); margin-block: 2.5rem; }
.centrado .retrato-ancho, .centrado .retrato { max-width: 620px; margin-inline: auto; }

/* ---------- Servicios: tarjetas de colores ---------- */

.intro-servicios { max-width: 62ch; margin: 1.6rem auto 0; }

.lista-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  margin-top: 3rem;
}
.servicio {
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.5rem, 2.5vw, 2.2rem);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.servicio { text-align: left; }
.servicio:nth-child(1) { background: rgba(var(--salvia), calc(var(--opacidad-panel) + .04)); }
.servicio:nth-child(2) { background: rgba(var(--crema-claro), var(--opacidad-panel)); }
.servicio .numero {
  font-family: var(--texto);
  font-size: 16px; font-weight: 700; color: var(--tinta);
  margin: 0 0 1.4rem; padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(90,74,22,.3);
}
.servicio h3 { font-size: var(--tam-tarjeta); font-weight: 600; margin-bottom: 1rem; }
.servicio p { margin: 0 0 1rem; }
.servicio .modalidad { margin-top: auto; padding-top: 1.6rem; font-weight: 700; color: var(--tinta); }

/* ---------- Trayectoria ---------- */

.trayectoria { margin-top: 1.5rem; text-align: left; max-width: 900px; margin-inline: auto; }
.trayectoria div { display: grid; grid-template-columns: 165px minmax(0,1fr); gap: 1.2rem; padding-block: 0.5rem; }
.trayectoria dt { font-weight: 500; }
.trayectoria dd { margin: 0; }

/* ---------- Formulario ---------- */

.formulario { display: grid; gap: 1rem; max-width: 36rem; margin-inline: auto; text-align: left; }
.campo { display: grid; gap: 0.4rem; }
.campo label { font-size: 0.95rem; font-weight: 500; color: var(--tinta); }

.formulario input, .formulario select, .formulario textarea {
  font-family: var(--texto);
  font-size: 1rem;
  color: var(--tinta);
  background: rgba(var(--crema-claro), .95);
  border: 1px solid rgba(90,74,22,.32);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  width: 100%;
}
.formulario textarea { min-height: 9rem; resize: vertical; }
.formulario input:focus, .formulario select:focus, .formulario textarea:focus {
  border-color: var(--tinta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(151,161,92,.3);
}
.formulario .boton-lleno { background: rgba(var(--oliva), 1); color: #FBF5E8; width: 100%; }
.formulario .boton-lleno:hover { background: var(--tinta); }
.nota-campo { font-size: 0.88rem; font-weight: 400; color: #4E4113; }
.trampa { position: absolute; left: -9999px; }

.datos-contacto { display: grid; gap: 1.4rem; align-content: start; text-align: center; }
.datos-contacto h3 { font-size: 1.15rem; font-weight: 500; }
.datos-contacto p { margin: 0.2rem 0 0; font-weight: 500; }

/* ---------- Mapa ---------- */

.mapa { position: relative; line-height: 0; max-width: var(--ancho); margin-inline: auto; }
.mapa iframe {
  width: 100%;
  height: clamp(300px, 42vh, 460px);
  border: 0;
  display: block;
  filter: saturate(.88);
}
.mapa-pie {
  line-height: 1.6;
  text-align: center;
  padding: 1.1rem 1rem;
  background: rgba(var(--verde-suave), .82);
  font-size: 15px;
}

/* ---------- Pie ---------- */

.sitio-footer { background: transparent; color: #FBF3E4; padding-block: 3rem 2.5rem; }
.sitio-footer .contenedor { background: transparent; padding-block: 0; text-align: left; }
.sitio-footer a { color: #FBF3E4; }
.sitio-footer a:hover { color: var(--dorado); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2.2rem; }
.sitio-footer h4 {
  font-family: var(--titulo);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dorado); margin: 0 0 0.8rem;
}
.sitio-footer p, .sitio-footer li { margin: 0 0 0.35rem; font-size: 0.98rem; }
.sitio-footer ul { list-style: none; margin: 0; padding: 0; }
.legal {
  margin-top: 2.5rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(251,243,228,.25);
  display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center;
  font-size: 0.9rem; color: #E4D6B6;
}
.legal a { color: #E4D6B6; }

/* ---------- Artículo ---------- */

.articulo .contenedor { text-align: left; }
.articulo .prosa { max-width: 76ch; margin-inline: auto; }
.articulo .prosa h2 { font-size: 1.6rem; margin: 2.4rem 0 1rem; }
.articulo .prosa ul { padding-left: 1.2rem; margin: 0 0 1.4em; }
.articulo .prosa li { margin-bottom: 0.5em; }
.articulo .prosa blockquote {
  margin: 2rem 0; padding-left: 1.5rem;
  border-left: 2px solid var(--dorado);
  font-style: italic;
  font-size: 18px; line-height: 1.6;
}
.volver { display: inline-block; margin-top: 2.5rem; font-weight: 500; }

/* ---------- Marcas de pendiente (borrador) ---------- */

.pendiente {
  display: block; margin: 1.4em 0; padding: 0.9rem 1.1rem;
  background: rgba(184,169,127,.35);
  border-left: 3px solid var(--tinta);
  font-size: 0.96rem; line-height: 1.6; color: #4A3F14;
}
.pendiente strong { font-weight: 600; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .portada .contenedor { grid-template-columns: 1fr; }
  .portada-foto { min-height: 340px; order: -1; }
  .dos-columnas { grid-template-columns: 1fr; }
  /* En pantalla chica el título va primero, sea cual sea el lado en escritorio */
  .dos-columnas.foto-izquierda > img { order: 0; }
  .centrado .retrato, .dos-columnas .retrato { max-width: 360px; margin-inline: auto; }
  .trayectoria div { grid-template-columns: 1fr; gap: 0; padding-block: 0.8rem; }
}

@media (max-width: 720px) {
  .abrir-menu { display: block; }
  .nav-principal {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(58,38,26,.96);
    padding: 0.5rem 1.5rem 1.5rem;
  }
  .nav-principal.abierto { display: block; }
  .nav-principal ul { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .nav-principal a { display: block; padding-block: 0.75rem; }
  .sitio-header .barra { position: relative; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mancha-1, .mancha-2, .mancha-3,
  .hoja-1, .hoja-2, .hoja-3 { animation: none; }
  * { transition-duration: .01ms !important; }
}
