/*
Theme Name: RDA International
Theme URI: https://rda.international
Author: RDA International
Description: Tema corporativo de RDA International, C.A. Incluye la página de sitio en construcción y una página de contacto con formulario.
Version: 0.1.3
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rda-international
*/

/* ---------------------------------------------------------------------------
   Tipografía (autoalojada)
--------------------------------------------------------------------------- */
@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
}

/* ---------------------------------------------------------------------------
   Variables de marca (tomadas del logo y del arte corporativo)
--------------------------------------------------------------------------- */
:root {
	--burgundy: #8d021c;
	--burgundy-dark: #6b0115;
	--signal: #e30b21;
	--swoosh-red: #9e0311;
	--steel: #5d6065;
	--steel-light: #aeb2b6;
	--line: #e4e6e8;
	--paper: #fdfefd;
	--ink: #1a1a1a;
	--error: #b00020;
	--gutter: clamp(20px, 5vw, 72px);
	--swoosh-w: clamp(200px, 26vw, 400px);
	--header-h: 120px; /* logo de 72px + 24px de padding arriba y abajo */
}

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

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

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	color: var(--ink);
	font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1 {
	margin: 0 0 24px;
	font-size: clamp(2.25rem, 4.6vw, 4rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--burgundy);
}

:focus-visible {
	outline: 3px solid var(--signal);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 8px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--ink);
	color: #fff;
}

.skip-link:focus {
	left: 16px;
}

/* ---------------------------------------------------------------------------
   Cabecera y pie
--------------------------------------------------------------------------- */
.site-header {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px var(--gutter);
}

.site-logo {
	display: block;
	line-height: 0;
}

.site-logo img {
	display: block;
	width: 72px;
	height: auto;
}

.site-nav {
	display: flex;
	gap: 28px;
}

