/* ============================================================
   FacTuSesión Landing Page — styles.css
   Brand: Google Material Design palette
   ============================================================ */

/* --- Custom properties ------------------------------------ */
:root {
  --color-primary: #4285F4;
  --color-primary-dark: #3367D6;
  --color-success: #34A853;
  --color-warning: #FBBC04;
  --color-text: #1a1a2e;
  --color-text-secondary: #5f6368;
  --color-text-muted: #9e9e9e;
  --color-bg-light: #f6f9ff;
  --color-bg-lighter: #fafbfc;
  --color-bg-white: #ffffff;
  --color-border: #e8ecf0;
  --color-border-light: #f0f0f0;
  --shadow-card: 0 1px 8px rgba(0, 0, 0, 0.05);
  --shadow-float: 0 20px 60px rgba(0, 0, 0, 0.10), 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-btn: 0 4px 14px rgba(66, 133, 244, 0.3);
  --shadow-btn-green: 0 4px 14px rgba(52, 168, 83, 0.3);
  --shadow-video: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-base: 0.3s ease;
  --transition-reveal: 0.6s ease;
}

/* --- Reset ------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Animations ------------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Scroll-triggered reveal ------------------------------ */
/* Default: visible (no-JS fallback — content always readable) */
.reveal {
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

/* JS adds this class to opt elements into the hidden-until-revealed state */
.reveal.will-animate {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.will-animate-left {
  opacity: 0;
  transform: translateX(-20px);
}

.reveal.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* --- Navigation ------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base),
              backdrop-filter var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: #e0e0e0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  height: 36px;
  display: block;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 400;
  color: #5f6368;
  font-family: 'Google Sans', 'Inter', -apple-system, sans-serif;
}

.nav-logo-highlight {
  color: #34a853;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-link:hover {
  color: var(--color-primary);
}

.btn-nav {
  text-decoration: none;
  color: white;
  font-weight: 600;
  background: var(--color-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.btn-nav:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-btn);
}

/* --- Hero ------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 60px;
  background: linear-gradient(170deg, #f6f9ff 0%, #edf3ff 50%, #fff 100%);
}

.hero-inner {
  max-width: 1060px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-copy {
  flex: 1 1 440px;
  max-width: 520px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 18px;
  color: var(--color-text);
}

.hero-title-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  text-decoration: none;
  color: white;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  box-shadow: var(--shadow-btn);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: inline-block;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  border: 2px solid var(--color-primary);
  transition: background var(--transition-base), color var(--transition-base);
  display: inline-block;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.hero-trust {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.hero-visual {
  flex: 1 1 340px;
  display: flex;
  justify-content: center;
}

/* --- App mock (FacTuSesion "Citas" view) ------------------- */
.cal-mock {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 370px;
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.cal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.cal-date {
  font-weight: 600;
  font-size: 14px;
  color: #202124;
}

/* Base event row */
.cal-event {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  border-left: 3px solid transparent;
}

/* Status-based event row variants */
.cal-event--cobrada {
  background: rgba(24, 128, 56, 0.04);
  border-left-color: #188038;
}

.cal-event--facturada {
  background: rgba(52, 168, 83, 0.04);
  border-left-color: #34A853;
}

.cal-event--facturable {
  background: rgba(26, 115, 232, 0.04);
  border-left-color: #1a73e8;
}

.cal-event--off {
  background: #fafafa;
  border-left-color: #E0E0E0;
}

.cal-event-time {
  font-size: 11px;
  color: #9e9e9e;
  min-width: 34px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  line-height: 1;
}

/* Block holding client name + service name */
.cal-event-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cal-event-name {
  font-size: 12px;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-name--off {
  color: #bbb;
  font-weight: 400;
}

/* Second line: service description */
.cal-event-service {
  font-size: 10px;
  color: #9e9e9e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Session price */
.cal-event-amount {
  font-size: 11px;
  font-weight: 600;
  color: #5f6368;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Status chip */
.cal-event-label {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-event-label--cobrada {
  color: #188038;
  background: rgba(24, 128, 56, 0.10);
}

.cal-event-label--facturada {
  color: #137333;
  background: rgba(52, 168, 83, 0.10);
}

.cal-event-label--facturable {
  color: #1a73e8;
  background: rgba(26, 115, 232, 0.10);
}

.cal-footer {
  margin-top: 10px;
  padding: 8px 10px;
  background: #f0f7f0;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cal-footer-label {
  font-size: 11px;
  color: var(--color-success);
  font-weight: 500;
}

.cal-footer-amount {
  font-size: 14px;
  color: var(--color-success);
  font-weight: 700;
}

/* --- Section base ----------------------------------------- */
.section {
  padding: 72px 24px;
}

.section--light {
  background: var(--color-bg-lighter);
}

.section--blue-light {
  background: var(--color-bg-light);
}

.section--white {
  background: var(--color-bg-white);
}

.section--dark {
  background: linear-gradient(135deg, #1a2744 0%, #1e3a5f 100%);
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section-inner--tight {
  max-width: 640px;
  margin: 0 auto;
}

.section-inner--video {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: 0 0 36px;
}

/* --- Problema --------------------------------------------- */
.problema-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  text-align: left;
  font-size: 16px;
  color: #444;
  line-height: 1.8;
}

.problema-card p {
  margin: 0 0 14px;
}

.problema-card p:last-child {
  margin: 0;
}

.problema-highlight {
  color: var(--color-primary);
  font-weight: 600;
}

/* --- Video ------------------------------------------------ */
.video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-video);
  background: linear-gradient(135deg, #1a1a2e, #2a2a4a);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  gap: 12px;
  pointer-events: none;
}

.video-play-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.4);
  flex-shrink: 0;
}

/* --- Steps (Cómo funciona) -------------------------------- */
.steps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.step {
  flex: 1 1 220px;
  text-align: center;
  padding: 24px;
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.06), rgba(66, 133, 244, 0.13));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 26px;
  color: var(--color-primary);
}

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}

