*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --hero-from: #4f97d3;
  --hero-mid: #2d74b0;
  --hero-to: #124f84;
  --hero-tail: #062f56;
  --accent-light: #c9ebff;
  --glass-bg: rgba(255, 255, 255, 0.13);
  --glass-border: rgba(255, 255, 255, 0.24);
  --glass-hover: rgba(255, 255, 255, 0.19);
  --text-hero: #fff;
  --text-hero-muted: rgba(255, 255, 255, 0.88);
}

@media (prefers-color-scheme: dark) {
  :root {
    --hero-from: #2f76b1;
    --hero-mid: #145b91;
    --hero-to: #093f69;
    --hero-tail: #031f38;
    --glass-bg: rgba(255, 255, 255, 0.11);
    --glass-border: rgba(255, 255, 255, 0.16);
    --glass-hover: rgba(255, 255, 255, 0.16);
  }
}

html {
  scroll-behavior: smooth;
  background: #062f56;
}

body {
  position: relative;
  isolation: isolate;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--text-hero);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(170deg, var(--hero-from) 0%, var(--hero-mid) 36%, var(--hero-to) 72%, var(--hero-tail) 100%);
}

/* ── Layout ── */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Sticky Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
  background: rgba(9, 63, 105, 0.5);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(5, 30, 53, 0.16);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
  text-decoration: none;
}

.site-header.scrolled .header-brand {
  opacity: 1;
}

.header-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.header-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-hero);
}

/* ── Language Picker ── */

.lang-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lang-option:hover {
  color: #fff;
  background: var(--glass-hover);
}

.lang-option.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.lang-option:active {
  transform: scale(0.97);
}

.lang-option:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

/* ── Hero ── */

