/* =========================================================================
   Ramiro Gonzales Comercialización — hoja de estilos única
   Sin framework, sin build. Colores muestreados del logotipo original.
   ========================================================================= */

/* --- Tokens -------------------------------------------------------------
   Tema claro por defecto en :root. El bloque de preferencia del sistema va
   protegido con :not([data-theme="light"]) y el bloque [data-theme="dark"]
   se repite después, para que el selector manual gane en ambos sentidos. */

:root {
  color-scheme: light;

  --fondo:        #ffffff;
  --superficie:   #f7f7f8;
  --tinta:        #16161a;
  --atenuado:     #5c5c66;
  --borde:        #e3e3e7;

  --marca:        #f40303;  /* rojo exacto del logotipo */
  --marca-texto:  #dd0202;  /* 5,1:1 sobre blanco — el rojo puro da 4,3:1 */
  --marca-suave:  rgba(244, 3, 3, 0.07);
  --boton-fondo:  #d40202;  /* blanco sobre este rojo: 5,5:1 */
  --boton-hover:  #b60101;
  --boton-tinta:  #ffffff;

  --marca-img:    image-set(url("../images/marca.webp") type("image/webp"),
                            url("../images/marca.png")  type("image/png"));

  --sombra:       0 1px 2px rgba(16, 16, 18, 0.05), 0 8px 24px rgba(16, 16, 18, 0.06);
  --radio:        14px;
  --ancho:        68rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --fondo:        #101012;
    --superficie:   #191920;
    --tinta:        #ededf2;
    --atenuado:     #a0a0ac;
    --borde:        #2a2a33;

    --marca:        #ff6b5e;
    --marca-texto:  #ff6b5e;
    --marca-suave:  rgba(255, 107, 94, 0.12);
    --boton-fondo:  #ff6b5e;
    --boton-hover:  #ff8579;
    --boton-tinta:  #101012;

    --marca-img:    image-set(url("../images/marca-oscuro.webp") type("image/webp"),
                              url("../images/marca-oscuro.png")  type("image/png"));

    --sombra:       0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --fondo:        #101012;
  --superficie:   #191920;
  --tinta:        #ededf2;
  --atenuado:     #a0a0ac;
  --borde:        #2a2a33;

  --marca:        #ff6b5e;
  --marca-texto:  #ff6b5e;
  --marca-suave:  rgba(255, 107, 94, 0.12);
  --boton-fondo:  #ff6b5e;
  --boton-hover:  #ff8579;
  --boton-tinta:  #101012;

  --marca-img:    image-set(url("../images/marca-oscuro.webp") type("image/webp"),
                            url("../images/marca-oscuro.png")  type("image/png"));

  --sombra:       0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* --- Base --------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--fondo);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

svg { display: block; }

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

.saltar {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--boton-fondo);
  color: var(--boton-tinta);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.saltar:focus { top: 1rem; }

/* --- Cinta superior ----------------------------------------------------- */

.cinta {
  display: flex;
  justify-content: flex-end;
  max-width: var(--ancho);
  margin-inline: auto;
  padding: 1rem clamp(1.25rem, 5vw, 2.5rem) 0;
}

.tema {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--tinta);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tema:hover { border-color: var(--marca); background: var(--marca-suave); }

.tema svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* El sol se ve en tema claro (invita a pasar a oscuro), la luna en oscuro. */
.tema__luna { display: none; }
:root[data-theme="dark"] .tema__sol  { display: none; }
:root[data-theme="dark"] .tema__luna { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tema__sol  { display: none; }
  :root:not([data-theme="light"]) .tema__luna { display: block; }
}

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

.portada {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--ancho);
  margin-inline: auto;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(3rem, 9vw, 5.5rem);
  text-align: center;
}

/* Resplandor tenue con el rojo de marca, detrás del monograma. */
.portada::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 26rem;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 26%, var(--marca-suave), transparent 70%);
  pointer-events: none;
}

.portada__marca {
  width: clamp(132px, 30vw, 208px);
  aspect-ratio: 1;
  background-image: var(--marca-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.portada__titulo {
  margin: 0;
  font-size: clamp(2.1rem, 7.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.portada__rubro {
  display: block;
  margin-top: 0.7rem;
  color: var(--atenuado);
  font-size: clamp(0.72rem, 2.6vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.portada__claim {
  max-width: 46ch;
  color: var(--atenuado);
  font-size: clamp(1rem, 2.6vw, 1.15rem);
}

.boton {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  background: var(--boton-fondo);
  color: var(--boton-tinta);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.boton:hover { background: var(--boton-hover); transform: translateY(-1px); }
.boton:active { transform: translateY(0); }

/* --- Secciones ---------------------------------------------------------- */

.seccion {
  max-width: var(--ancho);
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.25rem, 5vw, 2.5rem);
  border-top: 1px solid var(--borde);
}

.seccion__titulo {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.seccion__titulo::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.85rem;
  border-radius: 2px;
  background: var(--marca);
}

.seccion__bajada {
  margin-top: 1rem;
  max-width: 52ch;
  color: var(--atenuado);
}

/* --- Contacto ----------------------------------------------------------- */

/* Dos columnas fijas en pantallas anchas en vez de auto-fit: con cuatro
   items, auto-fit daba una fila de tres y una suelta. Además, una columna
   más ancha tolera mejor una dirección larga. */
.contacto {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 52rem;
}

@media (min-width: 46rem) {
  .contacto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.contacto__item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.15rem 1rem;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--superficie);
}

.contacto__icono {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--marca-suave);
  color: var(--marca-texto);
}

.contacto__icono svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contacto__etiqueta {
  color: var(--atenuado);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dato {
  font-size: 1rem;
  font-weight: 600;
  /* El correo es largo y en móvil la columna es angosta: que parta la palabra
     antes que desbordar y provocar scroll horizontal. */
  overflow-wrap: anywhere;
}

a.dato { color: var(--marca-texto); text-decoration: none; }
a.dato:hover { text-decoration: underline; }

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

.pie {
  max-width: var(--ancho);
  margin-inline: auto;
  padding: 2rem clamp(1.25rem, 5vw, 2.5rem) 3rem;
  border-top: 1px solid var(--borde);
  color: var(--atenuado);
  font-size: 0.875rem;
  text-align: center;
}

/* --- Movimiento reducido ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
