/* =============================================== */
/* CSS BASE - Variables, Reset, Typography */
/* Diseño según manual de identidad rico.solutions */
/* =============================================== */

:root {
  /* — Núcleo cromático (tema noche) — */
  --noche: #101216;
  --pizarra: #181B21;
  --marino: #17294B;
  --ocre: #C4972B;
  --tiza: #ECEBE6;
  --cuerpo: #C4C3BD;
  --humo: #83868D;
  --linea: rgba(255, 255, 255, 0.09);
  --linea2: rgba(255, 255, 255, 0.16);
  --success: #4caf50;
  --error: #f44336;

  /* — Tipografía: una sola voz — */
  --grotesk: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Menlo", "Consolas", monospace;

  /* Spacing */
  --space-0-5rem: 0.5rem;
  --space-1rem: 1rem;
  --space-1-5rem: 1.5rem;
  --space-2rem: 2rem;
  --space-3rem: 3rem;
  --space-4rem: 4rem;

  /* Breakpoints */
  --breakpoint-sm: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 1024px;

  /* Z-index */
  --z-modal: 1000;
  --z-nav: 900;
  --z-tooltip: 500;

  /* Animations */
  --transition-fast: 200ms ease;
  --transition-normal: 300ms ease;
}

/* =============================================== */
/* RESET & NORMALIZE */
/* =============================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--grotesk);
  font-size: 17px;
  line-height: 1.6;
  color: var(--cuerpo);
  background-color: var(--noche);
  overflow-x: hidden;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Remove default link styling */
a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* =============================================== */
/* TYPOGRAPHY */
/* =============================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--tiza);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.1rem;
}

p {
  margin-bottom: var(--space-1rem);
  color: var(--cuerpo);
}

p:last-child {
  margin-bottom: 0;
}

p strong {
  color: var(--tiza);
  font-weight: 600;
}

ul,
ol {
  margin-left: var(--space-1-5rem);
  margin-bottom: var(--space-1rem);
}

li {
  margin-bottom: var(--space-0-5rem);
}

strong {
  font-weight: 600;
  color: var(--tiza);
}

code {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--humo);
}

/* =============================================== */
/* LAYOUT */
/* =============================================== */

.section__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10vh 7vw;
}

section {
  border-top: 1px solid var(--linea);
}

section:first-of-type {
  border-top: none;
}

.section__title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--tiza);
  margin-bottom: 3rem;
}

/* =============================================== */
/* HEADER & NAVIGATION */
/* =============================================== */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background-color: rgba(16, 18, 22, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--linea);
}

.navbar {
  padding: 0.95rem 0;
}

.navbar__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 7vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar__logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tiza);
}

.navbar__logo::after {
  content: "";
  width: 5px;
  height: 5px;
  background-color: var(--ocre);
  display: inline-block;
  margin-left: 0.3rem;
  border-radius: 50%;
}

.navbar__menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.navbar__link {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--humo);
  transition: color var(--transition-fast);
}

.navbar__link:hover {
  color: var(--tiza);
}

.navbar__link--lang {
  color: var(--ocre);
  border: 1px solid var(--ocre);
  padding: 0.5rem 1rem;
  border-radius: 0px;
}

.navbar__toggle {
  display: none;
  flex-direction: column;
  background: none;
  gap: 6px;
}

.navbar__toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--tiza);
  transition: all var(--transition-fast);
}

/* =============================================== */
/* HERO SECTION */
/* =============================================== */

.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 7vw;
  text-align: center;
  border-top: none;
}

.hero__container {
  max-width: 900px;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1.7rem;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--tiza);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--ocre);
  margin-bottom: 2.4rem;
  font-weight: 600;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================== */
/* BUTTONS */
/* =============================================== */

.button {
  font-family: var(--grotesk);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 1rem 1.8rem;
  border: 1px solid transparent;
  border-radius: 0px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

.button--primary {
  background-color: var(--ocre);
  color: var(--noche);
  border-color: var(--ocre);
}

.button--primary:hover {
  background-color: transparent;
  color: var(--ocre);
}

.button--primary:active {
  opacity: 0.85;
}

.button--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button--secondary {
  border: 1px solid var(--ocre);
  color: var(--ocre);
  background-color: transparent;
}

.button--secondary:hover {
  background-color: rgba(196, 151, 43, 0.08);
}

.button--link {
  background: none;
  border: none;
  padding: 0;
  color: var(--ocre);
  text-decoration: underline;
  font-weight: 400;
  font-size: 1rem;
}

.button--link:hover {
  opacity: 0.75;
}

.button--sm {
  font-size: 0.85rem;
  padding: 0.6rem 1.2rem;
}

.button--lg {
  font-size: 1.1rem;
  padding: 1.2rem 2.2rem;
}

/* =============================================== */
/* FORMS */
/* =============================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--tiza);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--linea2);
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--tiza);
  font-family: var(--grotesk);
  font-size: 1rem;
  border-radius: 0px;
  transition: all var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--humo);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ocre);
  background-color: rgba(196, 151, 43, 0.05);
}

.form-input.is-invalid {
  border-color: var(--error);
  background-color: rgba(244, 67, 54, 0.05);
}

.form-error {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  font-family: var(--mono);
}

.form-error.is-visible {
  display: block;
}

.form-status {
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 0px;
  text-align: center;
  font-size: 0.9rem;
  display: none;
  border-left: 3px solid transparent;
}

.form-status.is-visible {
  display: block;
}

.form-status--success {
  background-color: rgba(76, 175, 80, 0.08);
  color: var(--success);
  border-left-color: var(--success);
}

.form-status--error {
  background-color: rgba(244, 67, 54, 0.08);
  color: var(--error);
  border-left-color: var(--error);
}

/* =============================================== */
/* FOOTER */
/* =============================================== */

.footer {
  background-color: var(--pizarra);
  border-top: 1px solid var(--linea);
  padding: 2rem 7vw;
}

.footer__content {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
}

.footer__logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tiza);
  margin-bottom: 1rem;
}

.footer__logo::after {
  content: "";
  width: 4px;
  height: 4px;
  background-color: var(--ocre);
  display: inline-block;
  margin-left: 0.25rem;
  border-radius: 50%;
}

.footer__links {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer__links a {
  color: var(--ocre);
  transition: opacity var(--transition-fast);
  margin: 0 0.8rem;
}

.footer__links a:hover {
  opacity: 0.75;
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--humo);
  letter-spacing: 0.05em;
}

/* =============================================== */
/* UTILITIES */
/* =============================================== */

.link-cta {
  color: var(--ocre);
  text-decoration: underline;
  transition: opacity var(--transition-fast);
  font-weight: 600;
}

.link-cta:hover {
  opacity: 0.75;
}

.dot {
  color: var(--ocre);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--ocre);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
