/* =====================================================
   ÁLVARO ROIG CAMPAIGN WEBSITE - STYLE.CSS
   Apple-style minimalist design
   ===================================================== */

/* =====================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ===================================================== */
:root {
  /* Colors */
  --primary-blue: #210e56;
  --blue-dark: #210e56;
  --white: #FFFFFF;
  --text-dark: #1d1d1f;
  --text-gray: #6e6e73;
  --light-gray: #f2f0f7;
  --light-blue: #210e56;
  --border-light: #d2d2d7;
  
  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Spacing */
  --section-padding-desktop: 40px;
  --section-padding-mobile: 40px;
  --section-gap-desktop: 56px;
  --section-gap-mobile: 36px;
  --subtitle-max-width: 760px;
  --container-max-width: 1400px;
  
  /* Transitions */
  --easing-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* =====================================================
   CSS RESET & BASE STYLES
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Keep the achievements loop running even with reduced-motion enabled */
  .achievements-track {
    animation: achievements-loop 54s linear infinite !important;
  }
}

body {
  font-family: var(--font-family);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-blue);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10002;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 3px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(33, 14, 86, 0.06);
  z-index: 10001;
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #210e56 0%, #210e56 55%, #210e56 100%);
  box-shadow: 0 0 10px rgba(33, 14, 86, 0.3);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

[data-parallax-speed] {
  will-change: transform;
}

.section-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  margin-bottom: 25px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

#about-title {
  color: var(--primary-blue);
}

#achievements-title {
  color: var(--primary-blue);
}

.section-eyebrow {
  display: flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(33, 14, 86, 0.28);
  background: rgba(33, 14, 86, 0.08);
  color: #210e56;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-subtitle {
  font-size: clamp(16px, 2.4vw, 19px);
  color: var(--text-gray);
  text-align: center;
  max-width: var(--subtitle-max-width);
  margin: 0 auto 56px;
  line-height: 1.58;
}

.cta-center {
  text-align: center;
  margin-top: 48px;
}

.resource-note {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-gray);
}

.about-section,
.achievements-section,
.story-section,
.proposals-section,
.methodology-section,
.contact-section {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 768px) {
  .about-section,
  .achievements-section,
  .story-section,
  .proposals-section,
  .methodology-section,
  .contact-section {
    padding: var(--section-padding-desktop) 0;
  }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
  display: inline-block;
  background: var(--primary-blue);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 16px rgba(33, 14, 86, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), 
              background-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-primary:hover {
  transform: scale(1.05);
  background-color: var(--blue-dark);
  box-shadow: 0 6px 24px rgba(33, 14, 86, 0.4);
}

.btn-primary:active {
  transform: scale(1);
}

.btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  pointer-events: none;
  cursor: not-allowed;
}

#hero-proposals-button {
  border: 2px solid #FFFFFF;
}

.btn-primary-inverted {
  display: inline-block;
  background: var(--white);
  color: var(--primary-blue);
  padding: 18px 48px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  transition: transform var(--transition-fast), 
              box-shadow var(--transition-fast);
}

.btn-primary-inverted:hover {
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0) scale(1.04);
  box-shadow: 0 6px 28px rgba(255, 255, 255, 0.4);
}

.btn-primary::after,
.btn-primary-inverted::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -70%;
  width: 60%;
  height: 200%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
  transform: translateX(0);
  opacity: 0;
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-primary-inverted:hover::after {
  animation: shine 0.9s ease;
  opacity: 1;
}

.btn-primary-inverted[aria-disabled="true"] {
  opacity: 0.6;
  box-shadow: none;
  transform: translate3d(0, 0, 0);
  cursor: not-allowed;
  pointer-events: none;
}

.btn-secondary-inverted {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0);
  transition: background-color var(--transition-fast), 
              border-width var(--transition-fast),
              transform var(--transition-fast);
}

.btn-secondary-inverted:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translate3d(var(--magnetic-x), var(--magnetic-y), 0) scale(1.02);
}

.magnetic-btn {
  will-change: transform;
}

.vote-pulse {
  animation: vote-pulse 6s var(--easing-emphasis) infinite;
}

.vote-pulse:hover {
  animation: none;
}

