
:root {
  --color-primary: #555555;
  --color-heading: #2B2B2B;
  --color-accent: #D61412;
  --color-light-bg: #F8F9FA;
  --color-dark-bg: #2B2B2B;
  --color-darker-bg: #1A1A1A;
  --color-band: #3F3F3F;
  --color-border: #D9D9D9;
  --color-white: #FFFFFF;

  /* Theme semantic variables */
  --bg-body: #F8F9FA; /* Soft white background */
  --bg-card: #FFFFFF;
  --text-main: #444444;
  --text-heading: #2B2B2B;
  --border-element: #D9D9D9;
  --grid-pattern: rgba(0, 0, 0, 0.05);
  --card-shadow: rgba(0, 0, 0, 0.05);
  
  --logo-filter: none;
}

body.dark-mode, html.dark-mode-preload body {
  --bg-body: #121212;
  --bg-card: #1A1A1A;
  --text-main: #CCCCCC;
  --text-heading: #F4F4F4;
  --border-element: #333333;
  --grid-pattern: rgba(255, 255, 255, 0.03);
  --card-shadow: rgba(0, 0, 0, 0.4);
  
  --color-darker-bg: #0A0A0A;
  --color-dark-bg: #1A1A1A;
}

/* Dark mode specific overrides */
body.dark-mode .logo img, html.dark-mode-preload body .logo img {
  content: url("/assets/svg/horizontal-works-blanco.svg");
}
body.dark-mode .lang-switcher a, html.dark-mode-preload body .lang-switcher a {
  color: var(--text-main);
}
body.dark-mode .lang-switcher a.active, html.dark-mode-preload body .lang-switcher a.active {
  color: var(--color-accent);
}


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

body {
  font-family: "Questrial", "Didact Gothic", "Futura", "Trebuchet MS", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  
  /* Subtle tech grid background */
  background-image: linear-gradient(var(--grid-pattern) 1px, transparent 1px),
  linear-gradient(90deg, var(--grid-pattern) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  margin-bottom: 1rem;
  font-weight: normal;
  letter-spacing: 0.02em;
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
  color: var(--text-heading);
}

h2 {
  font-size: 2rem;
  position: relative;
  display: inline-block;
}

/* Pixel tech accent on h2 */
h2::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 24px;
  height: 4px;
  background-color: var(--color-accent);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 48px;
  display: block;
}

.lang-switcher a {
  margin-left: 16px;
  color: var(--text-main);
  font-weight: bold;
  font-size: 0.9rem;
  padding: 12px 16px;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.lang-switcher a:hover {
  text-decoration: none;
  border-color: var(--border-element);
}

.lang-switcher a.active {
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

section {
  padding: 80px 0;
}

/* Hero Section with dark tech impact */
.hero {
  background: linear-gradient(135deg, var(--color-darker-bg) 0%, var(--color-dark-bg) 100%);
  color: var(--color-white);
  padding: 80px 40px;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
}

/* Subtle inner grid for hero to remove flatness */
.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Decorative background pixel grid for Hero */
.hero::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 160px;
  height: 160px;
  background-image: radial-gradient(var(--color-band) 2px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.5;
}

.hero p {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  max-width: 60ch;
  margin-bottom: 2.5rem;
  color: #CCCCCC;
}

.cta-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 16px 32px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  transition: transform 0.2s, background-color 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 4px 4px 0px rgba(214, 20, 18, 0.3); /* Pixel block shadow */
}

.cta-button:hover, .cta-button:focus {
  background-color: #E81A18;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px rgba(214, 20, 18, 0.3);
  text-decoration: none;
  color: var(--color-white);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 40px;
}

@media (min-width: 650px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background-color: var(--bg-card);
  padding: 32px;
  border: 1px solid var(--border-element);
  position: relative;
  transition: transform 0.2s;
  box-shadow: 4px 4px 0px var(--card-shadow); /* Block shadow */
}

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

/* Red top border block for cards */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 48px;
  height: 4px;
  background-color: var(--color-accent);
}

.card h3 {
  margin-bottom: 1rem;
}

.process-list {
  list-style: none;
  counter-reset: process-counter;
  margin-top: 40px;
}

.process-list li {
  position: relative;
  padding-left: 64px;
  margin-bottom: 32px;
}

.process-list li::before {
  counter-increment: process-counter;
  content: "0" counter(process-counter);
  position: absolute;
  left: 0;
  top: -4px;
  color: var(--border-element);
  font-size: 2rem;
  font-weight: bold;
  font-family: monospace;
}

/* Pixel graphic separator */
.pixels {
  display: flex;
  gap: 8px;
  margin: 60px auto;
  justify-content: center;
}

.pixel {
  background-color: var(--color-accent);
  display: inline-block;
}

.pixel:nth-child(1) { width: 8px; height: 8px; }
.pixel:nth-child(2) { width: 16px; height: 16px; }
.pixel:nth-child(3) { width: 24px; height: 24px; }

.contact-info {
  background: linear-gradient(135deg, var(--color-dark-bg) 0%, var(--color-darker-bg) 100%);
  color: var(--color-white);
  padding: 64px 40px;
  margin-top: 40px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Top red line with a subtle glow */
.contact-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(214, 20, 18, 0.5);
  z-index: 2;
}

/* The dot pattern repeated in the contact section */
.contact-info::after {
  content: "";
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 200px;
  height: 200px;
  background-image: radial-gradient(var(--color-band) 2px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.4;
  pointer-events: none;
  border-radius: 50%; /* Make it a circular cluster of dots */
}

.contact-info h2 {
  color: var(--color-white);
}

.contact-info p {
  color: #CCCCCC;
}

.contact-info a {
  color: var(--color-white);
  text-decoration: underline;
  font-weight: bold;
}

.contact-info a:hover {
  color: var(--color-accent);
}

.contact-address {
  font-style: normal;
  margin-top: 32px;
  border-left: 2px solid var(--color-band);
  padding-left: 24px;
}

.contact-address p strong {
  color: var(--color-white);
  letter-spacing: 0.05em;
}

footer {
  border-top: 1px solid var(--border-element);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}

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

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-darker-bg);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

#preloader img {
  width: 320px;
  max-width: 80%;
}

body.loading {
  overflow: hidden;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border-element);
  color: var(--text-main);
  padding: 12px 16px;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.lang-switcher {
  display: flex;
}

/* Mejoras de Accesibilidad (Lighthouse) */
footer a, .contact-address a, p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* Privacy Policy Justification */
.privacy-policy-text p {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Fix for hero h1 color */
.hero h1 {
  color: #FFFFFF;
  position: relative;
  z-index: 2;
}

.contact-info > * {
  position: relative;
  z-index: 2;
}
.hero .cta-button {
  position: relative;
  z-index: 2;
}
