:root {
  --bg: #f5f7fb;
  --bg-muted: #eef1f7;
  --bg-contact: #0f172a;
  --panel: #ffffff;
  --border: #dde2ee;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-strong: #1d4ed8;
  --text: #111827;
  --text-muted: #6b7280;
  --text-inverse: #f9fafb;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.16);
  --shadow-subtle: 0 8px 20px rgba(15, 23, 42, 0.08);
  --max-width: 1120px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #e2e8f0 0, #f9fafb 40%, #eef2ff 100%);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-contact {
  background: var(--bg-contact);
  color: var(--text-inverse);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.78));
  color: var(--text-inverse);
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 0.75rem 1.5rem;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  max-width: 120px;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-logo {
  height: 40px;
  width: auto;
  max-width: 120px;
  max-height: 40px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand img {
  max-height: 40px;
  height: 40px;
  width: auto;
  max-width: 120px;
}

.brand > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  max-width: none;
}

.brand-right > a {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.75rem;
}

.brand-right .nav-cta {
  margin: 0;
}

.brand-right .nav-signin {
  margin: 0;
}

.brand-right img {
  max-height: 40px;
  height: 40px;
  width: auto;
  max-width: 120px;
}

.brand-right .header-bell-icon {
  display: inline-block !important;
  flex-shrink: 0;
}

.brand-right .header-bell-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
}

.site-brand-text {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  display: block;
}

@media (max-width: 767px) {
  .site-brand-text {
    display: none; /* Hide brand text on mobile to match app behavior */
  }
}

/* Mobile Menu Toggle */
.site-header-menu-toggle {
  display: none; /* Hidden on desktop by default */
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
  line-height: 1;
  z-index: 1001;
  position: relative;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.site-header-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-header-menu-toggle .menu-icon {
  display: block;
  font-size: 1.5rem;
}

.logo-placeholder {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 1.3rem;
  font-size: 0.9rem;
  justify-content: center;
  align-items: center;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  position: relative;
  padding-bottom: 0.1rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12rem;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #38bdf8, #22c55e);
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a.nav-active {
  color: #ffffff;
  font-weight: 600;
}

.main-nav a.nav-active::after {
  width: 100%;
}

/* Desktop Dropdown Menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  padding-bottom: 0.1rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  transition: color 0.2s ease;
}

.nav-dropdown-toggle:hover {
  color: #ffffff;
}

.nav-dropdown-toggle::after {
  display: none;
}

.nav-dropdown-toggle .dropdown-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  min-width: 180px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  pointer-events: none;
}

.nav-dropdown-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: block;
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-dropdown-menu a.nav-active {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.nav-cta {
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.nav-cta--desktop {
  margin-left: 0;
  white-space: nowrap;
}

.nav-cta--mobile {
  display: none;
}

.main-nav .nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Sign in button */
.nav-signin {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-block;
  white-space: nowrap;
}

.nav-signin:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-signin--desktop {
  display: inline-block;
}

.nav-signin--mobile {
  display: none;
}

/* Secondary nav link (for "Get updates") */
.nav-link--secondary {
  color: #9ca3af;
  font-weight: 400;
  font-size: 0.85rem;
}

.nav-link--secondary:hover {
  color: #e5e7eb;
}

.nav-link--desktop {
  display: inline-block;
}

@media (max-width: 768px) {
  .nav-link--desktop {
    display: none;
  }
}

/* Header bell icon button */
.header-bell-icon {
  display: inline-block !important;
  flex-shrink: 0;
  transition: transform 0.1s;
  margin-right: 0.25rem;
  line-height: 0;
  vertical-align: middle;
  overflow: visible;
  text-decoration: none;
}

.header-bell-icon:hover {
  transform: translateY(-1px);
}

.header-bell-icon:active {
  transform: translateY(0);
}

.header-bell-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
  vertical-align: top;
}

/* Header app icon button */
.header-app-icon {
  display: inline-block !important;
  flex-shrink: 0;
  transition: transform 0.1s;
  margin-right: 0.25rem;
  line-height: 0;
  vertical-align: middle;
  overflow: visible;
  text-decoration: none;
}

.header-app-icon:hover {
  transform: translateY(-1px);
}

.header-app-icon:active {
  transform: translateY(0);
}

.header-app-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
  vertical-align: top;
}