.step-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* --- App screenshots -------------------------------------- */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.screenshot-card {
  background: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.screenshot-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.screenshot-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--color-text);
}

.screenshot-card-desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
  line-height: 1.6;
}

/* TODO: Replace src with actual app screenshots */
.screenshot-img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: block;
  background: #e8ecf0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.screenshot-placeholder-note {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 20px;
}

/* --- Roadmap ---------------------------------------------- */
.roadmap-group-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin: 32px 0 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.roadmap-group-title:first-of-type {
  margin-top: 16px;
}

.roadmap-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.roadmap-item:last-child {
  border-bottom: none;
}

.roadmap-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.roadmap-icon--live {
  background: rgba(52, 168, 83, 0.08);
  color: var(--color-success);
}

.roadmap-icon--soon {
  background: rgba(66, 133, 244, 0.08);
  color: var(--color-primary);
}

.roadmap-icon--dev {
  background: rgba(66, 133, 244, 0.06);
  color: var(--color-text-muted);
}

.roadmap-body {
  flex: 1;
}

.roadmap-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.roadmap-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.roadmap-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.roadmap-status--live {
  background: #e8f5e9;
  color: #2e7d32;
}

.roadmap-status--soon {
  background: #e3f2fd;
  color: #1565c0;
}

.roadmap-status--dev {
  background: #f5f5f5;
  color: #757575;
}

.roadmap-desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* --- Para quién ------------------------------------------- */
.who-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 24px;
  text-align: left;
}

.who-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  background: var(--color-bg-light);
  border-radius: 10px;
  font-size: 14px;
  color: #333;
}

.who-item-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.who-note {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 20px;
}

/* --- Security / RGPD -------------------------------------- */
.section--security {
  background: #f5f6f7;
}

.security-block {
  text-align: center;
  padding: 8px 0;
}

.security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #ebebec;
  border-radius: 50%;
  margin-bottom: 12px;
}

.security-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
}

.security-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.security-list li {
  font-size: 13px;
  color: var(--color-text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}

.security-list li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--color-text-muted);
}

/* --- CTA / Acceso ----------------------------------------- */
.cta-section {
  padding: 80px 24px;
}

.cta-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.badge--dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 168, 83, 0.15);
  color: #6fcf87;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.cta-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  color: white;
  margin: 0 0 12px;
}

.cta-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.cta-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-input {
  flex: 1 1 220px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 15px;
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-base);
}

.cta-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.cta-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.cta-input.error {
  border-color: #ef5350;
}

.btn-cta {
  padding: 14px 26px;
  border-radius: 10px;
  border: none;
  background: var(--color-success);
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: var(--font-family);
  box-shadow: var(--shadow-btn-green);
  transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
  white-space: nowrap;
}

.btn-cta:hover {
  background: #2e9948;
  box-shadow: 0 6px 20px rgba(52, 168, 83, 0.45);
  transform: translateY(-1px);
}

