/* style.css — Modern styles for vincentchiu.com */

:root {
  --primary: #1a237e;
  --primary-dark: #0d1057;
  --accent: #1565c0;
  --accent-light: #42a5f5;
  --purple: #7c3aed;
  --pink: #ec4899;
  --teal: #0891b2;
  --orange: #f97316;
  --green: #10b981;
  --bg: #f0f2ff;
  --card-bg: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --border: #d2d2d7;
  --nav-height: 64px;
  --radius: 20px;
  --shadow: 0 4px 24px rgba(124, 58, 237, 0.08);
  --shadow-hover: 0 12px 48px rgba(124, 58, 237, 0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ─── Keyframe Animations ────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ─── Navigation ─────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0d1057 0%, #1a237e 50%, #4a1d96 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(13, 16, 87, 0.4);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124,58,237,0.6), rgba(236,72,153,0.4));
  box-shadow: 0 2px 12px rgba(124,58,237,0.3);
}

/* ─── Hero ───────────────────────────────────────── */
.hero {
  background: linear-gradient(-45deg, #1a237e, #4a1d96, #0891b2, #1565c0, #7c3aed, #1a237e);
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
  color: #fff;
  padding: 72px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(236,72,153,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(8,145,178,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  line-height: 1.15;
  animation: fadeInUp 0.7s ease both;
}

.hero p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 10px;
  font-style: italic;
  line-height: 1.5;
  animation: fadeInUp 0.7s ease 0.1s both;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  transition: all 0.3s ease;
  animation: fadeInUp 0.7s ease 0.2s both, pulse-ring 2.5s ease 1.5s infinite;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.5);
}

.hero-cta-teal {
  background: linear-gradient(135deg, #0891b2, #10b981);
  animation: fadeInUp 0.7s ease 0.25s both;
  box-shadow: 0 4px 20px rgba(8, 145, 178, 0.4);
}

.hero-cta-teal:hover {
  box-shadow: 0 8px 32px rgba(8, 145, 178, 0.5);
}

/* ─── Page header (sub-pages) ────────────────────── */
.page-header {
  background: linear-gradient(-45deg, #1a237e, #4a1d96, #7c3aed, #1565c0);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  color: #fff;
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease both;
}

.page-header p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

/* ─── Container ──────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── App cards grid ─────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 52px 0;
}

.app-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease both;
  border: 1px solid rgba(124,58,237,0.08);
}

.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.15s; }

.app-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-hover);
}

.app-card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #ec4899, #f97316);
}

.app-card:nth-child(2)::before {
  background: linear-gradient(90deg, #0891b2, #10b981, #7c3aed);
}

.app-card-image {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 16px 24px 0;
  background: linear-gradient(145deg, #f0ebff, #dce4ff, #e0f2fe);
  min-height: 220px;
}

.app-card-image img {
  max-height: 210px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  transition: transform 0.4s ease;
}

.app-card:hover .app-card-image img {
  transform: scale(1.08) translateY(-4px);
}

.app-card-content {
  padding: 20px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-card-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.app-card-content .app-subtitle {
  font-size: 13px;
  color: var(--purple);
  margin-bottom: 12px;
  font-weight: 500;
  text-align: center;
}

.app-card-content p {
  font-size: 14px;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 20px;
  line-height: 1.55;
}

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #1565c0, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124,58,237,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
}

.btn-outline:hover {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

/* ─── Section cards ──────────────────────────────── */
.section-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(124,58,237,0.06);
  animation: fadeInUp 0.6s ease both;
  transition: box-shadow 0.3s ease;
}

.section-card:hover {
  box-shadow: 0 8px 36px rgba(124,58,237,0.13);
}

.section-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #7c3aed, #ec4899, #f97316) 1;
}

/* ─── Intro text ─────────────────────────────────── */
.intro-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

/* ─── Video embed ────────────────────────────────── */
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(124,58,237,0.2);
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ─── Worship Training Sessions (accordion) ──────── */
.session-item {
  border-radius: 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8);
  border-left: 3px solid #7c3aed;
  transition: all 0.2s ease;
  overflow: hidden;
}

.session-item summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

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

.session-item summary::before {
  content: '▶';
  font-size: 11px;
  color: var(--purple);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.session-item[open] summary::before {
  transform: rotate(90deg);
}

.session-item[open] {
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.session-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.resource-list {
  list-style: none;
  padding: 4px 20px 16px 44px;
  display: grid;
  gap: 8px;
}

.resource-list li a {
  color: var(--purple);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.resource-list li a:hover {
  color: var(--pink);
  text-decoration: underline;
}

/* ─── Hymns row ──────────────────────────────────── */
.hymns-row {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.hymns-row img {
  height: 160px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.hymns-row img:hover {
  transform: scale(1.04);
}

/* ─── Apple Store badge ──────────────────────────── */
.store-badge {
  display: inline-block;
  margin-top: 12px;
  transition: transform 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.06) translateY(-2px);
}

.store-badge img {
  height: 60px;
  width: auto;
  border-radius: 10px;
  display: block;
}

/* ─── Footer ─────────────────────────────────────── */
footer {
  background: linear-gradient(135deg, #0d1057 0%, #1a237e 50%, #4a1d96 100%);
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  padding: 36px 24px;
  font-size: 14px;
}

footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

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

  .section-card {
    padding: 28px 20px;
  }

  .apps-grid {
    grid-template-columns: 1fr 1fr;
    padding: 24px 0 12px;
  }

  .hymns-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