.brand-right .header-app-icon {
  display: inline-block !important;
  flex-shrink: 0;
}

/* Header language icon button */
.header-lang-icon {
  display: inline-block !important;
  flex-shrink: 0;
  transition: transform 0.1s;
  margin-right: 0.25rem;
  line-height: 0;
  vertical-align: middle;
  overflow: visible;
  text-decoration: none;
}

.header-lang-icon:hover {
  transform: translateY(-1px);
}

.header-lang-icon:active {
  transform: translateY(0);
}

.header-lang-icon svg {
  width: 40px;
  height: 40px;
  display: block;
  flex-shrink: 0;
  vertical-align: top;
}

.brand-right .header-lang-icon {
  display: inline-block !important;
  flex-shrink: 0;
}

/* Mobile icons container - centered in header */
.header-icons-mobile {
  display: none !important;
}

@media (min-width: 769px) {
  .header-app-icon--mobile,
  .header-lang-icon--mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .brand-right .header-app-icon:not(.header-app-icon--mobile) {
    display: none !important;
  }
  
  .brand-right .header-bell-icon:not(.header-bell-icon--mobile) {
    display: none !important;
  }
  
  .brand-right .fal-lang-button {
    display: none !important;
  }
  
  .header-icons-mobile {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }
  
  .header-bell-icon--mobile,
  .header-app-icon--mobile,
  .header-lang-icon--mobile {
    display: inline-block !important;
    margin: 0;
    line-height: 0;
    vertical-align: middle;
  }
  
  .header-lang-icon--mobile svg {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
    vertical-align: top;
  }
}

.hero-cta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 0;
  width: 100%;
}

.nav-cta--hero {
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

@media (max-width: 767px) {
  .nav-cta--hero {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
  }
}

/* Shared CTA Block (used across marketing pages) */
.cta-block {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
  box-shadow: var(--shadow-subtle);
}

.cta-block-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.cta-block-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

.cta-block-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-block-buttons .btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.2s ease;
  display: inline-block;
}

.cta-block-buttons .btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.cta-block-buttons .btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cta-block-buttons .btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.cta-block-buttons .btn-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
}

@media (max-width: 767px) {
  .cta-block {
    padding: 2rem 1.5rem;
    margin: 3rem 0;
  }

  .cta-block-title {
    font-size: 1.5rem;
  }

  .cta-block-subtitle {
    font-size: 1rem;
  }

  .cta-block-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-block-buttons .btn {
    width: 100%;
  }
}

/* Hero */

.hero {
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 36rem;
  line-height: 1.7;
}

.hero-built-on {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.hero-status {
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px dashed rgba(37, 99, 235, 0.4);
  font-size: 0.9rem;
}

.status-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.status-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-mockup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  position: absolute;
  inset: 14px;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  position: absolute;
  inset: 14px;
  z-index: 0;
  cursor: pointer;
}

.hero-video-frame {
  cursor: pointer;
}

.hero-mockup-frame img[style*="display: none"] {
  display: none !important;
}

.hero-mockup-frame:has(img:not([style*="display: none"])) .hero-mockup-label {
  display: none;
}

