/* Angel Ramos — estilo de referencia (solo estilo, sin contenido ajeno) */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255,255,255,0.5);
  --accent: #f5a623;
  --gradient: linear-gradient(135deg, #000 0%, #ff8a00 50%, #ffa726 100%);
  --card: rgba(255,255,255,0.06);
  --radius: 16px;
  --font: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  --glass-bg-hover: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
  --glass-line: rgba(255,255,255,.28);
  --glass-blur: blur(22px) saturate(160%);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

body.theme-light {
  --bg: #fff;
  --fg: #000;
  --muted: rgba(0,0,0,0.5);
  --card: rgba(0,0,0,0.04);
  --glass-bg: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
  --glass-bg-hover: linear-gradient(135deg, rgba(0,0,0,.12), rgba(0,0,0,.06));
  --glass-line: rgba(0,0,0,.12);
  --glass-blur: blur(22px) saturate(160%);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }

/* Header / hero */
.header { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 24px;
  z-index: 10;
}
.logo { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.nav-links {
  display: flex; align-items: center; gap: 24px;
}
.nav-links a { font-size: 14px; opacity: 0.9; padding: 11px 18px; border-radius: 45px; background: var(--glass-bg); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: background .5s var(--ease), border-color .5s var(--ease); }
.nav-links a:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }

.hero {
  flex: 1; width: 100vw; position: relative; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 120px 0 100px;
  color: var(--fg);
  text-align: left;
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  background: linear-gradient(135deg, #0a0a0a 0%, #b45309 45%, #fdba74 100%);
  background-size: 180% 180%;
  animation: heroShift 22s ease-in-out infinite;
}
.hero-inner { max-width: 1240px; margin: 0 auto; padding: 0 40px; width: 100%; }
.hero h1 {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero .lead {
  font-size: clamp(14px, 2vw, 18px);
  opacity: 0.85;
  max-width: 620px;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  background: var(--glass-bg);
  color: var(--fg);
  border: 1px solid var(--glass-line);
  border-radius: 45px;
  font-weight: 500; font-size: 14px; line-height: 1;
  letter-spacing: .01em; white-space: nowrap;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .6s var(--ease), translate .4s var(--ease);
}
.btn:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); translate: 0 -2px; }
.btn.small { padding: 11px 18px; font-size: 13px; }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: #0a0a0a; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; }
.section-head h2 { font-size: 22px; font-weight: 700; }
.section-head p { font-size: 14px; opacity: 0.6; max-width: 420px; }
.actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.actions button { font-size: 13px; padding: 8px 16px; border: 1px solid var(--glass-line); border-radius: 45px; opacity: 0.7; background: var(--glass-bg); color: var(--fg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: background .5s var(--ease), border-color .5s var(--ease); }
.actions button:hover { opacity: 1; background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.slider-arrow { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--glass-bg); border: 1px solid var(--glass-line); color: var(--fg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: background .5s var(--ease), border-color .5s var(--ease); }
.slider-arrow:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }
.slider-arrow svg { width: 14px; height: 14px; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  height: 260px;
  position: relative;
  overflow: hidden;
}
.card.large { height: 640px; }
.card-media {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: 55% 83%;
  background-repeat: no-repeat;
  position: relative;
}
.card-media::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
}
.slider-track .card .card-media::after { background: transparent !important; }
.archiviz-media { background-image: url('media/archiviz.jpg'); }
.card-overlay {
  position: absolute; inset: 32px;
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none;
}
.card-overlay strong { font-size: 16px; opacity: 0.9; }
.card-overlay h2 { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 8px 0 12px; letter-spacing: -0.02em; }
.card-overlay p { font-size: 15px; opacity: 0.8; max-width: 300px; margin-bottom: 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.slider-wrap { overflow: hidden; width: 100%; }
.slider-track { display: flex; gap: 20px; width: 100%; transition: transform 0.6s var(--ease); will-change: transform; }
.slider-track .card { flex: 0 0 calc(25% - 15px); height: 350px; position: relative; }
.slider-track .card .card-media { background-size: cover; background-position: center; }
.view-btn { position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: rgba(15,15,15,.32); border: 1px solid rgba(255,255,255,.28); color: #fff; -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); display: inline-flex; align-items: center; justify-content: center; transition: background .5s var(--ease), border-color .5s var(--ease), opacity .5s var(--ease), transform .6s var(--ease); opacity: .55; z-index: 10; pointer-events: auto; }
.slider-track .card:hover .view-btn { opacity: 1; }
.view-btn:hover { background: rgba(15,15,15,.45); border-color: rgba(255,255,255,.65); opacity: 1; transform: scale(1.06); }
.view-btn svg { width: 16px; height: 16px; }

/* Tools */
.tools { text-align: center; }
.tools h3 { font-size: 16px; opacity: 0.6; margin-bottom: 40px; }
.tools-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.tools-list span { font-size: 32px; opacity: 0.45; transition: opacity .4s var(--ease), translate .5s var(--ease), color .4s var(--ease); }
.tools-list:hover span { opacity: 0.28; }
.tools-list span:hover { opacity: 1; translate: 0 -6px; color: var(--fg); }

/* CTA */
.cta { text-align: center; padding: 120px 0; }
.cta h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.cta p { font-size: 15px; opacity: 0.7; max-width: 560px; margin: 0 auto 32px; }

/* Footer */
.footer { padding: 60px 0 40px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.brand .logo { font-size: 16px; font-weight: 700; line-height: 1; }
.brand .logo br { display: none; }
.social { display: flex; gap: 24px; font-size: 14px; }
.social a { opacity: 0.5; transition: opacity .35s var(--ease), translate .4s var(--ease); }
.social a:hover { opacity: 1; translate: 0 -2px; }
.copy { font-size: 12px; opacity: 0.4; }
.heart { color: var(--accent); }

/* Image Preview Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal.is-closing .modal-backdrop { display: none; }
.modal-panel { position: relative; z-index: 1; max-width: 90vw; max-height: 90vh; border-radius: 28px; overflow: hidden; }
.preview-modal-panel { display: block; background: #000; width: min(90vw, 85vh); height: min(90vw, 85vh); max-width: 95vw; max-height: 95vh; border-radius: 28px; overflow: hidden; opacity: 0; transform: scale(.92); transition: transform .5s var(--ease), opacity .35s var(--ease); }
.modal.is-open .preview-modal-panel { opacity: 1; transform: none; }
.preview-slider { position: relative; width: 100%; height: 100%; overflow: hidden; }
.preview-slides { display: flex; height: 100%; width: 100%; transition: transform .5s var(--ease); will-change: transform; }
.preview-slide { flex: 0 0 100%; height: 100%; }
.preview-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-controls { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 10px; }
.preview-controls[hidden] { display: none; }
.preview-arrow { width: 40px; height: 40px; border-radius: 50%; background: rgba(15,15,15,.4); border: 1px solid rgba(255,255,255,.28); color: #fff; display: inline-flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); transition: background .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease); }
.preview-arrow:hover { background: rgba(15,15,15,.62); border-color: rgba(255,255,255,.6); }
.preview-arrow svg { width: 16px; height: 16px; }
.preview-counter { font-size: 12px; letter-spacing: .02em; color: #fff; padding: 7px 12px; border-radius: 45px; background: rgba(15,15,15,.4); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: rgba(15,15,15,.32); border: 1px solid rgba(255,255,255,.28); color: #fff; -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); display: inline-flex; align-items: center; justify-content: center; opacity: .55; transition: background .5s var(--ease), border-color .5s var(--ease), opacity .5s var(--ease), transform .6s var(--ease); }
.close:hover { background: rgba(15,15,15,.45); border-color: rgba(255,255,255,.65); opacity: 1; transform: scale(1.06); }
.close svg { width: 18px; height: 18px; }

/* Motion & micro-interactions */
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.nav { animation: fadeIn .9s var(--ease) both; }
.hero h1 { animation: fadeUp 1s var(--ease) .05s both; }
.hero .lead { animation: fadeUp 1s var(--ease) .2s both; }
.hero .btn { animation: fadeIn 1s var(--ease) .35s both; }

/* Scroll reveal (solo cuando hay JS, para no ocultar contenido si falla) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .8s var(--ease) var(--reveal-delay, 0ms),
    transform .8s var(--ease) var(--reveal-delay, 0ms),
    translate .6s var(--ease),
    border-color .5s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.in-view { opacity: 1; transform: none; }

/* Interactive lift + image zoom */
.card { transition: border-color .5s var(--ease); }
.card:hover { border-color: rgba(255,255,255,.2); }

/* Responsive */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .slider-wrap { width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .slider-wrap::-webkit-scrollbar { display: none; }
  .slider-track { gap: 20px; }
  .hero h1 { font-size: 36px; line-height: 1.15; }
  .nav { flex-wrap: wrap; gap: 16px; }
  .nav a { margin-left: 0; }
  .footer-grid { flex-direction: column; align-items: flex-start; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
