/* StudyScroll CSS Design System */

:root {
  /* Common Brand Colors */
  --brand-primary: #007AFF;
  --brand-primary-rgb: 0, 122, 255;
  --brand-secondary: #5856D6;
  --brand-secondary-rgb: 88, 86, 214;
  --transition-speed: 0.3s;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Light Theme Variables */
  --bg-color: #FAF9F6;
  /* Premium warm/soft light background */
  --text-color: #1D1D1F;
  --text-subtext: #6E6E73;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.08);
  --section-bg-alt: #F2F2F7;
  --nav-bg: rgba(250, 249, 246, 0.8);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.06);
  --glow-color: rgba(0, 122, 255, 0.15);
  --badge-bg: #000000;

  /* Segmented Control (Light Mode) */
  --segment-bg: #E3E3E8;
  --segment-active-bg: #FFFFFF;
  --segment-text: #636366;
  --segment-text-active: #000000;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark Theme Variables */
    --bg-color: #000000;
    /* Pure deep OLED black */
    --text-color: #F5F5F7;
    --text-subtext: #86868B;
    --card-bg: rgba(28, 28, 30, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);
    --section-bg-alt: #1C1C1E;
    --nav-bg: rgba(0, 0, 0, 0.8);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
    --glow-color: rgba(88, 86, 214, 0.25);
    --badge-bg: #1C1C1E;

    /* Segmented Control (Dark Mode) */
    --segment-bg: #1C1C1E;
    --segment-active-bg: #2C2C2E;
    --segment-text: #8E8E93;
    --segment-text-active: #FFFFFF;
  }
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
}

body {
  overflow-x: hidden;
}

/* Typography & Layout Utilities */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

p {
  line-height: 1.5;
  color: var(--text-subtext);
}

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