/* =====================================================
   SECTION 1: HERO
   ===================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  background: #210e56;
  padding: 40px 24px;
  overflow: hidden;
  isolation: isolate;
}

.hero-cinematic {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-main-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
  animation: hero-pan 26s ease-in-out infinite alternate;
}

.hero-main-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 45% at 50% 14%, rgba(33, 14, 86, 0.2) 0%, rgba(33, 14, 86, 0) 72%),
    linear-gradient(180deg, rgba(33, 14, 86, 0.32) 0%, rgba(33, 14, 86, 0.18) 40%, rgba(33, 14, 86, 0.42) 100%);
}

.hero-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  height: 50px;
  width: auto;
  z-index: 2;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}

.hero-content {
  width: min(1200px, 100%);
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-copy {
  width: min(760px, 100%);
  text-align: center;
  margin: 0 auto;
}

.hero-copy > * {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(18px);
  transition: opacity 0.8s var(--easing-emphasis), transform 0.8s var(--easing-emphasis), filter 0.8s var(--easing-emphasis);
}

.hero-copy > *:nth-child(1) { transition-delay: 0.05s; }
.hero-copy > *:nth-child(2) { transition-delay: 0.14s; }
.hero-copy > *:nth-child(3) { transition-delay: 0.22s; }
.hero-copy > *:nth-child(4) { transition-delay: 0.3s; }
.hero-copy > *:nth-child(5) { transition-delay: 0.38s; }

body.loaded .hero-copy > * {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-headline {
  font-size: clamp(44px, 8vw, 64px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 8px 28px rgba(2, 10, 20, 0.45);
}

.hero-subtitle {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
}

.hero-slogan {
  font-size: clamp(17px, 2.5vw, 22px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin-bottom: 14px;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: rgba(255, 255, 255, 0.74);
  opacity: 0.5;
  animation: bounce 2.2s infinite;
  z-index: 2;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes hero-pan {
  0% { transform: scale(1.02) translate3d(-1%, -1%, 0); }
  100% { transform: scale(1.08) translate3d(1.2%, 1.2%, 0); }
}

/* Desktop hero */
@media (min-width: 768px) {
  .hero-content {
    align-items: center;
    justify-content: center;
  }
}

/* =====================================================
   SECTION 2: ABOUT
   ===================================================== */
.about-section {
  background: var(--white);
  padding: 40px 0;
}

.about-grid {
  display: grid;
  gap: var(--section-gap-mobile);
}

.about-image-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about-content p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.about-content strong,
.about-content b {
  font-weight: 600;
  color: var(--primary-blue);
}

.experience-list {
  margin-top: 24px;
}

.experience-list li {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dark);
  padding-left: 28px;
  position: relative;
  margin-bottom: 12px;
}

.experience-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 700;
}

/* Desktop about */
@media (min-width: 768px) {
  .about-section {
    padding: 40px 0;
  }

  .about-grid {
    grid-template-columns: 40% 1fr;
    align-items: stretch;
    gap: var(--section-gap-desktop);
  }

  .about-image-container {
    height: 100%;
  }

  .about-image {
    height: 100%;
    aspect-ratio: auto;
    object-position: 98% center;
    transform: scale(1.1);
    transform-origin: right center;
  }
}

/* =====================================================
   SECTION 3: ACHIEVEMENTS
   ===================================================== */
.achievements-section {
  background: var(--light-gray);
  padding: 40px 0;
}

.achievements-section .section-subtitle {
  margin-bottom: 40px;
}

.achievements-marquee {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.achievements-track {
  --achievements-loop-width: 0px;
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: max-content;
  animation: achievements-loop 54s linear infinite;
  will-change: transform;
}

.achievement-card {
  flex: 0 0 clamp(250px, 72vw, 330px);
  background: var(--white);
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  position: relative;
}

.achievement-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.counter-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary-blue);
  font-variant-numeric: tabular-nums;
  display: inline;
}

.counter-prefix {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-right: 4px;
  display: inline;
}

.achievement-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 8px 0;
}

.achievement-detail {
  font-size: 16px;
  color: var(--text-gray);
  line-height: 1.5;
}

/* Desktop achievements */
@media (min-width: 768px) {
  .achievements-section {
    padding: 40px 0;
  }

  .achievement-card {
    flex-basis: clamp(260px, 30vw, 340px);
  }
}

/* =====================================================
   SECTION 4: STORYTELLING
   ===================================================== */
.story-section {
  background: linear-gradient(180deg, #ffffff 0%, rgba(33, 14, 86, 0.05) 100%);
}

.story-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.story-row {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

.story-row-top,
.story-row-bottom {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-row-middle {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.6fr) minmax(0, 1fr);
}

.story-center-subtitle {
  margin-bottom: 0;
}

.story-title {
  line-height: 1.06;
}

.story-title-emphasis {
  display: inline-block;
  font-size: 1.32em;
  font-weight: 800;
}

.story-center {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(33, 14, 86, 0.2);
  border-radius: 22px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.story-card {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(33, 14, 86, 0.25);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(33, 14, 86, 0.12);
  transition: transform 0.35s var(--easing-emphasis), box-shadow 0.35s var(--easing-emphasis);
}

.story-card-inner {
  height: 100%;
}

.story-face {
  background: #ffffff;
}

.story-back {
  display: none;
}

.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(33, 14, 86, 0.17);
}

.story-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.story-card-body {
  padding: 14px 14px 16px;
}

.story-card h3 {
  font-size: 19px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--primary-blue);
}

.story-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dark);
}

