/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,800&family=Work+Sans:wght@400;500;600;700&display=swap');

/* Scroll animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* ===== Gradient text ===== */
.gradient-text {
  background: linear-gradient(135deg, #E4874A, #CF531E, #AC3F1A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark .gradient-text {
  background: linear-gradient(135deg, #EDAF71, #E4874A, #DE6A29);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 3D Button (Gumroad-style) ===== */
.btn-3d {
  position: relative;
  transform: translateY(0);
  box-shadow: 0 4px 0 0 #AC3F1A;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #AC3F1A;
}

.btn-3d:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 #AC3F1A;
}

.dark .btn-3d {
  box-shadow: 0 4px 0 0 #89341C;
}

.dark .btn-3d:hover {
  box-shadow: 0 6px 0 0 #89341C;
}

.dark .btn-3d:active {
  box-shadow: 0 1px 0 0 #89341C;
}

/* ===== Phone Mockup ===== */
.phone-mockup {
  transform: rotate(3deg);
  transition: transform 0.2s ease-out;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15))
          drop-shadow(0 12px 24px rgba(0, 0, 0, 0.1));
}

.dark .phone-mockup {
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4))
          drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3));
}

.phone-frame {
  width: 280px;
  border-radius: 40px;
  border: 8px solid #1C1917;
  background: #1C1917;
  overflow: hidden;
  position: relative;
}

.dark .phone-frame {
  border-color: #44403C;
  background: #44403C;
}

.phone-screen {
  border-radius: 32px;
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  aspect-ratio: 9 / 19.5;
  display: flex;
  flex-direction: column;
}

.dark .phone-screen {
  background: #292524;
}

.phone-notch {
  width: 100px;
  height: 28px;
  background: #1C1917;
  border-radius: 0 0 18px 18px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.dark .phone-notch {
  background: #44403C;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 0;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  color: #1C1917;
  height: 40px;
}

.dark .phone-status-bar {
  color: #E7E5E4;
}

.phone-content {
  padding: 12px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.lesson-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lesson-label {
  font-family: 'Work Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #78716C;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dark .lesson-label {
  color: #A8A29E;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #E7E5E4;
  border-radius: 3px;
  overflow: hidden;
}

.dark .progress-track {
  background: #44403C;
}

.progress-fill {
  width: 2%;
  height: 100%;
  background: #CF531E;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.word-card {
  background: #FAFAF9;
  border: 1px solid #E7E5E4;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  width: 100%;
}

.dark .word-card {
  background: #1C1917;
  border-color: #44403C;
}

.word-card .tamil {
  font-size: 36px;
  font-weight: 700;
  color: #1C1917;
  line-height: 1.3;
  margin-bottom: 6px;
}

.dark .word-card .tamil {
  color: #FAFAF9;
}

.word-card .romanization {
  font-family: 'Work Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #A8A29E;
  margin-bottom: 4px;
}

.word-card .english {
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #78716C;
}

.dark .word-card .english {
  color: #A8A29E;
}

.listen-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #FAE8D4;
  border: 1px solid #F4CDA8;
  color: #89341C;
  margin-top: 16px;
}

.dark .listen-icon {
  background: #3C140B;
  border-color: #702C19;
  color: #E4874A;
}

.mic-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #CF531E;
  color: #FFFFFF;
}

.dark .mic-circle {
  background: #E4874A;
  color: #1C1917;
}

/* Responsive phone sizing */
@media (max-width: 767px) {
  .phone-frame {
    width: 240px;
  }

  .word-card .tamil {
    font-size: 30px;
  }

  .phone-content {
    padding: 10px 16px 20px;
    gap: 12px;
  }

  .word-card {
    padding: 18px 16px;
  }
}
