/* ============================================================
   FUORIFEED — styles.css — Horizontal Carousel Edition
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@900&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* ── Design Tokens ── */
:root {
  --color-beige:      #fcf0d1;
  --color-terracotta: #c75738;
  --color-amber:      #fcb503;
  --color-teal:       #6cb2a6;
  --color-teal-dark:  #3d7d71;
  --color-whatsapp:   #25D366;
  --color-dark:       #2b2b2b;
  --color-white:      #ffffff;
  --viewport-height: 100vh;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --font-primary:   'Nunito', sans-serif;
  --font-secondary: 'Playfair Display', serif;
}

@supports (height: 100dvh) {
  :root {
    --viewport-height: 100dvh;
  }
}

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

html, body {
  width: 100%;
  height: 100%;
  min-height: var(--viewport-height);
  overflow: hidden;
  font-size: 16px;
}

body {
  font-family: var(--font-secondary);
  font-weight: 700;
  color: var(--color-beige);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

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

/* ── Focus ── */
:focus-visible { outline: 3px solid var(--color-amber); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   INTRO OVERLAY
   ============================================================ */
#intro-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.6s ease;
}

#intro-overlay.fade-out { opacity: 0; pointer-events: none; }

#intro-logo {
  width: min(260px, 60vw);
  clip-path: inset(0 100% 0 0);
}

#intro-logo.reveal {
  animation: logo-reveal 3s ease-out forwards;
}

#intro-logo.pulse {
  animation: logo-pulse 1.4s ease-in-out forwards;
}

@keyframes logo-reveal {
  to { clip-path: inset(0 0% 0 0); }
}

/* Single slow breath-out pulse */
@keyframes logo-pulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ============================================================
   CAROUSEL CONTAINER
   ============================================================ */
#carousel {
  display: flex;
  width: 100vw;
  height: var(--viewport-height);
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
#carousel::-webkit-scrollbar { display: none; }

/* ── Slides ── */
.slide {
  flex-shrink: 0;
  width: 100vw;
  height: var(--viewport-height);
  scroll-snap-align: start;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.slide__inner {
  width: 70vw;
  max-width: 560px;
  min-height: clamp(420px, 66vh, 560px);
  max-height: min(620px, calc(var(--viewport-height) - 220px));
  padding: 34px 28px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
  overflow-x: hidden;
  /* Card */
  background: var(--color-beige);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  gap: 14px;
  position: relative;
  z-index: 140;
  /* Entry animation initial state */
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.5s ease 0.05s, transform 0.5s ease 0.05s;
}

.slide__body,
.slide__footer,
.s1__copy {
  width: 100%;
}

.slide__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.slide__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  flex-shrink: 0;
}

.s1__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
}

/* ── Slide backgrounds (terracotta/amber alternating) ── */
#slide-1 { background: var(--color-terracotta); }
#slide-3 { background: var(--color-amber); }
#slide-4 { background: var(--color-terracotta); }
#slide-5 { background: var(--color-teal-dark); }
#slide-6 { background: var(--color-amber); }

/* ── Per-slide card backgrounds ── */
#slide-1 .slide__inner { background: var(--color-amber); gap: 12px; padding-bottom: 96px; }
#slide-3 .slide__inner { background: var(--color-terracotta); }
#slide-4 .slide__inner { background: var(--color-amber); }
#slide-5 .slide__inner { background: var(--color-beige); }
#slide-6 .slide__inner { background: var(--color-terracotta); }

/* ── Text overrides for terracotta cards (slides 3, 6) ── */
#slide-3 .s3__title   { color: var(--color-amber); }
#slide-3 .s3__body    { color: var(--color-beige); }
#slide-6 .s6__title   { color: var(--color-amber); }
#slide-6 .s6__subtext { color: var(--color-beige); }
#slide-6 .s6__ig-link { color: var(--color-amber); }
#slide-6 .footer-mark__tagline { color: rgba(252,240,209,0.85); }
#slide-6 .footer-mark img { filter: brightness(0) invert(1); opacity: 1; }

/* ── Text/button overrides for community (beige card) ── */
#slide-5 .s5__title { color: var(--color-teal-dark); }
#slide-5 .s5__body  { color: var(--color-teal-dark); }
#slide-5 .s5__cta   { background: var(--color-whatsapp); color: var(--color-beige); box-shadow: 0 4px 16px rgba(37,211,102,0.3); }