/* Header & Glassmorphic Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: background-color var(--transition-speed);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-primary);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: transform 0.2s, background-color 0.2s;
}

.nav-cta:hover {
  background-color: #0062CC;
  transform: translateY(-1px);
}

.nav-cta:active {
  transform: translateY(0);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, var(--glow-color) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-size: 54px;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-subtext);
  margin-bottom: 32px;
  line-height: 1.4;
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s;
  height: 48px;
}

.app-store-badge:hover {
  transform: scale(1.02);
}

.app-store-badge:active {
  transform: scale(0.98);
}

.app-store-badge svg {
  height: 100%;
  border-radius: 6px;
}

/* Section: Interactive Experience Hub */
.experience-hub {
  padding: 80px 0;
  background-color: var(--section-bg-alt);
  transition: background-color var(--transition-speed);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.experience-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

.section-title {
  font-size: 38px;
  letter-spacing: -0.03em;
}

.control-panel {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtext);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* iOS-Style Segmented Control */
.segmented-control {
  display: flex;
  background-color: var(--segment-bg);
  padding: 2px;
  border-radius: 9px;
  position: relative;
  user-select: none;
}

.segment-btn {
  flex: 1;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--segment-text);
  padding: 6px 0;
  border-radius: 7px;
  cursor: pointer;
  z-index: 1;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.segment-btn.active {
  color: var(--segment-text-active);
  font-weight: 600;
  background-color: var(--segment-active-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* iOS Toggle Option for Theme */
.theme-options {
  display: flex;
  gap: 12px;
}

.theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-btn.active {
  border-color: var(--brand-primary);
  background-color: rgba(0, 122, 255, 0.08);
  color: var(--brand-primary);
  font-weight: 600;
}

.theme-btn svg {
  width: 16px;
  height: 16px;
}

/* CSS Phone Mockup */
.mockup-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-wrapper {
  position: relative;
  width: 370px; /* 350px width + 20px border */
  height: 720px; /* 700px height + 20px border */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.phone-frame {
  /* Internal Theme variables for target app mockup */
  --device-bg: #FFFFFF;
  --device-text: #000000;
  --device-card: #F2F2F7;
  --device-border: #E5E5EA;
  --device-subtext: rgba(60, 60, 67, 0.6);
  --device-success: #34C759;
  --device-error: #FF3B30;
  --device-primary: #007AFF;
  --device-primary-rgb: 0, 122, 255;
  --device-header-bg: rgba(255, 255, 255, 0.8);
  --device-btn-bg: rgba(0, 0, 0, 0.04);
  --device-btn-border: rgba(0, 0, 0, 0.08);
  --device-btn-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 2px 5px rgba(0, 0, 0, 0.03);

  width: 350px;
  height: 700px;
  background-color: #1C1C1E;
  /* Gunmetal outer finish */
  border: 10px solid #2C2C2E;
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), var(--shadow-lg);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  overflow: hidden;
  user-select: none;
  transition: border-color var(--transition-speed);
}

.hero-phone {
  transform: translate(-50%, -50%) rotate(2deg);
}

.phone-screenshot {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.phone-frame[data-theme="dark"] {
  --device-bg: #000000;
  --device-text: #FFFFFF;
  --device-card: #1C1C1E;
  --device-border: #2C2C2E;
  --device-subtext: rgba(235, 235, 245, 0.6);
  --device-success: #32D74B;
  --device-error: #FF453A;
  --device-primary: #007AFF;
  --device-header-bg: rgba(0, 0, 0, 0.75);
  --device-btn-bg: rgba(255, 255, 255, 0.08);
  --device-btn-border: rgba(255, 255, 255, 0.12);
  --device-btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* Device Shell Accents */
.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 85px;
  height: 22px;
  background-color: #000000;
  border-radius: 11px;
  z-index: 102;
  /* Put above status bar */
  transition: width 0.3s ease;
}

/* Phone Screen Viewport */
.phone-screen {
  width: 100%;
  height: 100%;
  background-color: var(--device-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: background-color var(--transition-speed);
}

/* Screen Header / Status Bar */
.phone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 600;
  color: var(--device-text);
  z-index: 101;
  background-color: var(--device-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: color var(--transition-speed), background-color var(--transition-speed);
  opacity: 0.85;
}

.status-time {
  padding-top: 4px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 4px;
}

.status-icons svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Feed Scroller */
.phone-feed {
  flex: 1;
  overflow-y: auto;
  padding-top: 82px;
  /* 38px status bar + 44px nav bar */
  padding-bottom: 24px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.phone-feed::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.phone-feed {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Mock App Navigation Bar */
.phone-nav-bar {
  position: absolute;
  top: 38px;
  left: 0;
  width: 100%;
  height: 44px;
  z-index: 100;
  background-color: var(--device-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  transition: border-color var(--transition-speed), background-color var(--transition-speed);
  opacity: 0.85;
}

.phone-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--device-text);
  background-color: var(--device-btn-bg);
  border: 1px solid var(--device-btn-border);
  box-shadow: var(--device-btn-shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.phone-nav-btn svg {
  width: 15px;
  height: 15px;
  display: block;
}

.phone-nav-btn:hover {
  transform: scale(1.05);
  background-color: var(--device-border);
  border-color: var(--device-border);
}

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

/* Feed Layout Switches */
.phone-frame[data-layout="frontpage"] .timeline-post {
  display: none;
}

.phone-frame[data-layout="timeline"] .frontpage-post {
  display: none;
}

/* Front Page Card Styles */
.frontpage-post {
  border-bottom: 1px solid var(--device-border);
  padding: 12px;
  background-color: var(--device-bg);
  text-align: left;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

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

.frontpage-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.frontpage-avatar {
  width: 18px;
  height: 18px;
  border-radius: 9px;
  background-color: var(--device-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.frontpage-topic {
  font-size: 12px;
  font-weight: 600;
  color: var(--device-text);
}

.frontpage-user-time {
  font-size: 10px;
  color: var(--device-subtext);
}

.frontpage-more {
  color: var(--device-subtext);
}

.frontpage-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--device-text);
  margin-bottom: 6px;
}

.frontpage-body {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--device-text);
  opacity: 0.9;
  margin-bottom: 10px;
}

.frontpage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.frontpage-actions-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}

.frontpage-actions {
  display: flex;
  gap: 8px;
}

.frontpage-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--device-card);
  border: 1px solid var(--device-border);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--device-text);
  cursor: pointer;
  transition: all 0.15s;
}

.frontpage-pill svg {
  width: 12px;
  height: 12px;
  fill: var(--device-subtext);
}

/* Front Page Upvote Active States */
.frontpage-vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: inherit;
}

.frontpage-vote-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.frontpage-pill.upvoted .up-arrow {
  color: #FF4500;
}

.frontpage-pill.upvoted .vote-count {
  color: #FF4500;
}

.frontpage-pill.downvoted .down-arrow {
  color: #7193FF;
}

.frontpage-pill.downvoted .vote-count {
  color: #7193FF;
}

.frontpage-share {
  background: none;
  border: none;
  cursor: pointer;
}

.frontpage-share svg {
  width: 14px;
  height: 14px;
  fill: var(--device-subtext);
}

/* Timeline Card Styles */
.timeline-post {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--device-border);
  padding: 12px;
  background-color: var(--device-bg);
  text-align: left;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.timeline-avatar-col {
  flex-shrink: 0;
}

.timeline-avatar {
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background-color: var(--device-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.timeline-content-col {
  flex: 1;
}

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

.timeline-user-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

.timeline-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--device-text);
}

.timeline-handle {
  font-size: 10px;
  color: var(--device-subtext);
}

.timeline-more {
  color: var(--device-subtext);
}

.timeline-text {
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--device-text);
  margin-bottom: 10px;
  white-space: pre-wrap;
}

.timeline-footer {
  display: flex;
  justify-content: space-between;
  padding-right: 32px;
}

.timeline-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-size: 11px;
  color: var(--device-subtext);
  cursor: pointer;
  transition: color 0.15s;
}

.timeline-action svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.timeline-action.upvoted {
  color: var(--device-primary);
}

.timeline-action.upvoted svg {
  fill: var(--device-primary);
}

.timeline-action.downvoted {
  color: var(--device-error);
}

.timeline-action.downvoted svg {
  fill: var(--device-error);
}

/* Home Indicator for iPhone mockup */
.phone-home-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background-color: var(--device-text);
  opacity: 0.8;
  border-radius: 2px;
  z-index: 10;
}

