/* =========================================================
   Ramiro Suárez - Hoja de estilos principal
   Para cambiar la marca, edita las variables de :root
   ======================================================== */
:root {
  --rsr-primary: #0B3C5D;
  --rsr-accent:  #00B4D8;
  --rsr-text:    #1A2B3C;
  --rsr-muted:   #5A6B7B;
  --rsr-bg:      #F5F7FA;
  --rsr-white:   #FFFFFF;

  --border: #E2E8F0;
  --shadow: 0 10px 30px rgba(11, 60, 93, 0.12);
  --radius: 16px;
  --font-body: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --container: 1120px;
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: 'Inter', sans-serif;
	color: var(--rsr-text);
	background: var(--rsr-white);
	line-height: 1.65;
	font-size: 16.5px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--rsr-primary); text-decoration: none; }
a:hover { color: var(--rsr-accent); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--rsr-text); margin-top: 0; }

.container {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/* Utilidades de layout */
.site-content { }

.section { padding: 64px 0; }

.section:nth-child(even) { background: var(--rsr-bg); }
.section:nth-child(odd)  { background: var(--rsr-white); }

.section__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	font-size: 0.82rem;
	color: var(--rsr-accent);
	margin-bottom: 8px;
}

.section-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.4em; }
.section__lead { color: var(--rsr-muted); font-size: 1.1rem; max-width: 640px; }

/* ---------- Cabecera ---------- */
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	background: linear-gradient(to bottom, rgba(11, 60, 93, 0.55), transparent);
}

.site-header.is-scrolled {
	position: fixed;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 18px rgba(11, 60, 93, 0.12);
	backdrop-filter: saturate(180%) blur(10px);
	animation: fadeDrop 0.35s ease;
}

@keyframes fadeDrop {
	from { transform: translateY(-12px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.site-branding__name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.5rem;
	color: #ffffff;
	letter-spacing: 0.02em;
}

.site-header.is-scrolled .site-branding__name { color: var(--rsr-text); }

.site-nav__list {
	display: flex;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-nav__list a {
	color: #ffffff;
	font-weight: 600;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.site-header.is-scrolled .site-nav__list a { color: var(--rsr-text); }
.site-nav__list a:hover,
.site-header.is-scrolled .site-nav__list a:hover { color: var(--rsr-accent); }

/* Selector de idioma */
.lang-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	color: #ffffff;
}

.site-header.is-scrolled .lang-switch { color: var(--rsr-text); }
.lang-switch a { color: inherit; opacity: 0.6; }
.lang-switch a:hover { opacity: 1; color: var(--rsr-accent); }
.lang-switch .is-active { opacity: 1; color: var(--rsr-accent); }

/* Toggle móvil */
.nav-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 8px;
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	width: 26px;
	height: 2.5px;
	background: #ffffff;
	margin: 5px 0;
	border-radius: 2px;
	transition: transform 0.25s;
}

.site-header.is-scrolled .nav-toggle__bar { background: var(--rsr-text); }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	min-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: linear-gradient(135deg, #0B3C5D 0%, #0E5A8A 55%, #0B3C5D 100%);
}

.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero__poster { position: absolute; inset: 0; background: center/cover no-repeat; }

.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, rgba(11, 60, 93, 0.66) 0%, rgba(11, 60, 93, 0.30) 55%, rgba(11, 60, 93, 0.15) 100%);
}

.hero__content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 860px;
	padding: 120px 24px 60px;
	color: #fff;
}

.hero__eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.85rem;
	font-weight: 700;
	color: #C7F0F9;
}

.hero__title {
	font-family: var(--font-display);
	font-size: clamp(2.4rem, 6vw, 4.5rem);
	color: #ffffff;
	margin: 18px 0 20px;
}

.hero__subtitle {
	font-size: 1.15rem;
	max-width: 620px;
	margin: 0 auto 36px;
	color: rgba(255, 255, 255, 0.92);
}

.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn {
	display: inline-block;
	padding: 14px 30px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.98rem;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
	border: 2px solid transparent;
	text-align: center;
}

.btn--primary {
	background: var(--rsr-primary);
	color: #fff;
	box-shadow: 0 10px 24px rgba(0, 180, 216, 0.25);
}

