/**
 * AUTUMN SUNFLOWERS - Landing Page
 * Diseño profesional con animaciones sutiles y armoniosas
 */

:root {
  color-scheme: light;
  --ink: #271b14;
  --soft-ink: #5e4b3e;
  --cream: #fff7e6;
  --ivory: #fffaf0;
  --gold: #d59625;
  --gold-light: #f0c85a;
  --copper: #9f4e24;
  --leaf: #5d6b38;
  --shadow: rgba(34, 19, 9, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px clamp(24px, 6vw, 80px) 80px;
  isolation: isolate;
  overflow: hidden;
}

/* Background Image - Full visibility */
.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -3;
  animation: subtle-zoom 25s ease-in-out infinite alternate;
}

@keyframes subtle-zoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Veil - only small area at bottom for text readability */
.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(255, 250, 240, 0.92) 0%,
    rgba(255, 250, 240, 0.6) 15%,
    rgba(255, 250, 240, 0.15) 30%,
    transparent 45%
  );
  z-index: -2;
}

/* Subtle grain texture */
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== TOPBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 6vw, 80px);
  z-index: 50;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.9) 0%, transparent 100%);
  backdrop-filter: blur(8px);
  transition: all 0.4s ease;
}

.topbar.scrolled {
  background: rgba(255, 250, 240, 0.95);
  box-shadow: 0 2px 20px rgba(34, 19, 9, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand__mark {
  width: 12px;
  height: 24px;
  border-radius: 10px 10px 2px 10px;
  background: linear-gradient(145deg, var(--gold), var(--copper));
  box-shadow: 10px 0 0 var(--leaf);
  transform: rotate(-12deg);
  transition: transform 0.3s ease;
}

.brand:hover .brand__mark {
  transform: rotate(-8deg) scale(1.1);
}

.topbar__nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 0.9rem;
  font-weight: 600;
}

.topbar__nav a {
  position: relative;
  padding: 8px 0;
  color: var(--soft-ink);
  transition: color 0.3s ease;
}

.topbar__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--copper));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.topbar__nav a:hover {
  color: var(--ink);
}

.topbar__nav a:hover::after {
  width: 100%;
}

/* ===== HERO CONTENT ===== */
.hero__content {
  position: relative;
  max-width: 600px;
  margin-top: auto;
  padding-bottom: 40px;
  z-index: 2;
  animation: fadeUp 1s ease 0.3s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(213, 150, 37, 0.15), rgba(159, 78, 36, 0.1));
  border-radius: 20px;
  color: var(--copper);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__copy {
  max-width: 480px;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--soft-ink);
}

/* ===== BUTTONS ===== */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  position: relative;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.button--primary {
  color: #fffaf1;
  background: linear-gradient(135deg, #885027 0%, #c17822 50%, #dbad4c 100%);
  box-shadow:
    0 4px 15px rgba(159, 78, 36, 0.3),
    0 1px 3px rgba(159, 78, 36, 0.2);
}

.button--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #9a6030 0%, #d4882a 50%, #e8bc5a 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.button--primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 25px rgba(159, 78, 36, 0.4),
    0 3px 10px rgba(159, 78, 36, 0.2);
}

.button--primary:hover::before {
  opacity: 1;
}

.button--primary span {
  position: relative;
  z-index: 1;
}

.button--ghost {
  color: var(--ink);
  background: rgba(255, 250, 240, 0.8);
  border: 1.5px solid rgba(39, 27, 20, 0.15);
  backdrop-filter: blur(10px);
}

.button--ghost:hover {
  background: rgba(255, 250, 240, 0.95);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ===== SEASON METER ===== */
.season-meter {
  position: absolute;
  left: clamp(24px, 6vw, 80px);
  right: clamp(24px, 6vw, 80px);
  bottom: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  z-index: 3;
}

.season-meter span {
  position: relative;
  padding-top: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft-ink);
}

.season-meter span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--copper));
  transform: scaleX(0);
  transform-origin: left;
  animation: growLine 1.2s ease 0.8s forwards;
}

@keyframes growLine {
  to { transform: scaleX(1); }
}