.hero {
  position: relative;
  padding: 8rem 0 4rem;
  text-align: center;
  overflow: hidden;
  min-height: clamp(720px, 88vh, 980px);
  min-height: clamp(720px, 88dvh, 980px);
  display: flex;
  align-items: center;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(20rem, 40vw, 40rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  line-height: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 320px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.hero-media {
  width: min(100%, 560px);
  justify-self: end;
}

/* ── Hero Icon ── */

.hero-icon-wrap {
  display: inline-block;
  padding: 10px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 1.5rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-icon {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 18px;
}

.hero-title-row .hero-icon-wrap {
  margin-bottom: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.hero-title-row .hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: #fff;
}

.hero-title-row h1 {
  margin-bottom: 0;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-hero-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-copy .tagline {
  margin-left: 0;
  margin-right: 0;
}

.hero-video-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 0.75rem;
}

/* ── Hero Buttons ── */

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-copy .hero-buttons,
.hero-actions .hero-buttons {
  justify-content: flex-start;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: fit-content;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #fff;
  color: var(--hero-tail);
  border: 1px solid rgba(6, 47, 86, 0.14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: #f5f9ff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Hero GitHub Link ── */

.hero-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.hero-github:hover {
  color: rgba(255, 255, 255, 0.9);
}

.hero-github svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Features ── */

.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.feature-card:hover {
  background: var(--glass-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
}

.feature-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: #fff;
  font-weight: 600;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-hero-muted);
  line-height: 1.5;
}

.video-wrap {
  max-width: 100%;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(4, 24, 44, 0.2);
  box-shadow: 0 24px 40px rgba(6, 28, 52, 0.16);
}

.video-wrap video {
  display: block;
  width: 100%;
  border-radius: 20px;
  background: rgba(4, 24, 44, 0.45);
}

.hero-video-wrap video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: pointer;
}

.hero-video-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.video-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.video-toggle:hover {
  background: var(--glass-hover);
}

.video-toggle:active {
  transform: scale(0.97);
}

.video-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

/* ── Footer ── */

.footer {
  padding: 2.5rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

/* ── Scroll Reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.feature-card.reveal:nth-child(1) { transition-delay: 0s; }
.feature-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.feature-card.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ── Privacy Page ── */

.privacy-layout {
  display: flex;
  flex-direction: column;
}

.privacy-layout .privacy-content {
  flex: 1;
}

.privacy-content {
  max-width: 720px;
  margin: 6rem auto 2.5rem;
  padding: 0 1.5rem;
}

.privacy-layout:not(.liyanna-theme) .privacy-content {
  padding-top: 0;
  padding-bottom: 0;
}

.privacy-content h1 {
  font-size: 1.9rem;
  margin-bottom: 1.75rem;
  color: #fff;
}

.privacy-content h2 {
  font-size: 1.1rem;
  margin-top: 1.85rem;
  margin-bottom: 0.55rem;
  color: #fff;
}

.privacy-content p {
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.7;
  font-size: 1rem;
}

.privacy-content p + p {
  margin-top: 0.6rem;
}

.privacy-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.privacy-back:hover {
  text-decoration: underline;
}

/* ── Liyanna Purple Theme ── */

.liyanna-theme {
  --hero-from: #6A1B9A;
  --hero-mid: #55207f;
  --hero-to: #38006b;
  --hero-tail: #1a0033;
  --accent-light: #CE93D8;
  --glass-border: rgba(160, 80, 200, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.14);
  background: linear-gradient(170deg, var(--hero-from) 0%, var(--hero-mid) 36%, var(--hero-to) 72%, var(--hero-tail) 100%);
}

.liyanna-theme .hero {
  min-height: 0;
  display: block;
  padding: 7.25rem 0 3.25rem;
}

.liyanna-theme .hero-content {
  max-width: 760px;
}

.liyanna-theme .hero .tagline {
  max-width: 680px;
}

.liyanna-theme .site-header.scrolled {
  background: rgba(40, 0, 60, 0.7);
}

@media (prefers-color-scheme: dark) {
  .liyanna-theme {
    --hero-from: #4A148C;
    --hero-mid: #2f0d63;
    --hero-to: #1a0033;
    --hero-tail: #0d001a;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(160, 80, 200, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.1);
    background: linear-gradient(170deg, var(--hero-from) 0%, var(--hero-mid) 36%, var(--hero-to) 72%, var(--hero-tail) 100%);
  }

  .liyanna-theme .site-header.scrolled {
    background: rgba(20, 0, 30, 0.7);
  }
}

/* ── Hero Subtitle ── */

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-hero-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Store Badge ── */

.store-badge-link {
  display: inline-block;
  transition: transform 0.15s, opacity 0.2s;
}

.store-badge-link:hover {
  transform: scale(1.03);
}

.store-badge-link:active {
  transform: scale(0.97);
}

.store-badge {
  height: 52px;
  width: auto;
}

/* ── Screenshot Gallery ── */

.screenshots {
  padding: 2rem 0 4rem;
}

.screenshots h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.screenshot-gallery {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ── Liyanna Features Grid ── */

.liyanna-features-grid {
  grid-template-columns: repeat(3, 1fr);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 1280px) {
  .hero-content {
    max-width: 1180px;
  }

  .hero-layout {
    grid-template-columns: minmax(320px, 360px) minmax(620px, 760px);
    justify-content: center;
    gap: 2.5rem;
  }

  .hero-copy {
    max-width: 360px;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

  .hero-title-row .hero-icon {
    width: 82px;
    height: 82px;
    border-radius: 18px;
  }

  .hero .tagline {
    font-size: 1.32rem;
  }

  .hero-media {
    width: 100%;
    max-width: 760px;
    justify-self: stretch;
  }

  .hero-video-wrap {
    width: 100%;
    max-width: 760px;
  }
}

@media (min-width: 961px) and (max-width: 1279px) {
  .hero-content {
    max-width: 1100px;
  }

  .hero-layout {
    grid-template-columns: minmax(280px, 320px) minmax(540px, 620px);
    justify-content: center;
    gap: 2rem;
  }

  .hero-copy {
    max-width: 320px;
  }

  .hero h1 {
    font-size: 3.15rem;
  }

  .hero .tagline {
    font-size: 1.18rem;
  }

  .hero-media {
    width: 100%;
    max-width: 620px;
    justify-self: stretch;
  }

  .hero-video-wrap {
    width: 100%;
    max-width: 620px;
  }
}

@media (min-width: 1400px) {
  .hero-content {
    max-width: 1280px;
  }

  .hero-layout {
    grid-template-columns: minmax(320px, 380px) minmax(680px, 820px);
    gap: 3rem;
  }

  .hero-copy {
    max-width: 380px;
  }

  .hero h1 {
    font-size: 3.6rem;
  }

  .hero-title-row .hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .hero-media {
    max-width: 820px;
  }

  .hero-video-wrap {
    max-width: 820px;
  }
}

@media (min-width: 821px) and (max-width: 960px) {
  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding: 7rem 0 3.5rem;
    min-height: 0;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
  }

  .hero-title-row {
    justify-content: center;
  }

  .hero h1 {
    font-size: 2.85rem;
  }

  .hero .tagline {
    font-size: 1.16rem;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-title-row .hero-icon {
    width: 64px;
    height: 64px;
  }

  .hero-media {
    width: min(100%, 700px);
    justify-self: center;
  }

  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }

  .feature-card h3 {
    font-size: 1rem;
  }

  .feature-card p {
    font-size: 0.86rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-video-label {
    text-align: center;
  }

  .hero-video-actions {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
  }

  .hero-title-row {
    justify-content: center;
  }

  .hero .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-media {
    width: min(100%, 640px);
    justify-self: center;
  }

  .hero-video-label {
    text-align: center;
  }

  .hero-video-actions {
    justify-content: center;
  }
}

/* ── Cross Link ── */

.cross-link {
  padding: 2rem 0;
  text-align: center;
}

.cross-link p {
  color: var(--text-hero-muted);
  font-size: 0.95rem;
}

.cross-link a {
  color: var(--accent-light);
  text-decoration: none;
}

.cross-link a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero {
    padding: 6rem 0 3rem;
    min-height: 0;
  }

  .hero-copy {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .hero-title-row {
    justify-content: center;
    gap: 0.75rem;
  }

  .hero-title-row .hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.05rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .hero-actions {
    align-items: center;
    width: 100%;
  }

  .hero-media {
    width: 100%;
  }

  .hero-video-label {
    text-align: center;
  }

  .hero-video-actions {
    justify-content: center;
  }

  .privacy-layout:not(.liyanna-theme) .privacy-content {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }

  .features {
    padding: 3rem 0;
  }

  .hero-watermark {
    font-size: 14rem;
  }

  .screenshot-gallery {
    flex-direction: column;
    align-items: center;
  }

  .store-badge {
    height: 44px;
  }

  .liyanna-features-grid {
    grid-template-columns: 1fr;
  }

  .lang-picker {
    gap: 0.35rem;
  }

  .lang-option {
    min-width: 70px;
    padding: 0.58rem 0.85rem;
  }

  .liyanna-theme .hero {
    padding: 6rem 0 2.5rem;
  }
}
