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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header & Hero Brand Band */
.brand-band {
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: var(--text-on-brand);
  position: relative;
  padding-bottom: 56px;
}

.brand-band::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 38px;
  background: var(--bg-canvas);
  clip-path: ellipse(56% 100% at 50% 100%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-on-brand);
}

.brand-badge {
  background: var(--accent-dark);
  border: 2px solid var(--accent-gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-family: 'Caveat', 'Brush Script MT', cursive;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-on-brand);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hotline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-on-brand);
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-brand);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

.theme-toggle:active {
  transform: scale(0.96);
}

/* Carousel shared */
.carousel-shell {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  padding-block: 24px 12px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-on-brand);
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.38);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-track {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-width: 0;
}

.carousel-track > [data-slide] {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.carousel-track > [data-slide].is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-slide {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: center;
  min-height: 168px;
}

.hero-title {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-gold);
}

.hero-desc {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-on-brand-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.dot.active {
  width: 24px;
  background: var(--text-on-brand);
}

/* White Sections */
.section-light {
  padding-block: 48px;
  background-color: var(--bg-canvas);
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* 4-Column Cards */
.cards-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.offering-card {
  background-color: var(--bg-card-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.offering-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.offering-card-head {
  background-color: var(--bg-card-header);
  color: var(--text-on-brand);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 12px;
  letter-spacing: 0.03em;
}

.offering-card-body {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
}

.offering-icon-box {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.offering-card-desc {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex: 1;
}

.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 0;
  background-color: var(--accent-primary);
  color: var(--text-on-brand);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-brand:hover {
  background-color: var(--accent-hover);
}

.btn-brand:active {
  transform: scale(0.98);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 6px;
  border: 0;
  background-color: var(--bg-card-soft);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

[data-theme='dark'] .btn-light {
  color: var(--text-on-brand);
  border: 1px solid var(--border-strong);
}

.btn-light:hover {
  filter: brightness(0.95);
}

.btn-light:active {
  transform: scale(0.98);
}

/* Master Chef & Tech Shop Green Band */
.green-showcase-band {
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: var(--text-on-brand);
  padding-block: 56px 64px;
  position: relative;
}

.script-title {
  text-align: center;
  font-family: 'Caveat', 'Brush Script MT', cursive;
  font-size: 2.25rem;
  margin: 0 0 18px;
  color: var(--text-on-brand);
}

.chef-spotlight {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
}

.chef-badge-card {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--accent-gold);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.tech-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.tech-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 20px;
}

.tech-avatar {
  width: 112px;
  height: 112px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.tech-item p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-on-brand-muted);
}

/* Two-Column Activity Lists */
.activity-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.activity-box {
  background: var(--bg-card-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.activity-box-header {
  display: flex;
  justify-content: center;
  margin-top: -34px;
  margin-bottom: 14px;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.activity-row:nth-child(odd) {
  background: var(--bg-row-stripe);
}

.activity-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
}

/* Robot Thannos Frame */
.robot-frame {
  border: 3px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-surface);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.robot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}

.robot-chart-mock {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
}

.robot-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.metric-card {
  background: var(--bg-card-soft);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}

.metric-card strong {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-primary);
}

.metric-card span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Partners */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.partner-tile {
  aspect-ratio: 1 / 1;
  background-color: var(--accent-primary);
  color: var(--text-on-brand);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 8px;
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.partner-tile small {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.88;
  margin-top: 4px;
}

.partner-tile:hover {
  transform: translateY(-2px);
  background-color: var(--accent-hover);
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-dark) 100%);
  color: var(--text-on-brand);
  padding-block: 48px 24px;
  margin-top: 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.footer-grid h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.footer-grid p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-on-brand-muted);
}

.social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-on-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.8rem;
  color: var(--text-on-brand-muted);
}

/* In-System Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1rem;
}

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--accent-dark);
  color: var(--text-on-brand);
  border: 1px solid var(--accent-gold);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1100;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
  border-color: #ffffff;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .cards-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .partners-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .robot-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .carousel-shell {
    grid-template-columns: 1fr;
  }
  .carousel-btn {
    display: none;
  }
  .hero-slide,
  .chef-spotlight,
  .tech-grid-2x2,
  .activity-grid-2 {
    grid-template-columns: 1fr;
  }
  .cards-grid-4 {
    grid-template-columns: 1fr;
  }
  .tech-item {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .tech-avatar {
    margin-inline: auto;
  }
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
