/* ============================================================
   features.css — Feature showcase sections
   ============================================================ */
.features-section {
  position: relative;
  z-index: var(--z-base);
}

/* ---- Feature panel (scroll animation wrapper) ---- */
.feature-panel {
  position: relative;
  z-index: var(--z-base);
  /* GPU compositing for smooth transforms */
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
}

/* ---- Feature row (alternating text + mockup) ---- */
.feature-row {
  display: flex;
  align-items: center;
  gap: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-section) var(--space-lg);
  position: relative;
  width: 100%;
}
.feature-row.reverse {
  flex-direction: row-reverse;
}

/* Feature glow — disabled */
.feature-glow { display: none; }

/* ---- Text side ---- */
.feature-text {
  flex: 1;
  min-width: 280px;
}
.feature-text h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  margin-bottom: var(--space-md);
  line-height: 1.1;
}
.feature-text p {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 440px;
}

/* ---- Mockup side ---- */
.feature-mockup {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Mini overlay (used in feature mockups) */
.mini-overlay {
  width: 360px;
}
.mini-overlay .overlay-content-area {
  max-height: 260px;
}

/* ========== STUDY MODE OVERLAY MOCKUP (from studyModeBarHTML) ========== */
.study-overlay {
  width: 380px;
  background: var(--overlay-bg);
  border-radius: 12px;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
}

/* Status bar — 28px from source */
.study-status-bar {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  user-select: none;
}

.study-activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34C759;
  flex-shrink: 0;
  animation: study-pulse 2.5s ease-in-out infinite;
}
.study-activity-dot.solving {
  animation: study-pulse 1.2s ease-in-out infinite;
}
@keyframes study-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.study-status-label {
  font: 500 11px/1 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.study-status-spacer { flex: 1; }

/* Mode toggle — from source */
.study-mode-toggle {
  display: flex;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  padding: 1px;
  gap: 1px;
}
.study-mode-toggle button {
  font: 500 10px/1 -apple-system, sans-serif;
  padding: 3px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: rgba(255,255,255,0.28);
  cursor: pointer;
  transition: all 0.2s ease;
}
.study-mode-toggle button.active {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  box-shadow: 0 0.5px 1px rgba(0,0,0,0.12);
}

/* Stop button */
.study-stop-btn {
  width: 18px;
  height: 18px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}
.study-stop-btn:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.55);
}

/* Content area */
.study-content-area {
  padding: 4px 0;
  max-height: 300px;
  overflow-y: auto;
}

/* Question row — from source */
.study-question-row {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
}
.study-question-row:last-child { border-bottom: none; }

