/* =========================================================
   TEKKEL SpA — styles.css
   Sitio estático, monocromo + acento teal.
   ========================================================= */

/* ---------- Variables de tema ---------- */
:root,
[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F6F8F9;
  --text: #0E2630;
  --text-muted: #5B6B73;
  --border: #E4E8EA;
  --accent: #1F8A9C;
  --accent-hover: #176E7D;
  --accent-contrast: #FFFFFF;

  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow-soft: 0 1px 2px rgba(14, 38, 48, 0.04), 0 4px 16px rgba(14, 38, 48, 0.05);
  --radius: 10px;
  --radius-lg: 14px;
  --maxw: 1140px;
}

[data-theme="dark"] {
  --bg: #0B1A22;
  --surface: #112430;
  --text: #EAF0F2;
  --text-muted: #9DB0B8;
  --border: #1E3543;
  --accent: #3FB6C9;
  --accent-hover: #5BC8D9;
  --accent-contrast: #07141A;

  --header-bg: rgba(11, 26, 34, 0.82);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 820px;
}

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-surface {
  background-color: var(--surface);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 clamp(28px, 4vw, 48px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  font-size: 1.15rem;
}

/* En tema oscuro se cambia el src de los logos por la versión
   adecuada al fondo oscuro. La propiedad content funciona en <img>
   en navegadores modernos y evita problemas de timing con JS. */
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .hero-logo {
  content: url("images/logo_black.png");
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.primary-nav a:hover {
  color: var(--accent);
}

.primary-nav a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background-color: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* Hamburguesa (móvil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background-color: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 12px 4px;
}

.btn-link:hover {
  color: var(--accent-hover);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 10vw, 120px);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-text h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo {
  width: 100%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
}

/* ---------- Prose (enfoque) ---------- */
.section-lead {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 2rem;
}

.prose p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Pilares del enfoque: badges con ícono + texto */
.pillars {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pillar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.pillar:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.pillar:hover .pillar-icon {
  color: var(--accent);
}

/* Cierre de la sección: frase destacada */
.section-coda {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 600;
  color: var(--text);
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

.prose h3 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.prose ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.prose ul li {
  margin-bottom: 0.5rem;
}

.prose ul li:last-child {
  margin-bottom: 0;
}

.prose ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.prose ol li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.prose ol li:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.prose .legal-updated {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Grid de tarjetas ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 12px;
  background-color: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.card:hover .card-icon {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.card h3 {
  font-size: 1.2rem;
  margin: 0 0 10px;
}

.card p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Proyectos ---------- */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.project-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  background-color: var(--bg);
  transition: border-color 0.2s ease;
}

.project-item:hover {
  border-color: var(--accent);
}

.project-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.project-item:hover .project-icon {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.project-body {
  flex: 1;
  min-width: 0;
}

.project-item h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

.project-item p {
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Pasos ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--accent-contrast);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  margin-bottom: 14px;
}

.step h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

.step p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.contact-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.contact-details li {
  display: grid;
  gap: 4px;
}

.contact-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-form {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.field .optional {
  color: var(--text-muted);
  font-weight: 400;
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 138, 156, 0.18);
}

[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus {
  box-shadow: 0 0 0 3px rgba(63, 182, 201, 0.22);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background-color: var(--surface);
  padding: 48px 0 28px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-wordmark {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.footer-tagline {
  color: var(--text-muted);
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.footer-contact p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 6px;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-legal a:hover {
  color: var(--accent);
}

.footer-copy {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-copy p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

/* ---------- Animaciones al scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Foco visible (accesibilidad) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-media {
    order: -1;
  }

  .hero-logo {
    max-width: 260px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    transform: translateY(-120%);
    transition: transform 0.28s ease;
    box-shadow: var(--shadow-soft);
    z-index: 99;
  }

  .primary-nav.is-open {
    transform: translateY(0);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }

  .primary-nav ul a {
    display: block;
    padding: 10px 0;
  }

  .primary-nav ul a::after {
    display: none;
  }

  .nav-actions {
    justify-content: space-between;
    gap: 12px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-link {
    text-align: center;
  }
}