@media (max-width: 1100px) {
  .story-row-top,
  .story-row-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-row-middle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-row-middle .story-center {
    grid-column: 1 / -1;
    order: -1;
  }
}

@media (max-width: 767px) {
  .story-layout {
    gap: 12px;
  }

  .story-row {
    gap: 12px;
  }

  .story-card {
    max-width: none;
    margin: 0;
    height: 208px;
    border: none;
    box-shadow: none;
    background: transparent;
    perspective: 1000px;
  }

  .story-card:hover {
    transform: none;
    box-shadow: none;
  }

  .story-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    -webkit-transition: -webkit-transform 0.78s var(--easing-emphasis);
    transition: transform 0.78s var(--easing-emphasis);
  }

  .story-card.is-flipped .story-card-inner {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
  }

  .story-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: 1px solid rgba(33, 14, 86, 0.25);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(33, 14, 86, 0.13);
  }

  .story-front img {
    height: 136px;
    flex: 0 0 136px;
  }

  .story-front .story-card-body {
    padding: 10px 12px;
  }

  .story-front .story-card-body p {
    display: none;
  }

  .story-front .story-card-body h3 {
    margin-bottom: 0;
    font-size: 15px;
    line-height: 1.25;
  }

  .story-back {
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 14px 12px;
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    background: linear-gradient(150deg, #210e56 0%, #3c257f 100%);
    color: #ffffff;
  }

  .story-back-title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.2;
    color: #ffffff;
  }

  .story-back p {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.96);
  }

  .story-card img {
    height: 136px;
  }

  .story-card h3 {
    font-size: 16px;
  }

  .story-card p {
    font-size: 13px;
    line-height: 1.4;
  }

  .story-center {
    padding: 20px 16px;
  }

  .story-center .section-title {
    font-size: clamp(24px, 7vw, 30px);
    margin-bottom: 14px;
  }

  .story-center .section-subtitle {
    font-size: 15px;
    line-height: 1.45;
  }
}

/* =====================================================
   SECTION 5: PROPOSALS
   ===================================================== */
.proposals-section {
  background: var(--white);
}

.proposals-grid {
  display: grid;
  gap: 24px;
}

.proposal-category {
  background: var(--white);
  border: 2px solid var(--border-light);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color var(--transition-medium),
              transform var(--transition-medium),
              box-shadow var(--transition-medium);
}

.proposal-cover {
  width: 100%;
  min-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 16px;
}

.proposal-category:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 16px 34px rgba(33, 14, 86, 0.16);
}

.proposal-category::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(33, 14, 86, 0.12) 50%, transparent 80%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.8s var(--easing-emphasis), opacity 0.8s var(--easing-emphasis);
}

.proposal-category:hover::after {
  transform: translateX(120%);
  opacity: 1;
}

.proposal-category h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  transition: transform 0.45s var(--easing-emphasis);
}

.proposal-category h3::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #210e56 0%, #210e56 65%, #210e56 100%);
  box-shadow: 0 0 0 0 rgba(33, 14, 86, 0.25);
  animation: proposal-halo 4.2s ease-in-out infinite;
}

.proposal-category:hover h3::before {
  box-shadow: 0 0 0 6px rgba(33, 14, 86, 0.08);
}

.proposal-summary {
  font-size: 17px;
  line-height: 1.6;
  color: #210e56;
  margin-bottom: 14px;
}

.proposal-details {
  position: relative;
  z-index: 1;
}

.proposal-details summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #210e56;
  background: rgba(33, 14, 86, 0.08);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.proposal-details summary::-webkit-details-marker {
  display: none;
}

.proposal-details summary::after {
  content: "+";
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.proposal-details[open] summary {
  margin-bottom: 14px;
  background: #210e56;
  border-color: #210e56;
  color: #ffffff;
}

.proposal-details[open] summary::after {
  content: "−";
}

.proposal-category ul {
  padding-left: 0;
}

.proposal-category li {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 16px;
  padding-left: 24px;
  position: relative;
  z-index: 1;
  transition: transform 0.45s var(--easing-emphasis);
}

.proposal-category li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 600;
}

.proposal-category li strong {
  font-weight: 600;
  color: var(--text-dark);
}

/* Featured proposal card */
.proposal-featured {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 48px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--easing-emphasis), box-shadow 0.55s var(--easing-emphasis);
}

.proposal-featured::after {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 48%;
  height: 180%;
  transform: rotate(18deg) translateX(-130%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.26) 45%, transparent 100%);
  transition: transform 0.9s var(--easing-emphasis);
}

.proposal-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(33, 14, 86, 0.35);
}

.proposal-featured:hover::after {
  transform: rotate(18deg) translateX(330%);
}