.btn--primary:hover { background: var(--rsr-accent); color: #fff; transform: translateY(-2px); }

.btn--ghost {
	background: transparent;
	border-color: var(--rsr-primary);
	color: var(--rsr-primary);
}

.btn--ghost:hover { background: var(--rsr-primary); color: #fff; }

.btn--lg { padding: 17px 40px; font-size: 1.05rem; }

/* ---------- Carrusel ---------- */
.carousel-section { background: var(--rsr-bg); }

.carousel__swiper {
	overflow: visible;
	padding: 20px 4px 60px;
	margin-top: 30px;
}

.carousel__slide {
	position: relative;
	display: flex;
	align-items: flex-end;
	margin: 0;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	background: #fff;
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

.carousel__slide:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.carousel__slide-title {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 32px 24px 18px;
	background: linear-gradient(to top, rgba(11, 60, 93, 0.85), transparent);
	color: #ffffff;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.15rem;
}

.swiper-pagination-bullet { background: var(--rsr-primary); opacity: 0.35; }
.swiper-pagination-bullet-active { opacity: 1; }

.swiper-button-next,
.swiper-button-prev { color: var(--rsr-primary); }

/* ---------- CTA ---------- */
.cta { background: var(--rsr-primary); }

.cta__inner {
	text-align: center;
	max-width: 640px;
	margin: 0 auto;
}

.cta__title { color: #ffffff; font-size: clamp(2rem, 4vw, 2.8rem); }
.cta__text { color: rgba(255, 255, 255, 0.85); margin-bottom: 32px; font-size: 1.1rem; }

/* ---------- Tarjetas y chips ---------- */
.card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 28px;
	transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.area-card {
	display: block;
	text-decoration: none;
	color: inherit;
}

.area-card__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--rsr-text); margin-bottom: 8px; }
.area-card__text { color: var(--rsr-muted); font-size: 0.95rem; }

.chip {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--rsr-bg);
	border: 1px solid var(--border);
	color: var(--rsr-text);
	font-size: 0.85rem;
	font-weight: 600;
}

/* ---------- Página de área ---------- */
.area-header { margin-bottom: 24px; }

.area-header .section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }

.area-subtitle { color: var(--rsr-accent); font-weight: 600; margin-bottom: 12px; }

.area-descripcion { font-size: 1.1rem; max-width: 760px; margin-bottom: 48px; }

.area-servicios,
.area-roles,
.area-herramientas,
.area-portfolio,
.area-form { margin-top: 56px; }

.area-servicios h2,
.area-roles h2,
.area-herramientas h2,
.area-portfolio h2,
.area-form h2 { font-size: 1.5rem; margin-bottom: 20px; }

.servicio { margin-bottom: 24px; }
.servicio h3 { font-size: 1.15rem; margin-bottom: 8px; }
.servicio ul, .rol ul { padding-left: 20px; }
.servicio li, .rol li { margin-bottom: 6px; }

.rol { margin-bottom: 28px; }
.rol h3 { font-size: 1.1rem; margin-bottom: 8px; }

.area-nota { color: var(--rsr-muted); font-style: italic; }

.area-herramientas .chip { margin: 0 8px 8px 0; }

/* ---------- Casos de trabajo (portafolio) ---------- */
.caso {
	background: #ffffff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 32px;
	margin-bottom: 32px;
}

.caso__titulo { font-size: 1.4rem; margin-bottom: 8px; }

.caso__meta {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	color: var(--rsr-muted);
	font-size: 0.95rem;
	margin-bottom: 20px;
}

.caso__meta span { font-weight: 600; }
.caso__meta .caso__cliente { color: var(--rsr-primary); }

.caso__caracteristicas { padding-left: 20px; }

.caso__imagenes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
	margin: 24px 0;
}

.caso__imagen {
	margin: 0;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.caso__imagen img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: contain;
	background: var(--rsr-bg);
}

.caso__imagen figcaption {
	padding: 10px 14px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--rsr-muted);
	background: var(--rsr-bg);
}

.stl-viewer {
	width: 100%;
	height: 420px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin: 24px 0 12px;
	background: var(--rsr-bg);
	cursor: grab;
}

.stl-viewer:active { cursor: grabbing; }

.stl-viewer canvas { display: block; }

.caso__modelo-nota {
	color: var(--rsr-muted);
	font-size: 0.85rem;
}

