/* ═══════════════════════════════════════════
   FREIRINA PREMIUM — STYLESHEET
   Capital Regional de Patrimonio Cultural de Atacama
   ═══════════════════════════════════════════ */

:root {
  --bg-deep: #050507;
  --bg-primary: #0a0b0f;
  --bg-card: #111218;
  --bg-elevated: #181920;
  --text-primary: #f0ece4;
  --text-secondary: #8e8ea0;
  --text-muted: #55556a;
  --gold: #c9a227;
  --gold-light: #e0b940;
  --gold-dim: rgba(201, 162, 39, 0.15);
  --border: rgba(255,255,255,0.06);
  --shadow-deep: 0 20px 60px rgba(0,0,0,0.8);
  --font-serif: 'Cinzel', Georgia, serif;
  --font-sans: 'Lato', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-sans); line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; transition: color .3s ease; }
ul { list-style: none; }
::selection { background: var(--gold); color: #000; }

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
section { padding: clamp(60px, 10vw, 120px) 0; position: relative; overflow: hidden; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
.section-tag { color: var(--gold); text-transform: uppercase; letter-spacing: 0.35em; font-size: 0.7rem; font-weight: 700; display: inline-block; margin-bottom: 12px; padding: 4px 16px; border: 1px solid rgba(201,162,39,0.3); border-radius: 2px; }
.section-title { font-size: clamp(2.2rem, 5vw, 4rem); margin-bottom: 20px; color: var(--text-primary); }
.section-title span { color: var(--gold); }
.section-desc { font-size: 1.1rem; color: var(--text-secondary); max-width: 64ch; line-height: 1.8; }
.lead { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.8; }
.text-small { font-size: 0.9rem; color: var(--text-secondary); }
.temp-small { font-size: 0.9rem; color: var(--text-secondary); }

/* ── Header ── */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 18px 0; transition: all 0.5s var(--ease-out);
  background: transparent; backdrop-filter: blur(0px);
}
.site-header.scrolled {
  background: rgba(5,5,7,0.88); backdrop-filter: blur(16px);
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.12em; color: var(--text-primary); }
.logo .dot { color: var(--gold); font-size: 1.8rem; }
.nav-links { display: flex; gap: 28px; }
@media (max-width: 960px) { .nav-links { display: none; } }
.nav-links.open { display:flex; flex-direction:column; position:absolute;top:72px;left:0;right:0;background:rgba(5,5,7,0.95);backdrop-filter:blur(16px);padding:24px;gap:20px;border-bottom:1px solid var(--border);}
.nav-links a { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; color: var(--text-secondary); position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--text-primary); }
.btn-gold {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--gold); color: var(--gold);
  padding: 10px 22px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em;
  font-weight: 700; transition: all 0.3s; cursor: pointer; border-radius: 2px;
}
.btn-gold:hover { background: var(--gold); color: var(--bg-primary); box-shadow: 0 0 30px rgba(201,162,39,0.3); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 4px; }
@media (max-width: 960px) { .mobile-toggle { display: block; } .btn-gold.desktop-only { display: none; } }

/* ── Hero Slider ── */
.hero-swiper { height: 100vh; width: 100%; }
.hero-swiper .swiper-slide { background-size: cover; background-position: center; position: relative; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,5,7,0.3) 0%, rgba(5,5,7,0.75) 100%); display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px; }
.hero-content { max-width: 850px; opacity: 0; transform: translateY(30px); transition: all 1.2s ease 0.3s; }
.swiper-slide-active .hero-content { opacity: 1; transform: translateY(0); }
.hero-content .tag { color: var(--gold); text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.75rem; font-weight: 700; margin-bottom: 16px; display: block; }
.hero-content h1 { font-size: clamp(3rem, 8vw, 6.5rem); margin-bottom: 24px; background: linear-gradient(135deg, #fff 20%, var(--gold-light) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: clamp(1rem, 1.5vw, 1.2rem); color: rgba(240,236,228,0.85); max-width: 60ch; margin: 0 auto 40px; line-height: 1.7; }
.btn-hero { display: inline-block; padding: 16px 40px; background: var(--gold); color: #000; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; border-radius: 2px; transition: all 0.3s; font-size: 0.85rem; }
.btn-hero:hover { background: var(--gold-light); transform: translateY(-3px); box-shadow: 0 10px 40px rgba(201,162,39,0.35); }
.hero-scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); text-align: center; z-index: 10; animation: floatDown 2s infinite; }
.hero-scroll-indicator span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-secondary); display: block; margin-bottom: 10px; }
.scroll-line { width: 1px; height: 50px; background: linear-gradient(to bottom, var(--gold), transparent); margin: 0 auto; }
@keyframes floatDown { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }
.swiper-pagination-bullet { background: var(--text-muted); opacity: 0.4; width: 8px; height: 8px; transition: all 0.3s; }
.swiper-pagination-bullet-active { background: var(--gold); opacity: 1; width: 32px; border-radius: 4px; }
.swiper-button-next, .swiper-button-prev { color: var(--gold) !important; width: 48px; height: 48px; opacity: 0.6; transition: opacity 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { opacity: 1; }

/* ── Grids ── */
.grid-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 960px) { .grid-split { grid-template-columns: 1fr; } .grid-split.reverse > *:nth-child(1) { order: 2; } }