.proposal-featured-icon {
  font-size: 64px;
  position: relative;
  z-index: 1;
  transition: transform 0.45s var(--easing-emphasis);
}

.proposal-featured h3 {
  font-size: 32px;
  font-weight: 700;
  margin: 20px 0;
  position: relative;
  z-index: 1;
  transition: transform 0.45s var(--easing-emphasis);
}

.proposal-featured p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.95;
  position: relative;
  z-index: 1;
  transition: transform 0.45s var(--easing-emphasis);
}

.proposal-category.tilt-active h3 {
  transform: translateZ(28px);
}

.proposal-category.tilt-active li {
  transform: translateZ(16px);
}

.proposal-featured.tilt-active .proposal-featured-icon {
  transform: translateZ(28px);
}

.proposal-featured.tilt-active h3 {
  transform: translateZ(22px);
}

.proposal-featured.tilt-active p {
  transform: translateZ(15px);
}

.proposal-expansion {
  margin-top: 50px;
}

.proposal-expansion-title {
  text-align: center;
  font-size: clamp(24px, 3.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.4px;
  margin-bottom: 26px;
  color: #210e56;
}

.proposal-expansion-grid {
  display: grid;
  gap: 18px;
}

.extension-card {
  background: #ffffff;
  border: 1px solid #210e56;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(33, 14, 86, 0.06);
}

.extension-cover {
  width: 100%;
  min-height: 165px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
}

.extension-card h4 {
  font-size: 20px;
  color: #210e56;
  margin-bottom: 10px;
}

.extension-summary {
  font-size: 16px;
  line-height: 1.55;
  color: #210e56;
  margin-bottom: 12px;
}

.extension-details summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #210e56;
  background: rgba(33, 14, 86, 0.08);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.extension-details summary::-webkit-details-marker {
  display: none;
}

.extension-details summary::after {
  content: "+";
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.extension-details[open] summary {
  margin-bottom: 14px;
  background: #210e56;
  border-color: #210e56;
  color: #ffffff;
}

.extension-details[open] summary::after {
  content: "−";
}

.extension-details ul {
  display: grid;
  gap: 10px;
}

.extension-card li {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dark);
  padding-left: 20px;
  position: relative;
}

.extension-card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 700;
}

/* Desktop proposals */
@media (min-width: 768px) {
  .proposals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .proposal-featured {
    grid-column: 1 / -1;
  }

  .proposal-expansion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1140px) {
  .proposal-expansion-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .proposal-expansion-grid .extension-card:nth-child(5) {
    grid-column: 2 / span 1;
  }
}