.hero-video-frame:has(video) .hero-mockup-label {
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.hero-video-frame:hover .hero-mockup-label {
  opacity: 1;
  background: rgba(15, 23, 42, 0.9);
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-mockup-frame {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 10;
  border-radius: 26px;
  background: radial-gradient(circle at top, #1e293b, #020617);
  box-shadow: var(--shadow-soft);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-mockup-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 40%);
}

.hero-mockup-label {
  position: relative;
  z-index: 1;
  margin-bottom: 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.78);
  color: #e5e7eb;
  font-size: 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

/* Sections */

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.section-content {
  margin-bottom: 3rem;
}

.section-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.section-content h2:first-child {
  margin-top: 0;
}

/* Add spacing when section-content follows features-list */
.features-list + .section-content {
  margin-top: 3rem;
}

.features-list + .section-content h2:first-child {
  margin-top: 0;
}

/* Add spacing when section-content follows feature-grid */
.feature-grid + .section-content {
  margin-top: 3rem;
}

.feature-grid + .section-content h2:first-child {
  margin-top: 0;
}

.section-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-content ul,
.section-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.section-content li {
  margin: 0.5rem 0;
}

.section-content p {
  margin: 1rem 0;
  line-height: 1.7;
}

.section-content a {
  color: var(--accent);
  text-decoration: none;
}

.section-content a:hover {
  text-decoration: underline;
}

.team-card ul {
  margin-top: 1rem;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.team-card li {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: stretch;
}

.section-media {
  display: flex;
  align-items: stretch;
}

.section-media .image-card {
  width: 100%;
  height: 100%;
}

/* Image cards / placeholders */

.image-card.placeholder,
.avatar.placeholder {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.15),
      rgba(148, 163, 184, 0.15) 8px,
      transparent 8px,
      transparent 16px
    ),
    #0f172a;
  color: #cbd5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

/* Physical books carousel - appropriate size */
.section-media .image-card.placeholder.physical-books-carousel {
  min-height: 300px;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 400px;
  width: 100%;
}

.image-card.placeholder img,
.avatar.placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show images that don't have display: none in style attribute */
.image-card.placeholder:has(img:not([style*="display: none"])),
.avatar.placeholder:has(img:not([style*="display: none"])) {
  border: none;
  background: transparent;
}

.image-card.placeholder:has(img:not([style*="display: none"])) img:not(.ebook-viewer-img):not(.game-img):not(.library-img):not(.physical-book-img),
.avatar.placeholder:has(img:not([style*="display: none"])) img {
  opacity: 1;
  z-index: 1;
}

.image-card.placeholder:has(img:not([style*="display: none"])) span,
.avatar.placeholder:has(img:not([style*="display: none"])) span {
  display: none;
}

/* Also handle images with display: block */
.image-card.placeholder:has(img[style*="display: block"]),
.avatar.placeholder:has(img[style*="display: block"]) {
  border: none;
  background: transparent;
}

.image-card.placeholder:has(img[style*="display: block"]) img:not(.ebook-viewer-img):not(.game-img):not(.library-img):not(.physical-book-img),
.avatar.placeholder:has(img[style*="display: block"]) img {
  opacity: 1;
  z-index: 1;
}

.image-card.placeholder:has(img[style*="display: block"]) span,
.avatar.placeholder:has(img[style*="display: block"]) span {
  display: none;
}

/* Fallback: if image exists and is loaded, show it (but exclude carousel images) */
.image-card.placeholder img[src]:not([style*="display: none"]):not(.ebook-viewer-img):not(.game-img):not(.library-img):not(.physical-book-img),
.avatar.placeholder img[src]:not([style*="display: none"]) {
  opacity: 1;
  z-index: 1;
}

.image-card.placeholder:has(img[src]:not([style*="display: none"]):not(.ebook-viewer-img):not(.game-img):not(.library-img):not(.physical-book-img)),
.avatar.placeholder:has(img[src]:not([style*="display: none"])) {
  border: none;
  background: transparent;
}

.image-card.placeholder:has(img[src]:not([style*="display: none"]):not(.ebook-viewer-img):not(.game-img):not(.library-img):not(.physical-book-img)) span,
.avatar.placeholder:has(img[src]:not([style*="display: none"])) span {
  display: none;
}

/* Product cards */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(148, 163, 184, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.product-card .image-card {
  height: 220px;
  margin-bottom: 0.9rem;
  position: relative;
  overflow: hidden;
}

.product-card .image-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.product-card .image-card img.active {
  opacity: 1;
  z-index: 1;
}

.product-card .image-card.library-carousel img.library-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.product-card .image-card.library-carousel img.library-img.active {
  opacity: 1;
  z-index: 1;
}

/* Physical books carousel */
.physical-books-carousel img.physical-book-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  background: #f5f7fb;
}

.physical-books-carousel img.physical-book-img.active {
  opacity: 1;
  z-index: 1;
}

.product-card .image-card:has(img.active) {
  border: none;
  background: transparent;
}

.product-card .image-card:has(img.active) span {
  display: none;
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.product-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature-card {
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.feature-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.feature-card a:hover {
  text-decoration: underline;
}

/* Roadmap */

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid rgba(148, 163, 184, 0.8);
}

.roadmap-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1.7rem;
}

.roadmap-list li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.roadmap-list h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.roadmap-list p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.roadmap-item--complete::before {
  background: #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2) !important;
}

.roadmap-item--current::before {
  background: #f59e0b !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2) !important;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Features List */

.features-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--panel);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.feature-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Screenshots */

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem;
  margin-bottom: 1rem;
}

.screenshot-card {
  margin: 0;
  background: var(--panel);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(148, 163, 184, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.screenshot-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text);
}

.screenshot-description {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  color: var(--text-muted);
}

.screenshot-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.screenshot-card .screenshot-placeholder {
  margin-top: auto;
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  background: repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.15),
      rgba(148, 163, 184, 0.15) 8px,
      transparent 8px,
      transparent 16px
    ),
    #0f172a;
  color: #cbd5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  position: relative;
  overflow: hidden;
}