.study-row-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.study-q-number {
  font: 600 11px/1 -apple-system, sans-serif;
  color: rgba(255,255,255,0.28);
  min-width: 20px;
  flex-shrink: 0;
}
.study-q-answer {
  flex: 1;
  font: 400 13px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-q-answer.solving-text {
  background: linear-gradient(90deg, rgba(255,255,255,0.28) 25%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0.28) 75%);
  background-size: 400px 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-study 1.8s ease-in-out infinite;
  font-style: italic;
}
@keyframes shimmer-study {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.study-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.study-action-btn {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 11px;
}

/* Expand chevron */
.study-chevron {
  transition: transform 0.2s ease;
  font-size: 10px;
  color: rgba(255,255,255,0.28);
}
.study-chevron.open {
  transform: rotate(90deg);
}

/* Steps container */
.study-steps {
  padding-left: 28px;
  padding-top: 6px;
}
.study-step {
  padding: 4px 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.study-step-num {
  font: 600 10px/1.6 -apple-system, sans-serif;
  color: rgba(255,255,255,0.28);
  min-width: 14px;
  flex-shrink: 0;
}
.study-step-text {
  font: 400 12px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
}
.study-step.key-step {
  border-left: 1.5px solid rgba(52, 199, 89, 0.35);
  padding-left: 8px;
  margin-left: -10px;
}

/* Prompt input — 48px from source */
.study-prompt-bar {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-top: 0.5px solid rgba(255,255,255,0.08);
}
.study-prompt-input {
  width: 100%;
  height: 32px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 12px;
  font: 400 12px -apple-system, sans-serif;
  color: rgba(255,255,255,0.92);
  outline: none;
}
.study-prompt-input::placeholder {
  color: rgba(255,255,255,0.28);
}

/* Page divider */
.study-page-divider {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.study-page-divider::before,
.study-page-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: rgba(255,255,255,0.08);
}
.study-page-divider span {
  font: 500 10px/1 -apple-system, sans-serif;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---- Learn mode concept card ---- */
.study-concept-card {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.study-concept-title {
  font: 600 13px/1.3 -apple-system, sans-serif;
  color: rgba(255,255,255,0.92);
}
.study-concept-body {
  font: 400 12px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
}
.study-concept-formula {
  padding: 8px 12px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  text-align: center;
  font: 400 13px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.92);
}
.study-similar-label {
  font: 500 10px/1 -apple-system, sans-serif;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px solid rgba(255,255,255,0.08);
}
.study-similar-text {
  font: 400 12px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
}

/* Feedback card */
.study-feedback-card {
  padding: 12px 14px;
}
.study-score-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.study-score-track {
  height: 3px;
  border-radius: 1.5px;
  background: rgba(255,255,255,0.07);
  flex: 1;
}
.study-score-fill {
  height: 100%;
  border-radius: 1.5px;
  background: #34C759;
  width: 72%;
}
.study-score-label {
  font: 600 11px/1 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
}
.study-feedback-text {
  font: 400 12px/1.5 -apple-system, sans-serif;
  color: rgba(255,255,255,0.55);
}

/* ---- Works-with grid ---- */
.works-section {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-section) var(--space-lg);
  position: relative;
  width: 100%;
}
.works-section h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  margin-bottom: 12px;
}
.works-section > p {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--space-3xl);
}
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}
.works-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.works-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-surface-hover);
  transform: translateY(-2px);
}
.works-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}
.works-card-icon svg {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  display: block;
}
.works-card-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ---- Feature hotkey animation (scroll-triggered per section) ---- */
.feature-hotkey {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
}
.feature-hotkey .key {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 15px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-text);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.2s ease, border-color 0.12s ease;
  user-select: none;
}
.feature-hotkey .key.pressed {
  transform: translateY(2px) scale(0.95);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 20px rgba(255,255,255,0.15);
}
.feature-hotkey .key-plus {
  font-size: 12px;
  color: var(--color-text-muted);
}
.feature-hotkey-label {
  margin-left: 12px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.feature-hotkey-label.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Quick Prompt overlay mockup */
.quick-prompt-overlay {
  width: 340px;
  background: var(--overlay-bg);
  border-radius: 12px;
  box-shadow:
    0 25px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.08);
  overflow: hidden;
}
.quick-prompt-drag-bar {
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  user-select: none;
}
.quick-prompt-drag-bar .overlay-logo {
  width: 15px;
  height: 15px;
  filter: invert(1);
  opacity: 0.75;
}
.quick-prompt-label {
  font: 400 11px -apple-system, sans-serif;
  color: rgba(255,255,255,0.28);
  margin-left: 2px;
}
.quick-prompt-area {
  padding: 0 12px 12px 12px;
}
.quick-prompt-field {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.92);
  font: 400 13px -apple-system, sans-serif;
  padding: 8px 12px;
  outline: none;
}
.quick-prompt-field::placeholder {
  color: rgba(255,255,255,0.4);
}

/* ---- MacBook top-right corner crop ---- */
.macbook-corner {
  width: 560px;
  position: relative;
  overflow: hidden;
  /* Crop: only show the right portion */
  margin-left: -80px;
}
.macbook-bezel {
  background: #303032;
  border-radius: 0 18px 18px 0;
  padding: 5px 5px 5px 0;
  position: relative;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.07);
  /* Clip the left side to suggest it extends off-screen */
  margin-left: -40px;
  padding-left: 40px;
}
/* Notch — sits at the left edge of our crop (suggesting center of full screen) */
.macbook-notch {
  position: absolute;
  top: 0;
  left: 60px;
  width: 160px;
  height: 28px;
  background: #303032;
  border-radius: 0 0 16px 16px;
  z-index: 3;
}
.macbook-notch::after {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #222;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
/* Screen */
.macbook-screen {
  background: #141418;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  position: relative;
}
/* Menu bar */
.macbook-menubar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  gap: 18px;
  background: rgba(32,32,36,0.95);
  position: relative;
  z-index: 2;
}
.macbook-menubar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.macbook-menubar-text {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}
.macbook-menubar-sep {
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
/* Presto wand icon — glows on scroll */
.presto-wand-icon {
  position: relative;
  transition: filter 0.3s ease;
}
.presto-wand-icon.flash {
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.95)) drop-shadow(0 0 30px rgba(255,255,255,0.4));
}
.presto-wand-icon.flash img {
  filter: invert(1) brightness(2.5);
}
/* Desktop area */
.macbook-desktop {
  height: 280px;
  background: linear-gradient(155deg, #151a2e 0%, #0c1020 30%, #131830 65%, #0d1018 100%);
  position: relative;
}
.macbook-desktop::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 65%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(45,65,140,0.14) 0%, transparent 70%);
  filter: blur(35px);
}
.macbook-desktop::after {
  content: '';
  position: absolute;
  bottom: 8%;
  right: 8%;
  width: 45%;
  height: 40%;
  background: radial-gradient(ellipse, rgba(70,35,110,0.07) 0%, transparent 70%);
  filter: blur(25px);
}