/* Proposals carousel redesign */
.proposals-carousel-section {
  background: linear-gradient(180deg, rgba(33, 14, 86, 0.03) 0%, #ffffff 20%, #ffffff 100%);
}

.proposal-carousel {
  position: relative;
  margin-top: 24px;
  --proposal-small-height: 206px;
  --proposal-active-height: 440px;
}

.proposal-carousel-viewport {
  overflow: hidden;
  padding: 12px 58px 16px;
}

.proposal-carousel-track {
  display: flex;
  align-items: stretch;
  gap: 18px;
  transition: transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.proposal-carousel-card {
  flex: 0 0 clamp(220px, 25vw, 310px);
  min-height: 0;
  height: var(--proposal-small-height);
  border-radius: 24px;
  border: 1px solid rgba(33, 14, 86, 0.22);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(33, 14, 86, 0.1);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: center;
  cursor: pointer;
  opacity: 0.18;
  transform: scale(0.78);
  pointer-events: none;
  transition:
    flex-basis 0.56s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.56s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.44s ease,
    box-shadow 0.44s ease,
    border-color 0.44s ease;
}

.proposal-carousel-card h3 {
  margin: 0;
  width: 100%;
  text-align: center;
  color: var(--primary-blue);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.proposal-carousel-card.is-left,
.proposal-carousel-card.is-right {
  opacity: 0.78;
  transform: scale(0.84) translateY(1px);
  pointer-events: auto;
}

.proposal-lead {
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height 0.42s ease, opacity 0.32s ease, transform 0.38s ease;
}

.proposal-list {
  margin: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  transition: max-height 0.46s ease, opacity 0.34s ease, transform 0.4s ease;
  padding-left: 0;
}

.proposal-carousel-card.is-active {
  flex-basis: clamp(430px, 55vw, 640px);
  min-height: 0;
  height: var(--proposal-active-height);
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  border-color: rgba(33, 14, 86, 0.45);
  box-shadow: 0 24px 46px rgba(33, 14, 86, 0.2);
}

.proposal-carousel-card.is-active h3 {
  font-size: clamp(30px, 3.6vw, 42px);
  margin-bottom: 14px;
  text-align: center;
}

.proposal-carousel-card.is-active .proposal-lead {
  max-height: 150px;
  opacity: 1;
  transform: translateY(0);
  font-size: 18px;
  line-height: 1.55;
  color: #2b2250;
  margin-bottom: 14px;
  text-align: center;
}

.proposal-carousel-card.is-active .proposal-list {
  max-height: calc(var(--proposal-active-height) - 196px);
  opacity: 1;
  transform: translateY(0);
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 6px;
  margin-top: 4px;
}

.proposal-carousel-card.is-active .proposal-list li {
  list-style: none;
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.45;
  color: #210e56;
}

.proposal-carousel-card.is-active .proposal-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: #210e56;
}

.proposal-carousel-card:focus-visible {
  outline: 2px solid rgba(33, 14, 86, 0.55);
  outline-offset: 2px;
}

.proposal-nav {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(33, 14, 86, 0.35);
  background: #ffffff;
  color: #210e56;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(33, 14, 86, 0.15);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  touch-action: manipulation;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.proposal-nav-prev {
  left: 0;
}

.proposal-nav-next {
  right: 0;
}

.proposal-nav:hover {
  transform: translateY(calc(-50% - 2px));
  box-shadow: 0 14px 26px rgba(33, 14, 86, 0.2);
}

.proposal-carousel-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #5b507f;
}

@media (max-width: 1100px) {
  .proposal-carousel {
    --proposal-small-height: 186px;
    --proposal-active-height: 408px;
  }

  .proposal-carousel-viewport {
    padding: 10px 46px 14px;
  }

  .proposal-carousel-track {
    gap: 14px;
  }

  .proposal-carousel-card {
    flex-basis: clamp(190px, 42vw, 260px);
    min-height: 0;
    border-radius: 20px;
    padding: 20px 16px;
  }

  .proposal-carousel-card.is-active {
    flex-basis: clamp(330px, 78vw, 520px);
    min-height: 0;
    padding: 22px 20px;
  }

  .proposal-carousel-card.is-active h3 {
    font-size: clamp(24px, 5vw, 34px);
  }
}

@media (max-width: 767px) {
  .proposal-carousel {
    --proposal-small-height: 154px;
    --proposal-active-height: 336px;
  }

  .proposal-carousel-viewport {
    padding: 8px 42px 12px;
  }

  .proposal-carousel-track {
    gap: 12px;
  }

  .proposal-carousel-card {
    flex-basis: clamp(155px, 58vw, 220px);
    min-height: 0;
    padding: 16px 12px;
    border-radius: 16px;
  }

  .proposal-carousel-card h3 {
    font-size: clamp(17px, 4.9vw, 22px);
  }

  .proposal-carousel-card.is-active {
    flex-basis: clamp(270px, 84vw, 360px);
    min-height: 0;
    padding: 18px 14px;
  }

  .proposal-carousel-card.is-active .proposal-lead {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .proposal-carousel-card.is-active .proposal-list {
    gap: 7px;
  }

  .proposal-carousel-card.is-active .proposal-list li {
    font-size: 13px;
    line-height: 1.38;
    padding-left: 16px;
  }

  .proposal-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .proposal-carousel-hint {
    font-size: 12px;
  }
}

/* =====================================================
   SECTION 5: METHODOLOGY
   ===================================================== */
.methodology-section {
  background: var(--light-gray);
}

.methodology-image-container {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.methodology-image {
  width: 100%;
  height: auto;
  transform: scale(1.02);
  transition: transform 1.2s var(--easing-emphasis);
}

.methodology-image-container:hover .methodology-image {
  transform: scale(1.06);
}

.methodology-grid {
  display: grid;
  gap: 24px;
}

.method-step {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.method-number {
  font-size: 56px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1;
  margin-bottom: 16px;
}

.method-step h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.method-step p {
  font-size: 17px;
  color: var(--text-gray);
  line-height: 1.6;
}

/* Desktop methodology */
@media (min-width: 768px) {
  .methodology-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =====================================================
   SECTION 6: CTA (VOTA)
   ===================================================== */
.cta-section {
  padding: 40px 24px;
  background-color: var(--primary-blue);
  background-image: none;
  color: var(--white);
  text-align: center;
}

.cta-headline {
  font-size: clamp(40px, 7vw, 52px);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.cta-subheadline {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 500;
  margin-bottom: 40px;
  opacity: 0.95;
}

/* Countdown */
.countdown-timer {
  margin-bottom: 48px;
}

.countdown-label {
  font-size: 20px;
  margin-bottom: 24px;
  opacity: 0.9;
}

.countdown-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-value {
  font-size: clamp(48px, 10vw, 64px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown-value.tick {
  animation: tick-pop 0.25s ease;
}

.countdown-label-small {
  font-size: 14px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.countdown-separator {
  font-size: 48px;
  font-weight: 300;
  opacity: 0.6;
  margin-bottom: 20px;
}

/* Voting info */
.voting-info {
  margin-bottom: 48px;
}

.voting-date,
.voting-method {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 40px 24px;
  }
  
  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
  
  .countdown-display {
    gap: 16px;
  }
}

/* =====================================================
   SECTION 7: CONTACT
   ===================================================== */
.contact-section {
  background: var(--white);
}

.contact-grid {
  display: grid;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--light-gray);
  border-radius: 16px;
  padding: 28px;
  transition: transform var(--transition-medium),
              box-shadow var(--transition-medium),
              background-color var(--transition-medium);
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: #e7e2f2;
}

.contact-icon {
  font-size: 56px;
  flex-shrink: 0;
}

.contact-info h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.contact-info p {
  font-size: 16px;
  color: var(--primary-blue);
  font-weight: 500;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1000px;
  }
}

@media (min-width: 1100px) {
  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1200px;
  }
}

/* =====================================================
   SECTION 8: FOOTER
   ===================================================== */
.main-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 30px 20px;
  text-align: center;
}

.footer-main {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-secondary {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.footer-legal {
  font-size: 12px;
  opacity: 0.5;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), 
              visibility var(--transition-medium);
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--white);
  border-radius: 24px;
  padding: 48px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 32px;
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-dialog h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-right: 40px;
}

.modal-countdown {
  font-size: 20px;
  color: var(--primary-blue);
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-dialog > p {
  font-size: 17px;
  color: var(--text-gray);
  margin-bottom: 24px;
  line-height: 1.5;
}

#reminder-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-light);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color var(--transition-fast);
}

#reminder-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  cursor: pointer;
}

.consent-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--primary-blue);
}

.consent-checkbox span {
  font-size: 14px;
  color: var(--text-gray);
  line-height: 1.4;
}

#reminder-form button[type="submit"] {
  width: 100%;
  background: var(--primary-blue);
  color: var(--white);
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              transform var(--transition-fast);
}

