/* ============================================
   Royal Blush — royalblush.myoha.com
   ============================================ */

:root {
  --color-bg: #0a0612;
  --color-surface: #140e22;
  --color-surface-hover: #1c1330;
  --color-primary: #a855f7;
  --color-primary-hover: #c084fc;
  --color-accent: #ec4899;
  --color-text: #f4f0f7;
  --color-text-muted: #9e95ad;
  --color-border: rgba(168, 85, 247, 0.1);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --max-width: 1080px;
  --header-height: 60px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition: 200ms ease;
}

/* ---- Reset ---- */

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

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Tiled background pattern with waterfall animation */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("assets/Menu_background_pattern.png");
  background-repeat: repeat;
  background-size: 320px auto;
  opacity: 0.18;
  pointer-events: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Typography ---- */

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.2rem;
}

/* ---- Layout ---- */

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

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 6, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* REPLACE: Update logo image path once you have the real file */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.logo img {
  height: 30px;
  width: auto;
  filter: invert(1);
}

.logo-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ---- Navigation ---- */

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-text);
}

/* Hamburger toggle */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Icon swap via aria-expanded */
.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ---- Mobile navigation ---- */

@media (max-width: 640px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 6, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: var(--space-xs) var(--space-md) var(--space-md);
    gap: 0;
    border-bottom: 1px solid var(--color-border);
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: var(--space-lg) 0 var(--space-md);
  text-align: center;
  overflow: hidden;
}

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

.hero-title {
  margin-bottom: var(--space-xs);
}

.hero-logo {
  max-width: 280px;
  height: auto;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .hero-logo {
    max-width: 200px;
  }
}

/* REPLACE: Update tagline text */
.hero-subtitle {
  color: var(--color-text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---- Buttons ---- */

/* REPLACE: Update CTA link / label when App Store URL is available */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition),
    box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.25);
}

/* ---- Sections ---- */

.section {
  padding: var(--space-lg) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
}

/* ---- About ---- */

.about-body {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-sm);
}

.about-body p {
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.7;
}

/* ---- Screenshots ---- */

/* REPLACE: Add or remove screenshot items as needed (up to 6) */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-width: 840px;
  margin: 0 auto;
}

.screenshot-item {
  aspect-ratio: 9 / 19.5;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.screenshot-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.12);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder state — shows when image hasn't loaded */
.screenshot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 480px;
  }
}

@media (max-width: 440px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
    max-width: 240px;
  }
}

/* ---- Footer ---- */

.site-footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  list-style: none;
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  opacity: 0.6;
}

/* ---- Content pages (privacy, support) ---- */

.content-page {
  padding: var(--space-2xl) 0 var(--space-xl);
  min-height: 60vh;
}

.content-page h1 {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.content-body {
  max-width: 680px;
  margin: 0 auto;
}

.content-body h2 {
  font-size: 1.2rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.content-body h3 {
  font-size: 1.05rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
}

.content-body p {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}

.content-body ul {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0 0 var(--space-sm) var(--space-md);
}

.content-body a {
  color: var(--color-primary);
}

.content-body a:hover {
  color: var(--color-primary-hover);
}

/* Support email highlight */
.support-email {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.05rem;
  margin: var(--space-xs) 0 var(--space-sm);
}

.support-email:hover {
  background: var(--color-surface-hover);
}