/* ── Event slide (amber card) — btn + scarcity ── */
#slide-4 .scarcity-bar__fill { background: var(--color-terracotta); }
#slide-4 .btn-amber { background: var(--color-terracotta); color: var(--color-beige); }
#slide-4 .btn-amber:hover { background: #a84530; }


/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.heading-hero {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.25;
  font-style: italic;
  text-transform: lowercase;
}

.heading-section {
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.2;
  text-transform: lowercase;
}

.text-subline {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.5;
}

.text-body {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
}

.text-caption {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50px;
  padding: 16px 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
  max-width: 100%;
}
.btn:focus-visible { outline: 3px solid var(--color-amber); outline-offset: 3px; }

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-beige);
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  min-width: 260px;
}
.btn-whatsapp:hover, .btn-whatsapp:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
}

.btn-whatsapp-sm { padding: 14px 28px; min-width: auto; }

.btn-whatsapp-white {
  background: var(--color-white);
  color: var(--color-beige);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-whatsapp-white:hover, .btn-whatsapp-white:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-amber {
  background: var(--color-amber);
  color: var(--color-beige);
  width: 100%;
  padding: 14px 28px;
}
.btn-amber:hover, .btn-amber:focus-visible { background: #e6a502; }

.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }
.btn-icon--stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-card {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px 24px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.btn-card.btn-whatsapp,
.btn-card.btn-whatsapp-sm {
  min-width: 0;
}

/* ============================================================
   SLIDE 1 — HERO
   ============================================================ */
.s1__logo {
  width: min(240px, 68vw);
  margin-bottom: -10px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.s1__hook {
  color: var(--color-terracotta);
  max-width: 100%;
  line-height: 1.22;
}

/* Typewriter cursor — unified for all typing elements */
.typing-active::after {
  content: '|';
  color: currentColor;
  animation: cursor-blink 0.5s step-end infinite;
  margin-left: 2px;
  font-style: normal;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.s1__statement {
  color: var(--color-beige);
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Swipe hint */
.s1__swipe-hint {
  position: absolute;
  bottom: 28px;
  right: 24px;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
}

.swipe-text {
  font-family: var(--font-secondary);
  font-style: italic;
  font-size: 0.875rem;
  color: rgba(252,240,209,0.78);
}

/* (slide 2 grid removed) */

/* ============================================================
   SLIDE 3 — WHAT WE DO
   ============================================================ */
.s3__title {
  color: var(--color-terracotta);
}

.s3__body {
  color: var(--color-beige);
  max-width: 560px;
  text-align: left;
}

#slide-4 .slide__body {
  gap: 0;
}

#slide-6 .slide__body {
  justify-content: center;
}

/* ============================================================
   SLIDE 4 — NEXT EVENT
   ============================================================ */
.event-card__icon { width: 72px; height: 72px; margin: 0 auto 2px; }
.event-card__label { color: var(--color-terracotta); text-transform: lowercase; margin-bottom: 2px; }
.event-card__title { font-family: var(--font-primary); font-weight: 900; font-size: 1.35rem; color: var(--color-beige); text-transform: lowercase; margin-bottom: 2px; }
.event-card__subtitle { font-family: var(--font-secondary); font-style: italic; font-size: 0.95rem; color: rgba(199,87,56,0.8); margin-bottom: 6px; }

.event-card__details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  text-align: left;
}
.event-card__details li { font-family: var(--font-secondary); font-size: 0.92rem; color: var(--color-beige); }

.event-card__scarcity { margin-bottom: 8px; }
.event-card__desc { margin-top: 12px; text-align: left; }
.scarcity-bar { height: 6px; background: #e8e0cc; border-radius: 3px; overflow: hidden; margin-bottom: var(--space-xs); }
.scarcity-bar__fill { height: 100%; width: 0; background: var(--color-amber); border-radius: 3px; transition: width 1s ease 0.3s; }
.scarcity-label { color: var(--color-terracotta); display: block; }

/* ============================================================
   SLIDE 5 — COMMUNITY
   ============================================================ */
.s5__title { color: var(--color-white); }
.s5__body  { color: rgba(255,255,255,0.9); max-width: 560px; }

/* ============================================================
   SLIDE 6 — INSTAGRAM FALLBACK
   ============================================================ */
.s6__title {
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--color-terracotta);
  text-transform: lowercase;
}

.s6__subtext { color: var(--color-beige); margin-bottom: var(--space-md); }

.s6__ig-link {
  font-family: var(--font-secondary);
  font-size: 1.25rem;
  color: var(--color-amber);
  display: inline-block;
  border-bottom: 2px solid var(--color-amber);
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
  cursor: pointer;
}
.s6__ig-link:hover { opacity: 0.8; }

.footer-mark { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.footer-mark img { width: 48px; height: 48px; }
.footer-mark__tagline { font-family: var(--font-secondary); font-style: italic; font-size: 0.875rem; color: rgba(199,87,56,0.5); }

/* ============================================================
   FLOATING ACTION ICONS
   ============================================================ */
.float-icon {
  position: fixed;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.float-icon__circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.float-icon__label {
  font-family: var(--font-secondary);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-beige);
  text-align: center;
  line-height: 1;
}

/* Float bob animation — each icon gets its own rotation variable */
@keyframes icon-float {
  0%, 100% { transform: translateY(0)    rotate(var(--icon-rot, 0deg)); }
  50%       { transform: translateY(-7px) rotate(var(--icon-rot, 0deg)); }
}

/* Positions + rotation variable + staggered animation */
.float-icon--phone { top: 7%;             left: 4%;  --icon-rot: -10deg; animation: icon-float 2.8s ease-in-out infinite 0s; }
.float-icon--cal   { top: 7%;             right: 4%; --icon-rot:  10deg; animation: icon-float 3.1s ease-in-out infinite 0.6s; }
.float-icon--yt    { top: calc(46% - 35px); left: 4%;  --icon-rot:   6deg; animation: icon-float 3.0s ease-in-out infinite 0.8s; }
.float-icon--email { top: calc(46% - 35px); right: 4%; --icon-rot:  -6deg; animation: icon-float 2.6s ease-in-out infinite 1.1s; }
.float-icon--wa    { bottom: 12%;         left: 4%;  --icon-rot:  -8deg; animation: icon-float 3.4s ease-in-out infinite 0.3s; }
.float-icon--ig    { bottom: 12%;         right: 4%; --icon-rot:  -5deg; animation: icon-float 2.9s ease-in-out infinite 1.4s; }

/* Hover: pause bob, straighten, scale circle */
.float-icon:hover {
  animation-play-state: paused;
  --icon-rot: 0deg;
}
.float-icon:hover .float-icon__circle {
  transform: scale(1.12);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
.float-icon:focus-visible { outline: 3px solid var(--color-amber); outline-offset: 3px; }

/* On mobile, shrink circles and pin icons flush to viewport edges */
@media (max-width: 768px) {
  .slide {
    align-items: flex-end;
    padding-top: 10px;
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  .slide__inner {
    width: calc(100vw - 132px);
    height: min(504px, calc(var(--viewport-height) - 72px - env(safe-area-inset-bottom, 0px)));
    min-height: min(504px, calc(var(--viewport-height) - 72px - env(safe-area-inset-bottom, 0px)));
    max-height: min(504px, calc(var(--viewport-height) - 72px - env(safe-area-inset-bottom, 0px)));
    padding: 30px 22px 34px;
    border-radius: 28px;
    overflow: hidden;
  }
  .slide__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .slide__body::-webkit-scrollbar { display: none; }
  .slide__footer {
    gap: 12px;
  }
  .float-icon__circle { width: 42px; height: 42px; }
  .float-icon__label { font-size: 0.55rem; }
  .float-icon--phone { left: 12px; }
  .float-icon--cal   { right: 12px; }
  .float-icon--yt    { left: 12px; }
  .float-icon--email { right: 12px; }
  .float-icon--wa    { left: 12px; }
  .float-icon--ig    { right: 12px; }
  #progress-dots {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    min-width: 122px;
    padding: 13px 20px;
  }
  #slide-1 .slide__inner {
    gap: 14px;
    padding: 28px 22px 34px;
  }
  .s1__logo {
    width: clamp(156px, 44vw, 184px);
    margin-bottom: 0;
  }
  .s1__copy {
    gap: 10px;
  }
  .heading-hero {
    font-size: clamp(1.9rem, 6.8vw, 2.2rem);
    line-height: 1.14;
  }
  .heading-section { font-size: 2rem; }
  .text-body { font-size: 1rem; }
  #slide-3 .s3__body { font-size: 0.93rem; line-height: 1.5; }
  .s1__statement {
    font-size: 1.13rem;
    line-height: 1.35;
  }
  .s1__swipe-hint {
    display: flex;
  }
  .event-card__icon { width: 62px; height: 62px; }
  .event-card__title { font-size: 1.2rem; }
  .event-card__subtitle { font-size: 0.9rem; }
  .event-card__details li { font-size: 0.85rem; }
  #slide-4 .event-card__desc { font-size: 0.85rem; line-height: 1.45; }
  .btn {
    padding: 14px 24px;
  }
  .btn-card {
    padding: 13px 18px;
    font-size: 1rem;
    gap: 10px;
  }
  .btn-card .btn-icon {
    width: 18px;
    height: 18px;
  }
}

/* ============================================================
   PROGRESS DOTS
   ============================================================ */
#progress-dots {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 12px 18px;
  background: rgba(62, 62, 62, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 120;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
  padding: 0;
  flex-shrink: 0;
}
.dot.active { width: 10px; height: 10px; background: var(--color-amber); }

/* Adapt dot color on dark slide backgrounds */
#progress-dots.on-dark .dot { background: rgba(255,255,255,0.34); }
#progress-dots.on-dark .dot.active { background: var(--color-amber); }

/* ============================================================
   DESKTOP ARROWS
   ============================================================ */
.nav-arrow {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  color: var(--color-terracotta);
  opacity: 0.4;
  transition: opacity 0.2s ease;
  padding: var(--space-md);
  z-index: 200;
}
.nav-arrow:hover { opacity: 1; }
.nav-arrow:focus-visible { outline: 3px solid var(--color-amber); }
#arrow-prev { left: 16px; }
#arrow-next { right: 16px; }
.nav-arrow.hidden { visibility: hidden; pointer-events: none; }

@media (min-width: 769px) {
  .nav-arrow { display: block; }
  .nav-arrow.on-dark { color: var(--color-white); }
}

/* ============================================================
   SLIDE ENTRY ANIMATIONS
   All keyed to .slide--active on the parent slide
   ============================================================ */

/* Card entry — active state (anim-card overrides this for slide-4 via specificity+order) */
.slide--active .slide__inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Default hidden states */
.slide .anim-title {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.slide .anim-body {
  opacity: 0;
  transition: opacity 0.5s ease 0.15s;
}
.slide .anim-cta {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.slide .anim-image {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}
.slide .anim-card {
  opacity: 0;
  transform: rotate(-2deg) translateY(40px);
  transition: opacity 0.7s ease 0.1s, transform 0.7s ease 0.1s;
}
.slide .anim-label {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Active: reveal everything except anim-cta (that waits for .revealed) */
.slide--active .anim-title  { opacity: 1; transform: translateX(0); }
.slide--active .anim-body   { opacity: 1; }
.slide--active .anim-image  { opacity: 1; transform: scale(1); }
.slide--active .anim-card   { opacity: 1; transform: rotate(0deg) translateY(0); }
.slide--active .anim-label  { opacity: 1; }

/* Button revealed at 80% typing mark */
.anim-cta.revealed { opacity: 1; }

/* ============================================================
   RESPONSIVE — Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .heading-hero    { font-size: 2.5rem; }
  .heading-section { font-size: 2.5rem; }
  .text-subline    { font-size: 1.5rem; }
  .text-body       { font-size: 1.125rem; }
  .btn             { font-size: 1.125rem; }
  .s1__logo        { height: 160px; width: auto; margin-bottom: -12px; }
  .event-card__icon { width: 104px; height: 104px; }
  .slide__inner    { width: 560px; min-height: clamp(520px, 72vh, 680px); max-height: min(680px, calc(var(--viewport-height) - 230px)); }
  #slide-1 .slide__inner { padding-bottom: 104px; }
  .s1__swipe-hint { bottom: 28px; right: 28px; }
}