#reminder-form button[type="submit"]:hover {
  background: var(--blue-dark);
  transform: scale(1.02);
}

.modal-legal {
  font-size: 13px;
  color: var(--text-gray);
  opacity: 0.8;
  margin-top: 20px;
  line-height: 1.5;
}

/* =====================================================
   AI CHAT WIDGET
   ===================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-chat-widget {
  --chat-edge: 10px;
  --chat-launcher-size: 98px;
  position: fixed;
  left: var(--chat-edge);
  bottom: var(--chat-edge);
  left: max(var(--chat-edge), env(safe-area-inset-left));
  bottom: max(var(--chat-edge), env(safe-area-inset-bottom));
  z-index: 11000;
  pointer-events: auto;
}

.ai-chat-launcher {
  position: relative;
  display: block;
  width: var(--chat-launcher-size);
  height: var(--chat-launcher-size);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
}

.ai-chat-launcher-orb {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  isolation: isolate;
  --ai-avatar-size: 118px;
  --ai-avatar-base-bottom: -1px;
  --ai-avatar-bottom: -3px;
  --ai-avatar-top-split: 42%;
  --ai-avatar-seam-overlap: 7.5%;
  --ai-avatar-seam-fade: 30%;
  --ai-avatar-focus-y: 46%;
}

.ai-chat-launcher-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  background: transparent;
  box-shadow: 0 12px 28px rgba(33, 14, 86, 0.24), inset 0 0 0 1px rgba(33, 14, 86, 0.28);
  display: block;
  overflow: hidden;
  z-index: 1;
  animation: ai-orb-pulse 2.4s ease-in-out infinite;
}

.ai-chat-launcher-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(33, 14, 86, 0.45);
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.ai-chat-avatar-base-wrap {
  position: absolute;
  left: 50%;
  bottom: var(--ai-avatar-base-bottom);
  width: var(--ai-avatar-size);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.ai-chat-avatar-wrap {
  display: block;
  position: absolute;
  left: 50%;
  bottom: var(--ai-avatar-bottom);
  width: var(--ai-avatar-size);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
  z-index: 3;
}

.ai-chat-avatar-gif {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: 50% var(--ai-avatar-focus-y);
  filter: none;
  transform-origin: center bottom;
  animation: none;
}

.ai-chat-avatar-gif-base {
  clip-path: inset(calc(var(--ai-avatar-top-split) - var(--ai-avatar-seam-overlap)) 0 0 0);
}

.ai-chat-avatar-gif-top {
  clip-path: inset(0 0 calc(100% - var(--ai-avatar-top-split) - var(--ai-avatar-seam-overlap)) 0);
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - var(--ai-avatar-seam-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - var(--ai-avatar-seam-fade)),
    transparent 100%
  );
}

.ai-chat-launcher-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(33, 14, 86, 0.92);
  background: rgba(33, 14, 86, 0.08);
  color: #210e56;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(33, 14, 86, 0.14);
  transition: opacity 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
}

.ai-chat-panel {
  position: fixed;
  left: var(--chat-edge);
  bottom: calc(var(--chat-launcher-size) + var(--chat-edge) + 12px);
  left: max(var(--chat-edge), env(safe-area-inset-left));
  bottom: max(calc(var(--chat-launcher-size) + var(--chat-edge) + 12px), env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 26px));
  height: min(560px, calc(100vh - 120px));
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(33, 14, 86, 0.1) 0%, rgba(33, 14, 86, 0.06) 100%);
  border: 1px solid rgba(33, 14, 86, 0.78);
  box-shadow: 0 20px 50px rgba(33, 14, 86, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.28s var(--easing-emphasis), opacity 0.28s var(--easing-emphasis);
  pointer-events: auto;
}

.ai-chat-widget.open .ai-chat-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(33, 14, 86, 0.92);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
}

.ai-chat-header-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 14px rgba(33, 14, 86, 0.22);
}

.ai-chat-header h3 {
  font-size: 16px;
  line-height: 1.2;
  color: #210e56;
}

.ai-chat-header p {
  font-size: 12px;
  color: #210e56;
  line-height: 1.2;
}

.ai-chat-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(33, 14, 86, 0.9);
  background: rgba(33, 14, 86, 0.08);
  color: #210e56;
  font-size: 24px;
  line-height: 1;
}

.ai-chat-close:hover {
  background: #210e56;
  color: #ffffff;
}

.ai-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(circle at 85% 7%, rgba(33, 14, 86, 0.24) 0%, rgba(33, 14, 86, 0) 44%),
    radial-gradient(circle at 0% 60%, rgba(33, 14, 86, 0.35) 0%, rgba(33, 14, 86, 0) 44%),
    rgba(33, 14, 86, 0.05);
}

.ai-msg {
  max-width: 90%;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 3px 10px rgba(33, 14, 86, 0.08);
}

.ai-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #210e56;
  border: 1px solid rgba(33, 14, 86, 0.8);
}

.ai-msg-user {
  align-self: flex-end;
  background: linear-gradient(140deg, #210e56 0%, #210e56 100%);
  color: #ffffff;
}

.ai-msg-meta {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.7;
}

.ai-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #210e56;
  animation: typing-dot 1s ease-in-out infinite;
}

.ai-chat-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-chat-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.ai-chat-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px;
  border-top: 1px solid rgba(33, 14, 86, 0.75);
  background: rgba(33, 14, 86, 0.06);
}

.ai-chip {
  flex-shrink: 0;
  border: 1px solid rgba(33, 14, 86, 0.95);
  background: rgba(33, 14, 86, 0.08);
  color: #210e56;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ai-chip:hover {
  background: #210e56;
  color: #ffffff;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(33, 14, 86, 0.75);
  background: rgba(33, 14, 86, 0.04);
}

.ai-chat-form input {
  min-width: 0;
  border: 1px solid #210e56;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  color: #210e56;
  background: #ffffff;
}

.ai-chat-form input:focus {
  outline: 2px solid rgba(33, 14, 86, 0.22);
  border-color: #210e56;
}

.ai-chat-send {
  border: none;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(140deg, #210e56 0%, #210e56 100%);
  color: #ffffff;
}

.ai-chat-send:hover {
  filter: brightness(1.05);
}

@keyframes ai-avatar-idle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-1.6deg); }
  50% { transform: translateY(-1px) rotate(1.6deg); }
  75% { transform: translateY(-6px) rotate(-0.9deg); }
}

@keyframes ai-orb-pulse {
  0%, 100% {
    box-shadow: 0 14px 34px rgba(33, 14, 86, 0.33), inset 0 0 0 1px rgba(33, 14, 86, 0.42);
  }
  50% {
    box-shadow: 0 18px 38px rgba(33, 14, 86, 0.38),
                0 0 0 6px rgba(33, 14, 86, 0.14),
                inset 0 0 0 1px rgba(33, 14, 86, 0.52);
  }
}

@keyframes typing-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-3px); opacity: 1; }
}

@keyframes achievements-loop {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--achievements-loop-width, 0px)), 0, 0); }
}

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.8s var(--easing-emphasis),
              transform 0.8s var(--easing-emphasis),
              filter 0.8s var(--easing-emphasis);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@keyframes shine {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateX(240%); opacity: 0; }
}

@keyframes tick-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes vote-pulse {
  0%, 68%, 100% {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
  }
  76% {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.32),
                0 0 0 10px rgba(255, 255, 255, 0.18);
  }
  84% {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.32),
                0 0 0 24px rgba(255, 255, 255, 0);
  }
}

@keyframes proposal-halo {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(33, 14, 86, 0.24);
  }
  45% {
    box-shadow: 0 0 0 7px rgba(33, 14, 86, 0.06);
  }
}

/* Stagger animation delays */
.proposal-category:nth-child(1) { transition-delay: 0.1s; }
.proposal-category:nth-child(2) { transition-delay: 0.2s; }
.proposal-category:nth-child(3) { transition-delay: 0.3s; }
.proposal-category:nth-child(4) { transition-delay: 0.4s; }
.proposal-featured { transition-delay: 0.5s; }