/* ---------- Formulario ---------- */
.rsr-form {
	background: #ffffff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 36px;
	max-width: 760px;
	margin: 40px auto 0;
}

.rsr-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.rsr-form__field { display: block; margin-bottom: 20px; }

.rsr-form__label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 8px;
	color: var(--rsr-text);
}

.rsr-form input[type="text"],
.rsr-form input[type="email"],
.rsr-form input[type="tel"],
.rsr-form textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--border);
	border-radius: 10px;
	font: inherit;
	background: #FFFFFF;
	color: var(--rsr-text);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rsr-form input:focus,
.rsr-form textarea:focus {
	outline: none;
	border-color: var(--rsr-primary);
	box-shadow: 0 0 0 3px rgba(11, 60, 93, 0.18);
}

.rsr-form textarea { resize: vertical; }

/* Honeypot oculto */
.rsr-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rsr-form__note { color: var(--rsr-muted); font-size: 0.85rem; margin-top: 18px; }

.rsr-banner {
	padding: 16px 20px;
	border-radius: 12px;
	margin-bottom: 28px;
	font-weight: 600;
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

.rsr-banner--ok { background: #e6f4ec; color: #1f5a41; border: 1px solid #b7dcc8; }
.rsr-banner--error { background: #fdecea; color: #9b2c2c; border: 1px solid #f5c6c0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--rsr-primary); color: rgba(255, 255, 255, 0.8); }

.site-footer__inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 40px;
	padding-top: 64px;
	padding-bottom: 48px;
}

.site-footer__title { color: #ffffff; font-size: 1.2rem; margin-bottom: 14px; }

.site-footer__menu { list-style: none; padding: 0; margin: 0; }
.site-footer__menu li { margin-bottom: 10px; }
.site-footer__menu a { color: rgba(255, 255, 255, 0.8); }
.site-footer__menu a:hover { color: var(--rsr-accent); }

.site-footer__text a { color: var(--rsr-accent); }

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 20px 0;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.55);
}

/* ---------- Página genérica / 404 ---------- */
.page-hero {
	padding-top: 150px;
	padding-bottom: 40px;
	background: var(--rsr-bg);
}

.error-404 { text-align: center; padding: 60px 0; }
.error-404__code { font-size: 6rem; font-weight: 800; color: var(--rsr-accent); margin: 0; line-height: 1; }

.entry-content h2 { margin-top: 1.6em; }

/* ---------- Publicación (index/single) ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }

.post-card {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	background: #fff;
	transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.post-card__title { font-size: 1.3rem; }
.post-card__body { padding: 20px; }

.pagination { margin-top: 40px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 8px; }
.pagination a, .pagination .current {
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	display: inline-block;
}

.entry-thumbnail, .entry__media { margin: 24px 0; border-radius: var(--radius); overflow: hidden; }

/* ---------- Utilidades ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.admin-bar .site-header { top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.section { padding: 48px 0; }

	.site-nav { display: none; }

	.nav-toggle { display: block; }

	.site-nav.is-open {
		display: block;
		position: absolute;
		top: 100%;
		left: 16px;
		right: 16px;
		background: #ffffff;
		border-radius: 14px;
		box-shadow: var(--shadow);
	}

	.site-nav.is-open .site-nav__list {
		flex-direction: column;
		padding: 20px;
		gap: 16px;
	}

	.site-nav.is-open .site-nav__list a { color: var(--rsr-text); }

	.site-footer__inner { grid-template-columns: 1fr; gap: 24px; }
	.rsr-form__row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Cifras de trayectoria ---------- */
.rsr-cifras {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
	margin: 40px 0 8px;
}

.cifra { text-align: center; }

.cifra__valor {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 2.8rem);
	font-weight: 800;
	line-height: 1.1;
	color: var(--rsr-primary);
}

.cifra__label {
	display: block;
	margin-top: 8px;
	font-size: 0.95rem;
	color: var(--rsr-muted);
}

/* ---------- Sobre mí (foto + texto) ---------- */
.sobre-mi {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 40px;
	align-items: center;
}

.sobre-mi__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.sobre-mi__texto .section-title { margin-top: 0; }

@media (max-width: 700px) {
	.sobre-mi { grid-template-columns: 1fr; }
}
