/* Landing-page styles for /es/ and /en/ (hero, sections, steps, features, CTA).
   Shared tokens + chrome (nav, footer) live in /css/shared.css. Both localized
   index files (es/index.html, en/index.html) link shared.css + landing.css, so
   the visual layer stays a single source of truth across locales. */

/* === Hero === */
.hero {
  position: relative;
  isolation: isolate;
  padding: 128px 24px 80px;
  background: var(--bg-dark);
  text-align: center;
  color: var(--text-on-dark);
  overflow: hidden;
}
/* Water-tank fill — mirrors the WaterCard's wavy surface + vertical teal
   gradient (dark-mode 20% -> 40% opacity). The SVG stretches to cover
   the hero exactly via preserveAspectRatio="none" + background-size 100%
   100%; the wave sits at ~45% from the hero top. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/img/water-fill.svg') center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: -1;
}
.hero-content {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 auto 16px;
  color: var(--text-on-dark);
  max-width: 720px;
}
.hero p {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-on-dark-muted);
  max-width: 580px;
  margin: 0 auto 48px;
}

/* --- Hero phone stack (triple fan: home / reservoir / explore) --- */
.hero-phone-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0 auto 48px;
  height: 622px;
  max-width: 900px;
}
.hero-phone {
  display: block;
  width: 280px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-phone--home {
  position: relative;
  z-index: 3;
  filter:
    drop-shadow(0 24px 60px rgba(0,0,0,0.55))
    drop-shadow(0 0 60px rgba(14,124,140,0.4));
}
.hero-phone--explore,
.hero-phone--reservoir {
  position: absolute;
  width: 240px;
  top: 36px;
  z-index: 2;
  opacity: 0.94;
  filter:
    drop-shadow(0 20px 50px rgba(0,0,0,0.5))
    drop-shadow(0 0 50px rgba(14,124,140,0.3));
}
.hero-phone--explore {
  left: calc(50% - 360px);
  transform: rotate(-8deg);
  transform-origin: top right;
}
.hero-phone--reservoir {
  right: calc(50% - 360px);
  transform: rotate(8deg);
  transform-origin: top left;
}

/* === Store badges === */
.store-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.store-badge {
  position: relative;
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
}
.store-badge img {
  height: 48px;
  transition: transform 0.15s ease;
  display: block;
  filter: drop-shadow(0 0 32px rgba(230,81,0,0.35));
}
.store-badge:hover img,
.store-badge:focus img { transform: scale(1.05); }
.store-badge[data-state="coming-soon"] img { opacity: 0.92; }
.store-badge[data-state="coming-soon"]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--surface-elevated);
  color: var(--text-on-dark);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  border: 1px solid var(--border-on-dark);
}
.store-badge[data-state="coming-soon"]:hover::after,
.store-badge[data-state="coming-soon"]:focus::after,
.store-badge[data-state="coming-soon"].show-tooltip::after { opacity: 1; }

/* === Section base (dark) === */
.section {
  position: relative;
  padding: 80px 24px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.features-bg { box-shadow: inset 0 1px 0 var(--border-on-dark); }
.section-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}
.section-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-on-dark);
}
.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-on-dark-muted);
  margin: 0 auto 48px;
  max-width: 560px;
}

/* === How it works === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface-dark);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-on-dark-lg);
  border-color: var(--primary-light);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-on-dark);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.step-icon {
  display: block;
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
}
.step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-on-dark);
}
.step p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

/* === Why PantanOS (features) === */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--surface-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-on-dark);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}
.feature h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text-on-dark);
}
.feature p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-on-dark-muted);
}

/* === CTA === */
.cta {
  position: relative;
  padding: 80px 24px;
  background:
    linear-gradient(135deg, rgba(14,124,140,0.7) 0%, rgba(10,61,68,0.55) 50%, var(--bg-dark) 100%),
    var(--bg-dark);
  text-align: center;
  color: var(--text-on-dark);
  overflow: hidden;
}
.cta h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 32px;
  color: var(--text-on-dark);
}

/* === Responsive === */
@media (max-width: 1023px) {
  /* Tablet: drop the left-flank Explore phone, keep center Home + right Reservoir.
     Tighten the right phone offset so it still fits inside the
     narrower viewport without spilling under the hero padding. */
  .hero-phone--explore { display: none; }
  .hero-phone--reservoir { right: calc(50% - 300px); }
  .hero-phone-stack { height: 580px; }
}
@media (max-width: 768px) {
  /* Mobile: only the center Home phone */
  .hero { padding: 96px 20px 56px; }
  .hero h1 { font-size: 1.875rem; }
  .hero p { font-size: 1rem; margin-bottom: 32px; }
  .hero-phone--reservoir { display: none; }
  .hero-phone { width: 220px; }
  .hero-phone-stack { height: 489px; max-width: 100%; margin-bottom: 32px; }
  .store-badge img { height: 42px; }
  .section { padding: 56px 20px; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle { font-size: 0.95rem; margin-bottom: 32px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .features { grid-template-columns: 1fr; gap: 16px; }
  .cta { padding: 56px 20px; }
  .cta h2 { font-size: 1.5rem; }
}
