:root {
  --bg:             #FAFAF9;
  --surface:        #FFFFFF;
  --border:         #E8E6E1;
  --text-primary:   #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent:         #2563EB;
  --accent-hover:   #1D4ED8;
  --green-soft:     #D1FAE5;
  --green-text:     #065F46;
  --amber-soft:     #FEF3C7;
  --amber-text:     #92400E;
  --radius:         14px;
  --radius-sm:      8px;
  --shadow:         0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-hover:   0 4px 8px rgba(0,0,0,0.08), 0 8px 28px rgba(0,0,0,0.10);
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
}

html { scroll-behavior: smooth; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */
.site-header {
  padding: 5rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--amber-soft);
  color: var(--amber-text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.site-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.site-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Nav dots (section jump) ── */
.section-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.section-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s ease, transform 0.15s ease;
}

.section-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.section-nav a:active {
  transform: scale(0.95);
}

.section-nav a.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Sections ── */
.programs-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-request-section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 560px;
  font-size: 0.95rem;
}

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ── Program Card ── */
.program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

.program-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.program-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: #D4D0C8;
}

.card-thumbnail {
  height: 150px;
  background: #F3F2EF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumbnail--placeholder {
  background: linear-gradient(135deg, #F5F4F0 0%, #EBE9E4 100%);
}

.placeholder-icon {
  font-size: 2.75rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

/* ── Status Badges ── */
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.status-badge--completed {
  background: var(--green-soft);
  color: var(--green-text);
}

.status-badge--in_development {
  background: var(--amber-soft);
  color: var(--amber-text);
}

/* ── Tags ── */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  background: #F0EFEC;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

/* ── Card Actions ── */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

/* ── Download Button ── */
.btn-download {
  display: block;
  width: 100%;
  padding: 0.65rem;
  background: #FFFFFF;
  color: #16A34A;
  border: 1.5px solid #16A34A;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s, transform 0.12s ease, box-shadow 0.15s;
}

.btn-download:hover {
  background: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
  transform: translateY(-1px);
}

.btn-download:active {
  transform: scale(0.97);
  box-shadow: none;
}

/* ── Request Button ── */
.btn-request {
  display: block;
  width: 100%;
  padding: 0.65rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s ease, box-shadow 0.15s;
  margin-top: auto;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn-request:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

.btn-request:active {
  transform: scale(0.97) translateY(0);
  box-shadow: none;
}

/* Ripple */
.btn-request .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: ripple-anim 0.5s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Coming Soon Bar ── */
.coming-soon-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--amber-text);
  background: var(--amber-soft);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
}

.coming-soon-dot {
  width: 7px;
  height: 7px;
  background: #F59E0B;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

/* ── Feature Request Form ── */
.form-wrapper iframe {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
}

.form-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Empty / Error ── */
.empty-msg {
  color: var(--text-secondary);
  font-size: 0.9rem;
  grid-column: 1 / -1;
  padding: 2rem 0;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}

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

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.94) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.is-open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-secondary);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
  line-height: 1;
}

.modal-close:hover {
  background: #F0EFEC;
  color: var(--text-primary);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
  letter-spacing: -0.01em;
}

.modal-body iframe {
  display: block;
  border-radius: var(--radius-sm);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.825rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .site-header { padding: 3.5rem 0 2.5rem; }
  .site-title  { font-size: 1.75rem; }
  .programs-section, .feature-request-section { padding: 3rem 0; }
}

@media (max-width: 480px) {
  .site-title  { font-size: 1.5rem; }
  .card-grid   { grid-template-columns: 1fr; }
  .section-nav { gap: 0.75rem; }
}
