/* =========================================================
   Page Layout
   ========================================================= */

.page {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  position: relative;
}

.story {
  width: 100%;
}

/* =========================================================
   Navigation
   ========================================================= */

.site-nav {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-light-grey);
  border-radius: var(--radius-pill);
  padding: var(--space-sm) var(--space-lg);
  z-index: 100;
}

.nav-container {
  display: inline-flex;
  align-items: center;
  gap: 100px; /* intentional fixed spacing for now */
}

.nav-link {
  font-family: var(--font-mono-light);
  font-weight: 300;
  font-size: var(--text-nav);
  line-height: var(--line-tight);
  color: var(--color-black);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link.is-active {
  font-family: var(--font-mono-bold);
  font-weight: 700;
}


/* =========================================================
   Story Sections (Shared)
   ========================================================= */

.story-section {
  width: 100%;
  min-height: auto;
  background-color: var(--color-white);
  position: relative;
}

.section-header {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding-inline: var(--space-md);
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  
}

.section-eyebrow {
  font-family: var(--font-mono-light);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--line-normal);
  color: var(--color-black);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-section-title);
  line-height: var(--line-tight);
  color: var(--color-black);
  padding-bottom: 30px;
}

.section-subtitle {
  font-family: var(--font-mono-light);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: var(--line-normal);
  color: var(--color-black);
  max-width: 900px;
  font-weight: bold;
}

.section-container{
  border: 2px solid #ddd;        /* the bounding box */
  border-radius: 12px;           /* rounded corners */
  padding: 24px;                 /* space inside the box */
  margin: 40px auto;                /* space outside the box */
  background: #fafafa;           /* optional subtle background */

  max-width: 1000px;
  width: 100%;

}


/* =========================================================
   Hero Section
   ========================================================= */

.section-hero {
  min-height: 1024px;
  padding-top: 120px;
}

.hero-layout {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding-inline: var(--space-md);
  padding-top: calc(50vh - 170px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-mono-light);
  font-weight: 300;
  font-size: var(--text-body-lg);
  line-height: var(--line-normal);
  color: var(--color-black);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-hero);
  line-height: var(--line-hero);
  color: var(--color-black);
}

.section-intro {
  padding: 360px 0 120px 0;
  max-width: 800px;
  margin: 0 auto;
}

.section-intro .hero-title {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 12px;
  text-align: left;
}

.section-intro .section-subtitle {
  font-size: 15px;
  line-height: 1.4;
  color: #555;
  max-width: 800px;
  text-align: left;
}

/* =========================================================
   Hero Visuals
   ========================================================= */


.hero-visuals {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
}

.hero-visuals img {
  height: 100px;
  display: block;
}

.hero-visuals img:nth-child(1) {
  width: 91px;
}

.hero-visuals img:nth-child(2) {
  width: 129px;
}

.hero-visuals img:nth-child(3) {
  width: 105px;
}

/* =========================================================
   Section Hooks (Empty by Design)
   ========================================================= */

.section-intro {}
.section-ordering {}
.section-timing {}
.section-ratings {}
.section-sentiment {}
.section-drivers {}
.section-geography {}
.section-summary {}

/*visualizations*/
#vis_1,#vis_2a,#vis_2b,
#vis_3,#vis_4,#vis_5,
#vis_6 {
  width: 100%;
  height: 100%;
  padding: 2rem;
  display: grid;
  place-items: center;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   Interactive Time Series Styling
   ========================================================= */

#vis_1 > div {
  width: 100%;
}

/* Instruction panel */
#vis_1 > div > div:first-child {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF9E6 100%);
  border-left: 4px solid #FF6B35;
}

/* Vega-Lite charts */
#vis_1 canvas,
#vis_1 svg,
#vis_5 canvas,
#vis_5 svg {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#vis_5 .bubble-chart-wrapper {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

#vis_5 .bubble-chart-instructions {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFF9E6 100%);
  border-left: 4px solid #FF6B35;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 24px;
}

#vis_5 .bubble-chart-actions button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

#vis_1 button:not(:disabled):hover,
#vis_5 button:not(:disabled):hover {
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
}

#vis_1 button:disabled,
#vis_5 button:disabled {
  background-color: #CCCCCC !important;
  cursor: not-allowed;
}

/* Submit button styling */
#vis_1 button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

#vis_1 button:not(:disabled):hover {
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
}

#vis_1 button:disabled {
  background-color: #CCCCCC !important;
  cursor: not-allowed;
}

/* Feedback panels */
#vis_1 > div > div:last-child {
  animation: slideInUp 0.6s ease-out;
}

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

/* Food delivery color palette */
:root {
  --color-primary-orange: #FF6B35;
  --color-primary-red: #D32F2F;
  --color-secondary-orange: #E55100;
  --color-success-green: #4CAF50;
  --color-info-blue: #2196F3;
  --color-warning-orange: #FF9800;
}

.data-card {
  background: #ffffff;
  padding: 28px;
  border-radius: 8px;
  margin-bottom: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.data-card p {
  font-size: 14px;
  color: #444;
  margin-bottom: 16px;
  line-height: 1.55
}

.data-columns {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.data-columns h4 {
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.data-columns ul {
  padding-left: 18px;
  margin: 0;
}

.data-columns li {
  font-size: 13px;
  margin-bottom: 6px;
  color: #555;
}

.data-card a {
  color: #FF6B35;
  text-decoration: none;
  font-weight: 600;
}

.data-card a:hover {
  text-decoration: underline;
}
