/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0a;
  --surface:   #121212;
  --surface2:  #1a1a1a;
  --border:    #222222;
  --accent:    #ccff00;
  --accent-dim:#99bf00;
  --text:      #f0f0f0;
  --muted:     #888888;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
.label {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ─── Loader / Intro ─────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  animation: loaderFadeOut .6s ease 2.4s forwards;
  pointer-events: none;
}

#loader img {
  width: 160px;
  opacity: 0;
  animation: fadeIn .8s ease .4s forwards;
}

#loader p {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  letter-spacing: .12em;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn .8s ease .9s forwards;
}

@keyframes fadeIn     { to { opacity: 1; } }
@keyframes loaderFadeOut { to { opacity: 0; pointer-events: none; } }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5vw;
  background: rgba(10,10,10,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

nav img { height: 36px; width: auto; }

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav ul a {
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--muted);
  transition: color .2s;
}
nav ul a:hover { color: var(--text); }

.nav-cta {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  padding: .45rem 1.2rem;
  border-radius: 2px;
  transition: background .2s, color .2s !important;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#inicio {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/portada.png') center/cover no-repeat;
  filter: brightness(.35);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,.7) 0%, rgba(10,10,10,.2) 60%, rgba(204,255,0,.04) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5vw;
  max-width: 760px;
}

.hero-content .label { margin-bottom: 1.2rem; }

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}

.hero-content h1 span { color: var(--accent); }

.hero-content p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .9rem 2.4rem;
  border-radius: 2px;
  border: 1px solid var(--accent);
  transition: background .2s, transform .15s;
  cursor: pointer;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ─── Section Shell ──────────────────────────────────────────────────────── */
section { padding: 7rem 5vw; }

.section-header {
  max-width: 640px;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: .6rem;
}

/* ─── Servicios – Bento Grid ─────────────────────────────────────────────── */
#servicios { background: var(--surface); }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
}

.bento-card {
  background: var(--bg);
  padding: 2.8rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: background .2s;
  border: 1px solid var(--border);
}
.bento-card:hover { background: var(--surface2); }

.bento-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-icon svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.bento-card p { font-size: .9rem; color: var(--muted); line-height: 1.65; }

.bento-card .tag {
  margin-top: auto;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: .7;
}

/* ─── Filosofía ──────────────────────────────────────────────────────────── */
#filosofia { background: var(--bg); }

.filosofia-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.fi-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.fi-stat h4 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.fi-stat p {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .4rem;
  max-width: 160px;
}

.filosofia-text .label { margin-bottom: 1rem; }

.filosofia-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.filosofia-text p {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.fi-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: 1.5rem;
}

.fi-list li {
  font-size: .9rem;
  color: var(--text);
  padding-left: 1.2rem;
  position: relative;
}

.fi-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ─── Galería ────────────────────────────────────────────────────────────── */
#galeria { background: var(--surface); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
}

.gallery-item {
  overflow: hidden;
  background: var(--surface2);
  position: relative;
}

.gallery-item:first-child  { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(4) { grid-column: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
  filter: brightness(.85) saturate(.8);
}

.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1);
}

.gallery-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  padding: 1.4rem;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.gallery-caption span {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── Contacto ───────────────────────────────────────────────────────────── */
#contacto { background: var(--bg); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 6rem;
  align-items: start;
}

.contact-info .label { margin-bottom: 1rem; }

.contact-info h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.contact-info p { color: var(--muted); font-size: .9rem; line-height: 1.75; margin-bottom: 2rem; }

.contact-details { display: flex; flex-direction: column; gap: .8rem; }

.contact-details a {
  font-size: .85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .6rem;
  transition: color .2s;
}
.contact-details a:hover { color: var(--accent); }
.contact-details a svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.field { display: flex; flex-direction: column; gap: .45rem; }

.field label {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  padding: .85rem 1rem;
  border-radius: 2px;
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .5; }

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--accent); }

.field select option { background: var(--surface); }

.form-submit {
  margin-top: .5rem;
}

.btn-submit {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  font-family: var(--font);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 1rem 2.8rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  width: 100%;
}
.btn-submit:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer img { height: 28px; width: auto; opacity: .7; }

footer p { font-size: .8rem; color: var(--muted); }

.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: .8rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

/* ─── Scroll Reveal ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento { grid-template-columns: 1fr; }
  .filosofia-inner { grid-template-columns: 1fr; gap: 3rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:first-child { grid-column: span 2; }
  .gallery-item:nth-child(4) { grid-column: span 1; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
  nav ul { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .fi-stats { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:first-child { grid-column: span 2; grid-row: span 1; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; }
  .gallery-item:nth-child(4) { grid-column: span 1; }
}