.cta-success {
  background: rgba(52, 168, 83, 0.12);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  max-width: 420px;
  margin: 0 auto;
  display: none;
}

.cta-success.visible {
  display: block;
}

.cta-success-title {
  color: #6fcf87;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 6px;
}

.cta-success-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin: 0;
}

.cta-trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.cta-trust-item {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 5px;
}

.cta-privacy {
  margin-top: 20px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  text-align: center;
}

/* --- Footer ----------------------------------------------- */
.footer {
  padding: 32px 24px;
  background: #111827;
  text-align: center;
}

.footer-logo img {
  height: 28px;
  display: block;
  margin: 0 auto;
  opacity: 0.9;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.footer-link {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* --- SVG check icon --------------------------------------- */
.icon-check {
  display: inline-block;
  flex-shrink: 0;
}

/* --- Legal pages ------------------------------------------ */
.legal-page {
  padding-top: 80px;
  min-height: 100vh;
  background: var(--color-bg-lighter);
}

/* --- 404 page --------------------------------------------- */
.not-found {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  background: linear-gradient(170deg, #f6f9ff 0%, #edf3ff 50%, #fff 100%);
}

.not-found-inner {
  max-width: 560px;
  text-align: center;
}

.not-found-code {
  font-size: clamp(72px, 14vw, 140px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #4285F4, #34A853);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.not-found-title {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 14px;
}

.not-found-desc {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 32px;
}

.not-found-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-content h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--color-text);
}

.legal-last-updated {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 40px;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--color-text);
}

.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

.legal-content ul {
  padding-left: 20px;
}

.legal-placeholder {
  background: #fff8e1;
  border-left: 4px solid var(--color-warning);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 13px;
  color: #5d4037;
  margin: 0 0 16px;
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 767px) {
  /* Nav: hide text links, keep CTA button */
  .nav-link--hide-mobile {
    display: none;
  }

  .nav {
    padding: 10px 16px;
  }

  /* Hero stacks vertically on mobile */
  .hero {
    padding: 90px 16px 48px;
  }

  .hero-inner {
    gap: 32px;
  }

  .hero-title {
    font-size: clamp(26px, 7vw, 34px);
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-outline {
    text-align: center;
    width: 100%;
    padding: 14px 20px;
  }

  /* Sections */
  .section {
    padding: 52px 16px;
  }

  .cta-section {
    padding: 56px 16px;
  }

  .section-title {
    font-size: 22px;
  }

  /* Calendar mock: smaller on very narrow screens */
  .cal-mock {
    max-width: 100%;
  }

  /* Steps */
  .step {
    flex: 1 1 100%;
    padding: 16px 8px;
  }

  /* Screenshots */
  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  /* Problema card */
  .problema-card {
    padding: 20px 18px;
    font-size: 15px;
  }

  /* CTA form stacks */
  .cta-form {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-input {
    flex: none;
  }

  /* Footer links wrap */
  .footer-links {
    gap: 12px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet: slightly smaller hero text */
  .hero-title {
    font-size: clamp(28px, 4vw, 38px);
  }

  .steps-grid {
    gap: 16px;
  }

  .step {
    flex: 1 1 180px;
  }
}

/* ============================================================
   STORYBOARD CAROUSEL
   ============================================================ */

/* Section wrapper */
.storyboard {
  background: var(--color-bg-white);
}

.storyboard__inner {
  max-width: 1060px;
  margin: 0 auto;
}

/* Player: sidebar + stage side by side on desktop */
.storyboard__player {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* ---- Sidebar (desktop) ------------------------------------ */
.storyboard__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Scroll within sidebar if viewport is short */
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
}

.storyboard__steps::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.storyboard__step-item {
  margin: 0;
  padding: 0;
}

/* Each step button */
.storyboard__step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 9px 10px 9px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-family);
  text-align: left;
  transition: background var(--transition-base), color var(--transition-base);
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.storyboard__step:hover {
  background: var(--color-bg-light);
}

.storyboard__step:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.storyboard__step.is-active {
  background: rgba(66, 133, 244, 0.06);
  border-left-color: var(--color-primary);
}

.storyboard__step-num {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 22px;
  padding-top: 1px;
  letter-spacing: 0.04em;
  transition: color var(--transition-base);
}

.storyboard__step.is-active .storyboard__step-num {
  color: var(--color-primary);
}

.storyboard__step-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-base), font-weight var(--transition-base);
}

.storyboard__step.is-active .storyboard__step-text {
  color: var(--color-primary);
  font-weight: 600;
}

/* ---- Stage (browser frame + controls) -------------------- */
.storyboard__stage {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- Browser chrome frame -------------------------------- */
.storyboard__frame {
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  background: #f1f3f4;
}

.storyboard__chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: #e8eaed;
  border-bottom: 1px solid #dadce0;
}

.storyboard__chrome-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.storyboard__chrome-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
}

