/* Design tokens */
:root {
  --color-background:       #181515;
  --color-surface:          #2B2625;
  --color-surface-raised:   #362F2E;
  --color-primary:          #B54134;
  --color-primary-dark:     #943126;
  --color-gold:             #D6B564;
  --color-blue:             #5E7E90;
  --color-green:            #4A9B68;
  --color-text-primary:     #F4EEE6;
  --color-text-secondary:   #C6BDB3;
  --color-text-muted:       #8B7F77;
  --color-border:           #413836;
  --color-border-light:     #544A47;

  --font-family: 'Nunito', sans-serif;

  --radius-sm:  12px;
  --radius-md:  18px;
  --radius-lg:  20px;
}

/* ================================================
   Reset
   ================================================ */

html {
  scroll-behavior: smooth;
}

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

/* ================================================
   Base
   ================================================ */

body {
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
}

/* ================================================
   Shared layout
   ================================================ */

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

/* ================================================
   Site header
   ================================================ */

.site-header {
  background-color: rgba(43, 38, 37, 0.82);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-icon {
  width: 200px;
  height: 200px;
  border-radius: 44px;
  flex-shrink: 0;
}

.header-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.header-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-primary);
  border-radius: 2px;
}

@media (max-width: 600px) {
  .nav-toggle {
    display: flex;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
  }

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

  .header-nav .nav-link {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 1rem;
  }
}

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

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

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

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

.hero-visual {
  flex: 0 0 auto;
  width: 420px;
  height: 560px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

.hero-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.hero-headline::after {
  content: '';
  display: block;
  height: 4px;
  width: 60%;
  background-color: var(--color-gold);
  border-radius: 2px;
  margin: 0.6rem 0 1.25rem;
}

.hero-subhead {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 400px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* ================================================
   Play Store badge
   ================================================ */

.play-store-link {
  display: inline-block;
}

.play-store-badge {
  height: 70px;
  width: auto;
  display: block;
}

.cta-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.625rem;
}

/* ================================================
   Hook
   ================================================ */

.hook {
  padding: 3rem 0;
  background: linear-gradient(to bottom,
    var(--color-background),
    var(--color-surface) 1rem,
    var(--color-surface) calc(100% - 1rem),
    var(--color-background)
  );
}

.hook-text {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.75;
  text-align: center;
}

/* ================================================
   Showcase (staggered screenshots)
   ================================================ */

.showcase {
  padding: 3rem 0;
}

.showcase-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.showcase-row:first-child {
  padding-top: 0;
}

.showcase-row:last-child {
  border-bottom: none;
}

.showcase-row--reverse {
  flex-direction: row-reverse;
}

.showcase-figure {
  flex: 0 0 auto;
  width: 200px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 30px rgba(244, 238, 230, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 45px rgba(244, 238, 230, 0.35);
}

.showcase-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.showcase-content {
  flex: 1;
}

.showcase-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.625rem;
}

.showcase-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 420px;
}

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

.features {
  padding: 4rem 0;
  background: linear-gradient(to bottom,
    var(--color-background),
    var(--color-surface) 1.2rem,
    var(--color-surface) calc(100% - 1.2rem),
    var(--color-background)
  );
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.feature-item {
  background-color: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
}

.feature-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.35rem;
}

.feature-text {
  font-size: 0.825rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

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

.link-arrow {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.link-arrow::after {
  content: ' \2192';
}

.link-arrow:hover {
  color: var(--color-primary-dark);
}

/* ================================================
   Download CTA
   ================================================ */

.download-cta {
  padding: 4rem 0;
  text-align: center;
}

.download-cta .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

/* ================================================
   Site footer
   ================================================ */

.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--color-text-secondary);
}

.footer-credit {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

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

.features-page-hero {
  padding: 3.5rem 0 2.5rem;
}

.features-page-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.features-page-hero-text {
  flex: 1;
}

.features-hero-logo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 22px;
}

.features-page-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text-primary);
}