/* ── Media Frames ── */
.media-frame { position: relative; overflow: hidden; border-radius: 4px; border: 1px solid var(--border); }
.media-frame img { width: 100%; height: 480px; transition: transform 0.8s ease; filter: saturate(0.85) contrast(1.1); }
.media-frame:hover img { transform: scale(1.05); }
@media (max-width: 960px) { .media-frame img { height: 320px; } }
.media-frame .caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.media-frame .caption span { color: var(--gold); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; }
.media-frame .caption h4 { font-size: 1rem; margin-top: 4px; }
.stat-badge { position: absolute; top: 24px; right: 24px; background: rgba(5,5,7,0.85); backdrop-filter: blur(8px); padding: 12px 20px; border: 1px solid var(--gold-dim); border-radius: 4px; text-align: center; }
.stat-badge .num { font-family: var(--font-serif); font-size: 1.8rem; color: var(--gold); display: block; }
.stat-badge .lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-secondary); }

/* ── Premium Cards ── */
.card-premium {
  background: var(--bg-card); border: 1px solid var(--border); padding: 28px;
  border-radius: 4px; transition: all 0.4s var(--ease-out);
  position: relative; overflow: hidden;
}
.card-premium::before { content:'';position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:0;transition:opacity 0.4s; }
.card-premium:hover { transform: translateY(-6px); border-color: rgba(201,162,39,0.3); background: var(--bg-elevated); box-shadow: var(--shadow-deep); }
.card-premium:hover::before { opacity: 1; }
.card-premium h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--text-primary); }
.card-premium p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }
.card-price { font-family: var(--font-serif); color: var(--gold); font-size: 1.2rem; }
.card-rating { color: var(--gold); font-size: 0.8rem; margin-bottom: 12px; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content:'';position:absolute;left:15px;top:0;bottom:0;width:1px;background:linear-gradient(to bottom,var(--gold),var(--border) 80%); }
.timeline-item { position:relative;margin-bottom:48px; }
.timeline-item::before { content:'';position:absolute;left:-29px;top:6px;width:10px;height:10px;border-radius:50%;background:var(--gold);border:2px solid var(--bg-primary); }
.timeline-year { font-family: var(--font-serif); font-size: 1.6rem; color: var(--gold); margin-bottom: 8px; }
.timeline-text { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* ── Route Items ── */
.route-list { display: grid; gap: 12px; }
.route-item { display:flex;align-items:center;gap:16px;padding:16px 20px;background:var(--bg-card);border:1px solid var(--border);border-radius:4px;transition:all 0.3s; }
.route-item:hover { border-color:var(--gold-dim);background:var(--bg-elevated); }
.route-icon { font-size:1.5rem;width:40px;text-align:center;flex-shrink:0; }
.route-info h4 { font-size:0.95rem;margin-bottom:4px;font-family:var(--font-sans);font-weight:600; }
.route-info p { font-size:0.8rem;color:var(--text-secondary); }
.route-dist { margin-left:auto;color:var(--gold);font-family:var(--font-serif);font-size:0.9rem;flex-shrink:0; }

/* ── Map ── */
.map-container { border-radius:4px;overflow:hidden;border:1px solid var(--border);position:relative; }
.map-container iframe { width:100%;height:500px;border:0;filter:grayscale(0.8) brightness(0.6) contrast(1.3); }
@media (max-width: 960px) { .map-container iframe { height: 350px; } }

/* ── Reveal Animation ── */
[data-reveal] { opacity:0;transform:translateY(40px);transition:all 0.8s var(--ease-out); }
[data-reveal].revealed { opacity:1;transform:translateY(0); }

/* ── CTA / Newsletter ── */
.cta-section { background:linear-gradient(135deg,var(--bg-elevated),var(--bg-card));text-align:center;padding:clamp(80px,10vw,120px) 0; }
.newsletter-form { display:flex;gap:12px;max-width:500px;margin:32px auto 0; }
.newsletter-form input { flex:1;padding:14px 20px;background:rgba(255,255,255,0.04);border:1px solid var(--border);color:var(--text-primary);font-family:var(--font-sans);font-size:0.9rem;outline:none;transition:border-color 0.3s; }
.newsletter-form input:focus { border-color:var(--gold); }
.newsletter-form button { padding:14px 28px;background:var(--gold);color:#000;border:none;font-weight:700;text-transform:uppercase;letter-spacing:0.1em;font-size:0.8rem;cursor:pointer;transition:all 0.3s;white-space:nowrap; }
.newsletter-form button:hover { background:var(--gold-light); }

/* ── Footer ── */
.site-footer { background:var(--bg-deep);padding:80px 0 40px;border-top:1px solid var(--border); }
.footer-grid { display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:48px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns:1fr 1fr; } .newsletter-form { flex-direction:column; } }
.footer-brand h4 { font-family:var(--font-serif);font-size:1.6rem;margin-bottom:12px; }
.footer-brand p { color:var(--text-secondary);font-size:0.9rem;max-width:300px; }
.footer-heading { color:var(--gold);font-size:0.8rem;text-transform:uppercase;letter-spacing:0.15em;margin-bottom:20px;font-weight:700; }
.footer-links li { margin-bottom:10px; }
.footer-links a { color:var(--text-secondary);font-size:0.9rem; }
.footer-links a:hover { color:var(--text-primary); }
.footer-bottom { text-align:center;padding-top:32px;border-top:1px solid var(--border);color:var(--text-muted);font-size:0.8rem; }