.method-step:nth-child(1) { transition-delay: 0.1s; }
.method-step:nth-child(2) { transition-delay: 0.15s; }
.method-step:nth-child(3) { transition-delay: 0.2s; }
.method-step:nth-child(4) { transition-delay: 0.25s; }

.achievement-card:nth-child(1) { transition-delay: 0.1s; }
.achievement-card:nth-child(2) { transition-delay: 0.15s; }
.achievement-card:nth-child(3) { transition-delay: 0.2s; }
.achievement-card:nth-child(4) { transition-delay: 0.25s; }

.trust-badge:nth-child(1) { transition-delay: 0.05s; }
.trust-badge:nth-child(2) { transition-delay: 0.1s; }
.trust-badge:nth-child(3) { transition-delay: 0.15s; }

.story-card:nth-child(1) { transition-delay: 0.04s; }
.story-card:nth-child(2) { transition-delay: 0.08s; }
.story-card:nth-child(3) { transition-delay: 0.12s; }
.story-card:nth-child(4) { transition-delay: 0.16s; }
.story-card:nth-child(5) { transition-delay: 0.2s; }
.story-card:nth-child(6) { transition-delay: 0.24s; }
.story-card:nth-child(7) { transition-delay: 0.28s; }
.story-card:nth-child(8) { transition-delay: 0.32s; }
.story-card:nth-child(9) { transition-delay: 0.36s; }
.story-card:nth-child(10) { transition-delay: 0.4s; }