.features-page-title::after {
  content: '';
  display: block;
  height: 4px;
  width: 60px;
  background-color: var(--color-gold);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.features-page-intro {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin-top: 1rem;
}

.fp-screen {
  padding: 3.5rem 0;
}

.fp-screen--alt {
  background: linear-gradient(to bottom,
    var(--color-background),
    var(--color-surface) 1.2rem,
    var(--color-surface) calc(100% - 1.2rem),
    var(--color-background)
  );
}

.fp-screen-inner {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

.fp-screen--reverse .fp-screen-inner {
  flex-direction: row-reverse;
}

.fp-screen-figure {
  flex: 0 0 auto;
  width: 180px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 30px rgba(244, 238, 230, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fp-screen-figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 45px rgba(244, 238, 230, 0.35);
}

.fp-screen-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
}

.fp-screen-content {
  flex: 1;
}

.fp-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  border: 1.5px solid var(--color-gold);
  border-radius: 100px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.75rem;
}

.fp-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.625rem;
}

.fp-screen-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 500px;
}

.fp-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fp-feature-item {
  padding-left: 0.875rem;
  border-left: 2px solid var(--color-border-light);
}

.fp-feature-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.2rem;
}

.fp-feature-desc {
  font-size: 0.825rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ================================================
   Typewriter
   ================================================ */

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

.typewriter-cursor {
  color: var(--color-primary);
  animation: blink 0.7s step-end infinite;
  margin-left: 1px;
  transition: opacity 0.4s ease;
}

.typewriter-cursor.stopped {
  animation: none;
  opacity: 0;
}

/* ================================================
   Scroll reveal
   ================================================ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   Generic single page (privacy policy etc.)
   ================================================ */

.page-content {
  padding: 4rem 0;
}

.page-inner {
  max-width: 720px;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
}

.page-body p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.page-body h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.page-body ul {
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
}

.page-body li {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 0.35rem;
}

.page-body strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

.page-body a {
  color: var(--color-primary);
  text-decoration: none;
  overflow-wrap: break-word;
}

.page-body a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.page-body hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

.page-intro {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

/* ================================================
   About page
   ================================================ */

.about-hero {
  width: 100%;
  height: 280px;
  background-image: url('/images/card_table.png');
  background-size: cover;
  background-position: center 35%;
  opacity: 0.3;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.about-content {
  padding: 1rem 0 4rem;
}

/* ================================================
   Responsive
   ================================================ */

@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    gap: 2rem;
  }

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

  .hero-headline::after {
    margin: 0.6rem auto 1.25rem;
  }

  .hero-visual {
    display: none;
  }

  .showcase-row,
  .showcase-row--reverse {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .showcase-figure {
    width: 180px;
    align-self: center;
  }

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

  .fp-screen-inner,
  .fp-screen--reverse .fp-screen-inner {
    flex-direction: column;
    gap: 1.5rem;
  }

  .fp-screen-figure {
    width: 160px;
    align-self: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hook {
    padding: 2rem 0;
  }

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

  .download-cta {
    padding: 2.5rem 0;
  }

  .section-heading {
    font-size: 1.5rem;
  }

  .showcase {
    padding: 2rem 0;
  }

  .showcase-row {
    padding: 2rem 0;
  }
}

/* ================================================
   Lightbox
   ================================================ */

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(24, 21, 21, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: zoom-out;
}

.lb-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.lb-img {
  max-width: min(420px, 90vw);
  max-height: 88vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(244, 238, 230, 0.08);
  transform: scale(0.88) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  cursor: default;
  object-fit: contain;
}

.lb-overlay.is-open .lb-img {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.lb-close:hover {
  color: var(--color-text-primary);
}

.showcase-img,
.fp-screen-img {
  cursor: zoom-in;
}

/* ================================================
   Back to top button
   ================================================ */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--color-border-light);
  color: var(--color-text-primary);
  transform: translateY(-2px);
}

/* ================================================
   Coming soon page (kept for reference)
   ================================================ */

.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 2rem;
  gap: 0.75rem;
}

.coming-soon .icon {
  width: 140px;
  height: 140px;
  border-radius: 28px;
  filter: drop-shadow(0 8px 32px rgba(213, 181, 100, 0.2));
  margin-bottom: 0.5rem;
}

.coming-soon .app-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.coming-soon .headline {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--color-text-primary);
}

.coming-soon .tagline {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}