.screenshot-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.screenshot-placeholder img.active {
  opacity: 1;
  z-index: 1;
}

/* Mobile screenshots should fit without cropping to show actual phone appearance */
.mobile-screenshot-carousel img.mobile-screenshot-img,
.screenshot-placeholder.mobile-screenshot-carousel img {
  object-fit: contain !important;
  background: #f5f7fb;
}

.screenshot-placeholder:has(img:not([style*="display: none"])) {
  border: none;
  background: transparent;
}

.screenshot-placeholder:has(img:not([style*="display: none"])) img:not(.library-screenshot-img):not(.ebook-viewer-screenshot-img):not(.game-screenshot-img):not(.mobile-screenshot-img) {
  opacity: 1;
  z-index: 1;
}

.screenshot-placeholder:has(img:not([style*="display: none"])) span {
  display: none;
}

.screenshot-placeholder:has(img[style*="display: block"]) {
  border: none;
  background: transparent;
}

.screenshot-placeholder:has(img[style*="display: block"]) img:not(.library-screenshot-img):not(.ebook-viewer-screenshot-img):not(.game-screenshot-img):not(.mobile-screenshot-img) {
  opacity: 1;
  z-index: 1;
}

.screenshot-placeholder:has(img[style*="display: block"]) span {
  display: none;
}

/* Fallback: if image exists and is loaded, show it (but exclude carousel images) */
.screenshot-placeholder img[src]:not([style*="display: none"]):not(.library-screenshot-img):not(.ebook-viewer-screenshot-img):not(.game-screenshot-img):not(.mobile-screenshot-img) {
  opacity: 1;
  z-index: 1;
}

.screenshot-placeholder:has(img[src]:not([style*="display: none"])) {
  border: none;
  background: transparent;
}

.screenshot-placeholder:has(img[src]:not([style*="display: none"])) span {
  display: none;
}

.screenshot-card figcaption {
  padding: 0.75rem 0 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

.video-section {
  margin-top: 3rem;
}

.video-demo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  background: #000;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.video-demo video {
  width: 100%;
  height: auto;
  display: block;
  max-height: 75vh;
}

/* Fullscreen video styling - ensures video fills screen properly */
video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen,
video:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  object-fit: contain;
  background: #000;
}

/* Pilots */

.pilots-placeholder {
  text-align: center;
  padding: 2rem;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.5);
}

.pilots-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.pilots-note a {
  color: var(--accent);
  text-decoration: none;
}

.pilots-note a:hover {
  text-decoration: underline;
}

/* Markets */

.markets-split {
  align-items: flex-start;
}

.bullet-list {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-subtle);
}

.avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  min-height: 200px;
}

.team-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.team-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Contact */

.section-contact .section-lead {
  color: rgba(226, 232, 240, 0.9);
}

.contact-built-on {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.8);
  font-style: italic;
  text-align: center;
}

.contact-card {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.5);
  max-width: 32rem;
}

.contact-card a {
  color: #38bdf8;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  background: #020617;
  color: #9ca3af;
  padding: 1.8rem 0 1.9rem;
  font-size: 0.85rem;
}