.extension-card:nth-child(1) { transition-delay: 0.06s; }
.extension-card:nth-child(2) { transition-delay: 0.1s; }
.extension-card:nth-child(3) { transition-delay: 0.14s; }
.extension-card:nth-child(4) { transition-delay: 0.18s; }
.extension-card:nth-child(5) { transition-delay: 0.22s; }

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */
@media (max-width: 767px) {
  .hero-main-bg {
    /* Reframe hero portrait on narrow screens to avoid right-side clipping */
    object-position: 83% 12%;
    transform: scale(1.01);
    animation: none;
  }

  .hero-logo {
    height: 40px;
  }

  .hero-copy {
    width: 100%;
    margin-top: 4px;
  }

  .hero-kicker {
    font-size: 12px;
    letter-spacing: 0.07em;
  }
  
  .modal-dialog {
    padding: 32px 24px;
  }
  
  .modal-dialog h3 {
    font-size: 24px;
  }
  
  .proposal-featured {
    padding: 36px 24px;
  }
  
  .proposal-featured h3 {
    font-size: 26px;
  }
  
  .proposal-featured p {
    font-size: 18px;
  }

  .ai-chat-launcher-orb {
    --ai-avatar-size: 99px;
    --ai-avatar-base-bottom: -1px;
    --ai-avatar-bottom: -7px;
    --ai-avatar-top-split: 42%;
    --ai-avatar-seam-overlap: 2.5%;
    --ai-avatar-seam-fade: 24%;
  }

  .ai-chat-widget {
    --chat-edge: 8px;
    --chat-launcher-size: 82px;
  }

  .ai-chat-launcher-label {
    left: calc(100% + 8px);
    font-size: 12px;
    padding: 8px 10px;
  }

  .ai-chat-panel {
    width: min(360px, calc(100vw - 18px));
    height: min(72vh, 520px);
    border-radius: 18px;
  }

  .ai-chat-messages {
    padding: 13px;
  }

  .ai-chat-form {
    grid-template-columns: 1fr;
  }

  .ai-chat-send {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress-bar {
    transition: none;
  }

  .hero-main-bg {
    animation: none;
  }

  .hero-copy > * {
    transition: none;
  }

  .btn-primary::after,
  .btn-primary-inverted::after {
    animation: none;
  }

  .countdown-value.tick {
    animation: none;
  }

  .vote-pulse,
  .proposal-category h3::before {
    animation: none;
  }

  .proposal-featured,
  .proposal-category,
  .magnetic-btn,
  .story-card,
  .extension-card {
    transition: none;
    transform: none !important;
  }

  .proposal-featured::after,
  .proposal-category::after {
    display: none;
  }

  .methodology-image {
    transform: none;
    transition: none;
  }

  .ai-chat-avatar-gif,
  .ai-chat-typing-dot,
  .ai-chat-launcher-ring {
    animation: none;
  }

  .ai-chat-panel,
  .ai-chat-launcher-label {
    transition: none;
  }
}