/* ===== FLOATING PETALS ===== */
.petal-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: var(--size);
  height: calc(var(--size) * 1.6);
  border-radius: 60% 20% 60% 20%;
  background: linear-gradient(140deg,
    rgba(240, 200, 90, 0.7),
    rgba(213, 150, 37, 0.6) 50%,
    rgba(159, 78, 36, 0.5)
  );
  opacity: var(--alpha);
  filter: blur(var(--blur));
  animation: petalFall var(--duration) ease-in-out var(--delay) infinite;
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: var(--alpha);
  }
  50% {
    transform: translate3d(var(--drift), 50vh, 0) rotate(180deg) scale(0.95);
  }
  90% {
    opacity: var(--alpha);
  }
  100% {
    transform: translate3d(calc(var(--drift) * -0.5), 110vh, 0) rotate(360deg) scale(0.9);
    opacity: 0;
  }
}

/* ===== SECTIONS ===== */
.continuum,
.signal {
  padding: 100px clamp(24px, 6vw, 80px);
}

.signal {
  background: linear-gradient(180deg, var(--ivory), #fdf6e8);
  text-align: center;
}

.continuum {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.5fr);
  gap: clamp(40px, 8vw, 100px);
  background: linear-gradient(180deg, #fdf6e8, #f8edd8);
}

.section-copy h2,
.signal h2 {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
}

.signal p {
  max-width: 560px;
  margin: 20px auto 40px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--soft-ink);
}

/* ===== BENEFITS GRID ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.benefit-card {
  padding: 32px 24px;
  background: rgba(255, 252, 245, 0.9);
  border: 1px solid rgba(213, 150, 37, 0.15);
  border-radius: 16px;
  text-align: center;
  transition: all 0.4s ease;
}

.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(159, 78, 36, 0.12);
  border-color: rgba(213, 150, 37, 0.3);
}

.benefit-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(213, 150, 37, 0.2));
  transition: transform 0.4s ease;
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.15) rotate(-5deg);
}

.benefit-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.benefit-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--soft-ink);
}

/* ===== PHASE GRID ===== */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.phase {
  padding: 28px;
  background: rgba(255, 252, 245, 0.85);
  border: 1px solid rgba(39, 27, 20, 0.08);
  border-radius: 14px;
  transition: all 0.4s ease;
}

.phase:hover {
  background: rgba(255, 252, 245, 0.98);
  box-shadow: 0 12px 32px rgba(74, 45, 20, 0.1);
  transform: translateY(-4px);
}

.phase__number {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(213, 150, 37, 0.2), rgba(159, 78, 36, 0.15));
  border-radius: 6px;
  color: var(--copper);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.phase h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.phase p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--soft-ink);
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px clamp(24px, 6vw, 80px);
  background: #f5ead4;
  text-align: center;
  border-top: 1px solid rgba(39, 27, 20, 0.06);
}

.footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--soft-ink);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .continuum {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .hero__veil {
    background: linear-gradient(
      to top,
      rgba(255, 250, 240, 0.95) 0%,
      rgba(255, 250, 240, 0.7) 20%,
      rgba(255, 250, 240, 0.2) 40%,
      transparent 55%
    );
  }

  .hero__content {
    padding-bottom: 20px;
  }

  .topbar {
    height: 64px;
  }

  .topbar__nav {
    display: none;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  .hero__copy {
    font-size: 0.95rem;
    margin-top: 16px;
  }

  .hero__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  .button {
    width: 100%;
    min-height: 48px;
    font-size: 0.9rem;
  }

  .season-meter {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .season-meter span:not(:first-child) {
    display: none;
  }

  .phase-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  /* Sections padding reduced on mobile */
  .continuum,
  .signal {
    padding: 60px 20px;
  }

  .section-copy h2,
  .signal h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .benefit-card {
    padding: 24px 20px;
  }

  .benefit-icon {
    font-size: 2.2rem;
  }

  .benefit-card h3 {
    font-size: 1rem;
  }

  .benefit-card p {
    font-size: 0.85rem;
  }

  .phase {
    padding: 22px;
  }

  .footer {
    padding: 24px 20px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .eyebrow {
    font-size: 0.65rem;
    padding: 5px 10px;
  }

  .hero__copy {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .brand {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
  }

  .brand__mark {
    width: 10px;
    height: 20px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .petal-field {
    display: none;
  }
}