.storyboard__chrome-dot--red    { background: #FF5F57; }
.storyboard__chrome-dot--yellow { background: #FEBC2E; }
.storyboard__chrome-dot--green  { background: #28C840; }

.storyboard__url {
  flex: 1;
  font-size: 11px;
  color: #5f6368;
  background: white;
  border-radius: 20px;
  padding: 3px 12px;
  max-width: 260px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #dadce0;
}

/* ---- Slides container ------------------------------------ */
.storyboard__slides {
  position: relative;
  background: #f5f7fa;
  /* Fixed aspect ratio so the frame height is stable */
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

/* Each slide wrapper — stacked, crossfade via opacity */
.storyboard__slide-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  pointer-events: none;
}

.storyboard__slide-wrap.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Actual screenshot image */
.storyboard__slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ---- Placeholder: shown when image fails to load --------- */
/* The onerror handler adds .is-placeholder to the wrap */
.storyboard__slide-wrap.is-placeholder .storyboard__slide-img {
  display: none;
}

.storyboard__placeholder-content {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: absolute;
  inset: 0;
}

.storyboard__slide-wrap.is-placeholder .storyboard__placeholder-content {
  display: flex;
}

.storyboard__placeholder-num {
  font-size: 40px;
  font-weight: 800;
  color: rgba(66, 133, 244, 0.18);
  line-height: 1;
  letter-spacing: -0.02em;
}

.storyboard__placeholder-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

/* ---- Progress bar ---------------------------------------- */
.storyboard__progress {
  height: 3px;
  background: var(--color-border-light);
  overflow: hidden;
}

.storyboard__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-primary);
  transition: width linear;
  transform-origin: left center;
}

/* ---- Mobile caption below frame -------------------------- */
.storyboard__caption {
  display: none; /* hidden on desktop — sidebar handles it */
  align-items: center;
  gap: 8px;
  padding: 10px 4px 2px;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.storyboard__caption-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(66, 133, 244, 0.08);
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

.storyboard__caption-text {
  font-weight: 500;
  line-height: 1.4;
}

/* ---- Controls -------------------------------------------- */
.storyboard__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.storyboard__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base), border-color var(--transition-base),
              color var(--transition-base), box-shadow var(--transition-base);
  font-family: var(--font-family);
  padding: 0;
}

.storyboard__btn:hover {
  background: var(--color-bg-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.storyboard__btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Play/pause button: slightly larger */
.storyboard__btn--play {
  width: 40px;
  height: 40px;
  font-size: 14px;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.storyboard__btn--play:hover {
  background: var(--color-primary);
  color: white;
}

/* Show/hide play vs pause icons based on state class on the section */
.storyboard__pause-icon { display: none; }
.storyboard__play-icon  { display: inline; }

.storyboard.is-playing .storyboard__pause-icon { display: inline; }
.storyboard.is-playing .storyboard__play-icon  { display: none; }

/* ---- Mobile dots navigation ------------------------------ */
.storyboard__dots {
  display: none; /* hidden on desktop */
  justify-content: center;
  gap: 6px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}

.storyboard__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-base), transform var(--transition-base);
}

.storyboard__dot:hover {
  background: var(--color-text-muted);
}

.storyboard__dot:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.storyboard__dot.is-active {
  background: var(--color-primary);
  transform: scale(1.25);
}

/* ============================================================
   STORYBOARD — Responsive
   ============================================================ */

/* Tablet: narrow sidebar */
@media (min-width: 768px) and (max-width: 959px) {
  .storyboard__steps {
    flex: 0 0 170px;
  }

  .storyboard__step-text {
    font-size: 12px;
  }
}

/* Mobile: hide sidebar, show dots + caption */
@media (max-width: 767px) {
  .storyboard__player {
    flex-direction: column;
    gap: 0;
  }

  /* Hide the sidebar entirely on mobile */
  .storyboard__steps {
    display: none;
  }

  /* Show caption and dots on mobile */
  .storyboard__caption {
    display: flex;
  }

  .storyboard__dots {
    display: flex;
  }

  /* Make frame fill full width */
  .storyboard__stage {
    width: 100%;
  }
}
