/* ===== Qur'an Quest — Product Page Stylesheet ===== */

:root {
  --bg: #080b09;
  --bg-elevated: #0d110f;
  --surface: rgba(15, 20, 17, 0.82);
  --surface-hover: rgba(20, 26, 22, 0.92);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(199, 161, 94, 0.2);
  --text: #f0ece3;
  --text-secondary: #a8a196;
  --text-tertiary: #7a756d;
  --accent: #c9a55c;
  --accent-muted: rgba(199, 161, 94, 0.12);
  --accent-strong: #d4b370;
  --green-deep: #1a3028;
  --green-muted: rgba(37, 67, 56, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.36);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --max-w: 1120px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(199, 161, 94, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 15% 10%, rgba(37, 67, 56, 0.1) 0%, transparent 70%);
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ===== Layout ===== */

.wrap {
  position: relative;
  z-index: 1;
}

.container {
  width: min(calc(100% - 40px), var(--max-w));
  margin: 0 auto;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: rgba(8, 11, 9, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  white-space: normal;
  text-align: center;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

/* Hamburger */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  margin-left: auto;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

/* Dropdowns (portfolio + language) */
.dropdown-wrap {
  position: relative;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: normal;
  text-align: center;
}

.dropdown-trigger:hover,
.dropdown-trigger:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

.dropdown-trigger svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(13, 17, 15, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 50;
}

.dropdown-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Portfolio dropdown */
.portfolio-list {
  display: grid;
  gap: 2px;
}

.portfolio-link {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color 0.15s, background 0.15s;
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

/* Language dropdown */
.lang-panel {
  width: min(400px, 88vw);
  padding: 16px;
}

.lang-panel-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  cursor: default;
}

.lang-option:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.lang-option.active {
  color: var(--text);
  background: var(--accent-muted);
  border-color: rgba(199, 161, 94, 0.15);
}

.lang-option.dimmed {
  opacity: 0.72;
}

.lang-code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  min-width: 28px;
}

.lang-grid::-webkit-scrollbar {
  width: 6px;
}

.lang-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.lang-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

/* Nav CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: #0e0c07;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 4px 16px rgba(199, 161, 94, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: normal;
  text-align: center;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(199, 161, 94, 0.28);
  outline: none;
}

/* ===== Hero ===== */

.hero {
  padding: 80px 0 60px;
}

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

.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-muted);
  border: 1px solid rgba(199, 161, 94, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.6rem, 4.8vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-sub {
  margin-top: 18px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: #0e0c07;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 6px 24px rgba(199, 161, 94, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: normal;
  text-align: center;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(199, 161, 94, 0.3);
  outline: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
  white-space: normal;
  text-align: center;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.12);
  outline: none;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
}

.badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* Hero image card */
.hero-visual {
  position: relative;
}

.hero-img-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
}

.hero-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

/* ===== Features ===== */

.features {
  padding: 48px 0 56px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.features-heading {
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.features-sub {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 50ch;
  line-height: 1.65;
}

.features-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--surface-hover);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--green-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--accent-strong);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card h3 {
  margin-top: 18px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.feature-card p {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== CTA Band ===== */

.cta-section {
  padding: 16px 0 64px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(37, 67, 56, 0.2) 0%, rgba(199, 161, 94, 0.06) 100%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.cta-band h2 {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.cta-band p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 44ch;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ===== Expanded Sections ===== */

.section {
  padding: 20px 0 56px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 32px;
}

.hero-grid-updated {
  align-items: start;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.floating-note {
  position: absolute;
  display: grid;
  gap: 4px;
  max-width: 220px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

.floating-note strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.floating-note span {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.floating-note-top {
  top: 18px;
  left: -22px;
}

.floating-note-right {
  right: -24px;
  top: 34%;
}

.floating-note-bottom {
  left: 24px;
  bottom: -20px;
}

.metrics-shell {
  margin-top: 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.metric-value {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.metric-label {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-grid-enhanced .feature-card {
  min-height: 100%;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.story-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(199, 161, 94, 0.05) 0%, transparent 100%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.story-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.story-card h3 {
  margin-top: 18px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.story-card p {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.dual-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.panel-copy,
.panel-list {
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-list {
  display: grid;
  gap: 14px;
}

.panel-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-item h3 {
  font-size: 0.98rem;
  line-height: 1.35;
}

.panel-item p {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.trust-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(199, 161, 94, 0.1), transparent 38%),
    linear-gradient(135deg, rgba(37, 67, 56, 0.18) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.trust-copy h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.trust-copy p {
  margin-top: 14px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.trust-list {
  display: grid;
  gap: 14px;
}

.trust-item {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 12, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-item h3 {
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--text);
}

.trust-item p {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Footer ===== */

.site-footer {
  padding: 0 0 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

.footer-inner a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ===== Animations ===== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.visible {
  animation: fadeUp 0.6s ease forwards;
}

.reveal.d1 { animation-delay: 0.06s; }
.reveal.d2 { animation-delay: 0.12s; }
.reveal.d3 { animation-delay: 0.18s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Reduced Motion ===== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive: Tablet ===== */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero {
    padding-top: 56px;
  }

  .features-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid,
  .story-grid,
  .dual-panel,
  .trust-panel {
    grid-template-columns: 1fr 1fr;
  }

  .dual-panel,
  .trust-panel {
    align-items: start;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .floating-note-top,
  .floating-note-right,
  .floating-note-bottom {
    position: static;
    max-width: none;
  }

  .hero-visual {
    display: grid;
    gap: 12px;
  }
}

/* ===== Responsive: Mobile ===== */

@media (max-width: 720px) {
  .nav-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
    padding-top: 12px;
    gap: 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .dropdown-panel {
    left: 0;
    right: auto;
  }

  .lang-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .story-grid,
  .dual-panel,
  .trust-panel {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .cta-band {
    padding: 28px 24px;
  }

  .cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .cta-actions .btn-primary,
  .cta-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  .panel-copy,
  .panel-list,
  .trust-panel {
    padding: 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer-links {
    gap: 16px;
  }
}