.site-nav a {
	padding: 6px 0;
	border-bottom: 3px solid transparent;
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.site-nav a:hover {
	border-bottom-color: var(--steel-light);
}

.site-nav a[aria-current="page"] {
	border-bottom-color: var(--signal);
}

.site-footer {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 32px;
	padding: 20px var(--gutter);
	border-top: 1px solid var(--line);
	color: var(--steel);
	font-size: 0.875rem;
}

.site-footer p {
	margin: 0;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
}

.site-footer a {
	color: var(--steel);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--burgundy);
	text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Botón
--------------------------------------------------------------------------- */
.btn {
	display: inline-block;
	padding: 14px 28px;
	border: 0;
	border-radius: 4px;
	background: var(--burgundy);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.btn:hover {
	background: var(--burgundy-dark);
	color: #fff;
}

/* ---------------------------------------------------------------------------
   Inicio: sitio en construcción
--------------------------------------------------------------------------- */
.hero {
	position: relative;
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	align-items: center;
	min-height: 520px;
	/* El espacio inferior reserva la altura de las curvas para que no tapen el texto */
	padding: 8px var(--gutter) calc(var(--swoosh-w) * 0.45 + 24px);
	overflow: hidden;
}

.hero__text {
	position: relative;
	z-index: 2;
	max-width: 36rem;
}

.hero__text p {
	max-width: 32rem;
	color: #3a3d41;
	font-size: 1.125rem;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 28px;
	margin-top: 32px;
}

.quick-contact {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.6;
}

.quick-contact a {
	color: var(--steel);
	text-decoration: none;
}

.quick-contact a:hover {
	color: var(--burgundy);
	text-decoration: underline;
}

/* Torre de perforación (se dibuja de abajo hacia arriba al cargar) */
.hero__art {
	position: absolute;
	/* Se centra y se ajusta a la parte de la sección visible sin hacer scroll */
	--hero-visible: min(100%, 100vh - var(--header-h));
	top: calc(var(--hero-visible) / 2);
	right: clamp(24px, 10vw, 220px);
	z-index: 1;
	height: max(240px, min(var(--hero-visible) - 24px, 780px, 68vw));
	aspect-ratio: 420 / 760;
	transform: translateY(-50%);
	pointer-events: none;
}

.derrick {
	display: block;
	width: 100%;
	height: 100%;
}

.drop-outer {
	fill: #17130f;
	fill: url(#derrick-oil);
}

.drop-shine {
	fill: none;
	stroke: #fff;
	stroke-width: 9;
	stroke-linecap: round;
	opacity: 0.16;
}

.drop-inner {
	fill: var(--signal);
}

.derrick .d {
	stroke: var(--steel-light);
	stroke-width: 5;
}

@media (prefers-reduced-motion: no-preference) {
	.derrick__drop {
		opacity: 0;
		animation: rda-fade 0.8s ease-out 0.1s forwards;
	}

	.derrick .d {
		stroke-dasharray: 1;
		animation: rda-draw 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
		animation-delay: calc(0.5s + var(--i) * 90ms);
	}
}

@keyframes rda-fade {
	to {
		opacity: 1;
	}
}

@keyframes rda-draw {
	0% {
		stroke-dashoffset: 1;
		opacity: 0;
	}
	1% {
		opacity: 1;
	}
	100% {
		stroke-dashoffset: 0;
		opacity: 1;
	}
}

/* Curvas de la identidad corporativa */
.swoosh {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 0;
	width: var(--swoosh-w);
	height: auto;
	pointer-events: none;
}

.swoosh__gray {
	fill: var(--steel);
}

.swoosh__red {
	fill: var(--swoosh-red);
	stroke: var(--paper);
	stroke-width: 4;
}

/* ---------------------------------------------------------------------------
   Contacto
--------------------------------------------------------------------------- */
.contact {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	gap: clamp(32px, 6vw, 96px);
	align-items: start;
	padding: 24px var(--gutter) 72px;
}

.contact h1 {
	font-size: clamp(2.25rem, 4vw, 3.25rem);
	margin-bottom: 20px;
}

.contact h1::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 18px;
	background: var(--signal);
}

.contact__intro > p {
	max-width: 30rem;
	color: #3a3d41;
	font-size: 1.0625rem;
}

.person {
	margin-top: 40px;
}

.person__name {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

.person__title {
	margin: 0 0 20px;
	color: var(--steel);
}

.person__list {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.person__list li {
	display: flex;
	align-items: center;
	gap: 14px;
}

.person__list a {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.person__list a:hover {
	color: var(--burgundy);
	text-decoration: underline;
}

.ico {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--burgundy);
	color: #fff;
}

.ico svg {
	width: 18px;
	height: 18px;
}

/* Formulario */
.contact__form {
	padding: clamp(20px, 3vw, 36px);
	border: 1px solid var(--line);
	border-top: 4px solid var(--burgundy);
	border-radius: 4px;
	background: #fff;
}

.field {
	margin-bottom: 20px;
}

.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 16px;
}

.field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.95rem;
	font-weight: 600;
}

.optional {
	color: var(--steel);
	font-weight: 400;
}

.field input,
.field textarea {
	display: block;
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid #bfc3c7;
	border-radius: 4px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	line-height: 1.4;
}

.field textarea {
	min-height: 150px;
	resize: vertical;
}

.field input:focus,
.field textarea:focus {
	border-color: var(--burgundy);
	outline: 3px solid rgba(227, 11, 33, 0.3);
	outline-offset: 0;
}

.field [aria-invalid="true"] {
	border-color: var(--error);
}

.field__error {
	margin: 6px 0 0;
	color: var(--error);
	font-size: 0.9rem;
	line-height: 1.4;
}

.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.notice {
	margin-bottom: 24px;
	padding: 14px 18px;
	border-left: 4px solid;
}

.notice p {
	margin: 0;
}

.notice--ok {
	border-color: #1e7b34;
	background: #eef7f0;
}

.notice--error {
	border-color: var(--error);
	background: #fdeded;
}

/* ---------------------------------------------------------------------------
   Páginas genéricas
--------------------------------------------------------------------------- */
.content {
	flex: 1;
	width: 100%;
	max-width: 46rem;
	padding: 24px var(--gutter) 72px;
}

.content h1 a {
	color: inherit;
	text-decoration: none;
}

/* ---------------------------------------------------------------------------
   Pantallas pequeñas
--------------------------------------------------------------------------- */
@media (max-width: 860px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		padding-top: 24px;
		padding-bottom: 290px;
	}

	.hero__art {
		top: auto;
		bottom: -40px;
		right: -40px;
		height: 320px;
		transform: none;
		opacity: 0.55;
	}

	.swoosh {
		width: 180px;
	}

	.contact {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 560px) {
	.site-logo img {
		width: 56px;
	}

	.site-nav {
		gap: 20px;
	}

	.field-row {
		grid-template-columns: 1fr;
	}

	.site-footer {
		flex-direction: column;
	}
}