/* Features Grid Section */
.features {
  padding: 100px 0;
}

.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.features-header h2 {
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 36px;
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand-primary-rgb), 0.3);
  box-shadow: 0 10px 30px rgba(0, 122, 255, 0.05), var(--shadow-sm);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(0, 122, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon-wrapper svg {
  width: 24px;
  height: 24px;
  fill: var(--brand-primary);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

/* Privacy Manifesto Section */
.privacy {
  padding: 100px 0;
  background-color: var(--section-bg-alt);
  transition: background-color var(--transition-speed);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.privacy-card {
  background: linear-gradient(135deg, #1C1C1E 0%, #000000 100%);
  color: #FFFFFF;
  border-radius: 32px;
  padding: 60px;
  display: flex;
  align-items: center;
  gap: 60px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.privacy-badge-container {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-badge-container svg {
  width: 70px;
  height: 70px;
  fill: var(--brand-primary);
}

.privacy-content h2 {
  font-size: 34px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #FFFFFF 0%, #A2A2A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.privacy-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #A2A2A6;
  margin-bottom: 24px;
}

.privacy-highlight {
  font-weight: 600;
  color: var(--brand-primary);
}

/* Audience Use Cases Section */
.use-cases {
  padding: 100px 0;
}

.use-cases-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.use-cases-header h2 {
  margin-bottom: 16px;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.use-case-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.use-case-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background-color: rgba(88, 86, 214, 0.08);
  color: var(--brand-primary);
  border-radius: 12px;
}

.use-case-card h3 {
  font-size: 18px;
}

/* Footer & Legal Links */
footer {
  background-color: var(--bg-color);
  border-top: 1px solid var(--card-border);
  padding: 60px 0;
  font-size: 14px;
  color: var(--text-subtext);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.footer-links a {
  color: var(--text-subtext);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-color);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-title {
    font-size: 42px;
  }

  .experience-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .experience-details {
    order: -1;
    text-align: center;
  }

  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .privacy-card {
    flex-direction: column;
    text-align: center;
    padding: 40px;
    gap: 30px;
  }
}

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

  .footer-layout {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .footer-left {
    align-items: center;
  }
}

/* Legal / Policy Page Styling */
.legal-page {
  padding-top: 120px;
  padding-bottom: 80px;
  min-height: calc(100vh - 64px - 180px);
}

.legal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 48px;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.legal-title {
  font-size: 36px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-meta {
  font-size: 14px;
  color: var(--text-subtext);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 16px;
}

.legal-content h2 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-color);
}

.legal-content h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-color);
}

.legal-content p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--text-subtext);
}

.legal-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.legal-content li {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--text-subtext);
}

.legal-content strong {
  color: var(--text-color);
}