.footer-inner {
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  height: 32px;
  width: auto;
  max-width: 100px;
  max-height: 32px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  display: block;
}

.footer-logo:hover {
  opacity: 1;
}

.footer-logo-books {
  max-width: 100px;
  max-height: 32px;
}

.footer-logo-digital {
  max-width: 100px;
  max-height: 32px;
}

.footer-brand {
  color: #e5e7eb;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.footer-meta {
  margin: 0.15rem 0;
}

.footer-copy {
  margin-top: 0.5rem;
  color: #6b7280;
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

.footer-social-link svg {
  width: 20px;
  height: 20px;
}

.site-footer a {
  color: #60a5fa;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Pricing Tables */

.pricing-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  margin: 0;
}

.pricing-table thead {
  background: var(--bg-muted);
}

.pricing-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 2px solid var(--border);
}

.pricing-table th:first-child {
  border-top-left-radius: var(--radius-md);
}

.pricing-table th:last-child {
  border-top-right-radius: var(--radius-md);
}

.pricing-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}

.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table tbody tr:hover {
  background: var(--bg-muted);
}

.pricing-table .tier-label {
  font-weight: 600;
  color: var(--accent);
}

.pricing-table .price {
  font-weight: 600;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
}

.pricing-table .price-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pricing-table .price-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.pricing-table .price-discount {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.pricing-table .book-list {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.example-totals-table .price-final {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
}

.example-totals-table .price-per-month {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 767px) {
  .pricing-table {
    font-size: 0.85rem;
  }
  
  .pricing-table th,
  .pricing-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .pricing-table th:not(:first-child),
  .pricing-table td:not(:first-child) {
    text-align: right;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: -1;
    margin-bottom: 1.6rem;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-grid,
  .feature-grid,
  .team-grid,
  .features-list,
  .screenshots-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header-menu-toggle {
    display: flex !important;
  }

  .main-nav {
    display: none; /* Hidden by default on mobile */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
  }

  .main-nav.is-open {
    display: flex;
  }

  /* Hide desktop dropdown button on mobile - show all links instead */
  .nav-dropdown-toggle {
    display: none !important;
  }

  /* Make dropdown container transparent on mobile - links appear inline */
  .nav-dropdown {
    display: contents !important; /* Makes dropdown disappear, children become direct nav children */
  }

  /* Show dropdown menu links as regular menu items on mobile - part of same list */
  .nav-dropdown-menu {
    position: static !important;
    display: contents !important; /* Also use contents so links become direct children of nav */
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: auto !important;
    pointer-events: auto !important;
    margin: 0 !important;
  }

  /* All nav links styled the same on mobile */
  .main-nav > a,
  .main-nav .nav-dropdown-menu a {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    width: 100%;
    display: block;
    text-align: left;
  }

  /* Sign in button in mobile menu - at the end */
  .main-nav .nav-signin--mobile {
    display: block !important;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    width: 100%;
    text-align: left;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0;
  }

  .main-nav .nav-signin--mobile:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav .nav-cta {
    margin: 0.5rem 1.5rem;
    width: auto;
    text-align: center;
  }

  .nav-cta--desktop {
    display: none;
  }

  .nav-cta--mobile {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand {
    display: flex !important; /* Show left logo on mobile */
    align-items: center;
    flex-shrink: 0;
  }

  .brand-right {
    display: none !important; /* Hide right logo on mobile */
  }

  .header-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 0.75rem;
    min-height: 56px;
  }

  .site-header-menu-toggle {
    flex-shrink: 0;
    order: 3;
  }

  .header-icons-mobile {
    order: 2;
    flex: 1;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }

  .header-bell-icon--mobile,
  .header-app-icon--mobile,
  .header-lang-icon--mobile {
    display: inline-block !important;
    margin: 0;
    line-height: 0;
    vertical-align: middle;
  }
  
  .header-lang-icon--mobile svg {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
    vertical-align: top;
  }

  .nav-cta--mobile {
    flex: 1;
    text-align: center;
    margin: 0;
    order: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand {
    order: 1;
    flex-shrink: 0;
  }
}