.legal-content a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.legal-content a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .legal-card {
    padding: 24px;
    border-radius: 16px;
  }

  .legal-title {
    font-size: 28px;
  }
}

/* Phone Mockup Scroll Indicator Overlay */
.phone-overlay {
  position: absolute;
  top: 82px;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.phone-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.phone-frame[data-theme="light"] .phone-overlay {
  background-color: rgba(255, 255, 255, 0.45);
}

.swipe-indicator-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #FFFFFF;
}

.phone-frame[data-theme="light"] .swipe-indicator-container {
  color: #007AFF;
}

.swipe-text {
  font-size: 12px;
  font-weight: 600;
  margin-top: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.phone-frame[data-theme="light"] .swipe-text {
  text-shadow: none;
  opacity: 0.8;
}

.swipe-hand {
  width: 40px;
  height: 40px;
  animation: swipeUpAnim 2.4s infinite ease-in-out;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.phone-frame[data-theme="light"] .swipe-hand {
  filter: drop-shadow(0 2px 4px rgba(0, 122, 255, 0.15));
}

.touch-ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: rippleAnim 2.4s infinite ease-in-out;
}

.phone-frame[data-theme="light"] .touch-ripple {
  background-color: rgba(0, 122, 255, 0.15);
  border: 1.5px solid rgba(0, 122, 255, 0.5);
}

@keyframes swipeUpAnim {
  0% {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }

  15% {
    transform: translateY(40px) scale(1);
    opacity: 1;
  }

  30% {
    transform: translateY(40px) scale(0.9);
  }

  70% {
    transform: translateY(-50px) scale(0.9);
    opacity: 1;
  }

  85% {
    transform: translateY(-50px) scale(0.95);
    opacity: 0;
  }

  100% {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }
}

@keyframes rippleAnim {

  0%,
  15% {
    transform: translate(-50%, -50%) scale(0.4) translateY(40px);
    opacity: 0;
  }

  20% {
    transform: translate(-50%, -50%) scale(0.8) translateY(40px);
    opacity: 0.8;
  }

  40% {
    transform: translate(-50%, -50%) scale(1.6) translateY(40px);
    opacity: 0;
  }

  41%,
  100% {
    opacity: 0;
  }
}

/* Phone Mockup Responsive Scale Adjustments */
@media (max-width: 450px) {
  .phone-wrapper {
    width: 314.5px; /* 370px * 0.85 */
    height: 612px;  /* 720px * 0.85 */
  }
  .phone-frame {
    transform: translate(-50%, -50%) scale(0.85);
  }
  .hero-phone {
    transform: translate(-50%, -50%) scale(0.85) rotate(2deg);
  }
}

@media (max-width: 380px) {
  .phone-wrapper {
    width: 277.5px; /* 370px * 0.75 */
    height: 540px;  /* 720px * 0.75 */
  }
  .phone-frame {
    transform: translate(-50%, -50%) scale(0.75);
  }
  .hero-phone {
    transform: translate(-50%, -50%) scale(0.75) rotate(2deg);
  }
}

@media (max-width: 330px) {
  .phone-wrapper {
    width: 240.5px; /* 370px * 0.65 */
    height: 468px;  /* 720px * 0.65 */
  }
  .phone-frame {
    transform: translate(-50%, -50%) scale(0.65);
  }
  .hero-phone {
    transform: translate(-50%, -50%) scale(0.65) rotate(2deg);
  }
}

/* StudyScroll Pro Section */
.pro-features {
  padding: 100px 0;
}

.pro-card-wrapper {
  background: linear-gradient(135deg, #000000 0%, #1C1C1E 100%);
  color: #FFFFFF;
  border-radius: 32px;
  padding: 60px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.pro-card-wrapper .section-title {
  margin-top: 10px;
  margin-bottom: 12px;
  font-size: 34px;
  background: linear-gradient(135deg, #FFFFFF 0%, #A2A2A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pro-card-wrapper .section-description {
  font-size: 18px;
  color: #A2A2A6;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pro-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.pro-feature-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pro-feature-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.pro-feature-item h4 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.pro-feature-item p {
  font-size: 15px;
  line-height: 1.5;
  color: #A2A2A6;
}

.pro-feature-item em {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .pro-card-wrapper {
    padding: 40px 20px;
  }
  .pro-card-wrapper .section-title {
    font-size: 28px;
  }
}