/* ============================================================
   MOONPAW TAROT — Landing Page Styles
   ============================================================ */

/* ------------------------------------------------------------
   CSS VARIABLES
   ------------------------------------------------------------ */
:root {
  --page-bg:          #f5f2ff;
  --surface:          #ffffff;
  --surface-lavender: #ede8ff;
  --surface-cta:      #e9e2ff;

  --primary:          #7c5bd6;
  --primary-btn:      #7057cc;
  --primary-dark:     #2d1769;
  --primary-mid:      #4a2fa0;

  --text-head:        #1e1150;
  --text-body:        #6b647e;
  --text-muted:       #9a94ae;
  --text-link:        #5a5070;

  --gold:             #f5d74a;
  --pink:             #f8a8c8;
  --mint:             #49b98a;
  --orange:           #f5a13b;

  --shadow-card:      0 6px 28px rgba(84, 61, 132, 0.09);
  --shadow-phone:     0 28px 64px rgba(0, 0, 0, 0.38), 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-nav:       0 4px 24px rgba(84, 61, 132, 0.11);
  --shadow-btn:       0 6px 20px rgba(112, 87, 204, 0.38);

  --radius-pill:      999px;
  --radius-xl:        36px;
  --radius-lg:        28px;
  --radius-md:        20px;
  --radius-sm:        14px;

  --font-head:        'Fredoka', 'Baloo 2', system-ui, sans-serif;
  --font-body:        'Nunito Sans', system-ui, sans-serif;

  --page-width:       1060px;
  --page-pad:         40px;
}

/* ------------------------------------------------------------
   RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font-body);
  background-color: var(--page-bg);
  background-image: url('assets/web-bg.png');
  background-attachment: fixed;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  color: var(--text-head);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul { list-style: none; }

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-wrapper {
  padding: 18px var(--page-pad);
  position: relative;
  z-index: 20;
}

.nav-pill {
  max-width: var(--page-width);
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: var(--shadow-nav);
}

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

.nav-logo-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-lavender);
  flex-shrink: 0;
}

.nav-logo-wrap img {
  width: 100%;
  height: 100%;
}

.nav-brand-text {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Center links */
.nav-links {
  display: flex;
  gap: 34px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-link);
  transition: color 0.18s;
}

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

/* App Store button — nav variant */
.btn-appstore--nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-btn);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 10px 18px 10px 14px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.18s;
}

.btn-appstore--nav:hover { background: var(--primary-dark); }

.btn-appstore__text {
  white-space: nowrap;
}

/* Shared apple icon */
.icon-apple {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 12px var(--page-pad) 44px;
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 32px;
  align-items: center;
  min-height: 540px;
}

/* Left column */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.hero-headline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 49px);
  line-height: 1.1;
  color: var(--text-head);
  margin-bottom: 18px;
  letter-spacing: -0.3px;
}

.hero-body {
  font-size: 15.5px;
  color: var(--text-body);
  line-height: 1.62;
  margin-bottom: 28px;
  max-width: 370px;
}

/* App Store button — hero variant */
.btn-appstore--hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-btn);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 26px 14px 22px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  margin-bottom: 14px;
  box-shadow: var(--shadow-btn);
  transition: background 0.18s, box-shadow 0.18s;
}

.btn-appstore--hero .icon-apple { width: 20px; height: 20px; }
.btn-appstore--hero:hover { background: var(--primary-dark); box-shadow: 0 8px 26px rgba(112, 87, 204, 0.48); }

/* Subline */
.hero-subline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-body);
  flex-wrap: wrap;
}

.icon-sparkle {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* ============================================================
   HERO PHONES (right column)
   ============================================================ */
.hero-phones {
  position: relative;
  height: 530px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Phone group container ── */
.phone-group {
  position: relative;
  width: 460px;
  height: 490px;
  flex-shrink: 0;
}

/* ── Phone mockup base ── */
.phone-mockup {
  position: absolute;
}

/* ── Phone frame ── */
.phone-frame {
  background: #1c1c1e;
  border-radius: 44px;
  padding: 10px 7px;
  box-shadow:
    0 0 0 1.5px #3d3d40,
    0 0 0 3px #1c1c1e,
    var(--shadow-phone);
  height: 100%;
  position: relative;
}

.phone-screen {
  border-radius: 36px;
  overflow: hidden;
  height: 100%;
  position: relative;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Hero phone sizes and positions ── */

/* Center phone: largest, front, slightly raised */
.phone-mockup--center {
  width: 210px;
  height: 456px;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-16px);
  z-index: 3;
}

/* Left phone: smaller, rotated CCW, behind center */
.phone-mockup--left {
  width: 184px;
  height: 400px;
  left: 4px;
  top: 44px;
  transform: rotate(-7deg);
  z-index: 2;
}

/* Right phone: smaller, rotated CW, behind center */
.phone-mockup--right {
  width: 184px;
  height: 400px;
  right: 4px;
  top: 44px;
  transform: rotate(7deg);
  z-index: 2;
}

/* ============================================================
   FEATURE CARDS
   ============================================================ */
.features {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--page-pad) 52px;
}

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

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 22px 20px 22px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.feature-illo {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-illo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-head);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.52;
}

/* ============================================================
   SCREENS SHOWCASE
   ============================================================ */
.screens {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 8px var(--page-pad) 56px;
  text-align: center;
}

.screens-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--text-head);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.screens-sub {
  font-size: 15px;
  color: var(--text-body);
  margin-bottom: 44px;
}

.screens-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-end;
}

.screen-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  max-width: 146px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.screen-item:hover .phone-frame {
  box-shadow:
    0 0 0 1px #3d3d40,
    0 0 0 2px #1c1c1e,
    0 18px 48px rgba(0,0,0,0.42), 0 4px 12px rgba(0,0,0,0.20);
  transform: translateY(-3px);
  transition: transform 0.18s, box-shadow 0.18s;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 10, 46, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-height: 88vh;
  max-width: min(420px, 90vw);
  border-radius: 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.28);
}

.phone-mockup--small {
  width: 100%;
  position: static;
  transform: none;
}

.phone-mockup--small .phone-frame {
  /* Override hero frame styles for small phones */
  border-radius: 26px;
  padding: 6px 4px;
  box-shadow:
    0 0 0 1px #3d3d40,
    0 0 0 2px #1c1c1e,
    0 12px 36px rgba(0,0,0,0.30), 0 2px 8px rgba(0,0,0,0.15);
  height: auto;
}

.phone-mockup--small .phone-screen {
  border-radius: 21px;
  height: auto;
  aspect-ratio: 9 / 19.5;
}

.screen-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--page-pad) 52px;
}

.cta-panel {
  background: var(--surface-cta);
  border-radius: var(--radius-xl);
  padding: 0 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

/* Illustrations */
.cta-illus {
  flex-shrink: 0;
  align-self: flex-end;
}

.cta-illus--left {
  width: 204px;
  margin-left: -24px;
  flex-shrink: 0;
}

.cta-illus--right {
  width: 198px;
  margin-right: -24px;
  flex-shrink: 0;
}

.cta-illus img {
  width: 100%;
  height: auto;
  display: block;
}

/* Center content */
.cta-body {
  text-align: center;
  padding: 48px 24px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.cta-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--text-head);
  margin-bottom: 8px;
}

.cta-sub {
  font-size: 15px;
  color: var(--text-body);
  margin-bottom: 24px;
}

/* App Store button — CTA variant */
.btn-appstore--cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-btn);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 14px 28px 14px 22px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-btn);
  transition: background 0.18s, box-shadow 0.18s;
}

.btn-appstore--cta .icon-apple { width: 20px; height: 20px; }
.btn-appstore--cta:hover { background: var(--primary-dark); box-shadow: 0 8px 26px rgba(112, 87, 204, 0.48); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 22px var(--page-pad) 28px;
  border-top: 1px solid rgba(124, 91, 214, 0.10);
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.footer-nav {
  display: flex;
  gap: 26px;
}

.footer-nav a {
  font-size: 13.5px;
  color: var(--text-body);
  transition: color 0.18s;
}

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

/* ============================================================
   RESPONSIVE — TABLET (768–1050px)
   ============================================================ */
@media (max-width: 1050px) {
  :root {
    --page-pad: 28px;
  }

  .hero {
    grid-template-columns: 380px 1fr;
    gap: 20px;
    min-height: 490px;
  }

  .phone-group {
    width: 400px;
    height: 430px;
  }

  .phone-mockup--center {
    width: 186px;
    height: 403px;
  }

  .phone-mockup--left,
  .phone-mockup--right {
    width: 163px;
    height: 354px;
  }

  .cta-illus--left { width: 140px; }
  .cta-illus--right { width: 136px; }
}

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

  .hero-headline { font-size: 34px; }

  .phone-group {
    width: 360px;
    height: 390px;
  }

  .phone-mockup--center {
    width: 166px;
    height: 360px;
  }

  .phone-mockup--left,
  .phone-mockup--right {
    width: 146px;
    height: 317px;
  }

  .features-grid {
    gap: 14px;
  }

  .screen-item {
    max-width: 120px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --page-pad: 20px;
  }

  /* Nav */
  .nav-wrapper {
    padding: 14px var(--page-pad);
  }

  .nav-pill {
    padding: 8px 10px 8px 12px;
  }

  .nav-links {
    display: none;
  }

  .nav-brand-text {
    font-size: 15px;
  }

  /* Hero: stack vertically */
  .hero {
    grid-template-columns: 1fr;
    padding: 20px var(--page-pad) 36px;
    min-height: unset;
    gap: 36px;
    text-align: center;
  }

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

  .hero-body {
    max-width: 100%;
  }

  .hero-subline {
    justify-content: center;
  }

  /* Phones */
  .hero-phones {
    height: 380px;
  }

  .phone-group {
    width: 320px;
    height: 360px;
  }

  .phone-mockup--center {
    width: 140px;
    height: 304px;
  }

  .phone-mockup--left,
  .phone-mockup--right {
    width: 123px;
    height: 267px;
  }

  .phone-mockup--left {
    left: 0;
    top: 36px;
  }

  .phone-mockup--right {
    right: 0;
    top: 36px;
  }

  /* Feature cards: stack */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Screens: horizontal scroll */
  .screens-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    justify-content: flex-start;
    padding-bottom: 12px;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .screens-row::-webkit-scrollbar {
    display: none;
  }

  .screen-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 100px;
    max-width: 100px;
    flex: none;
  }

  /* CTA: stack */
  .cta-panel {
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
    min-height: unset;
  }

  .cta-illus--left {
    order: 1;
    width: 156px;
    margin: 0;
    margin-top: 8px;
  }

  .cta-body {
    order: 2;
    padding: 24px 16px;
  }

  .cta-illus--right {
    order: 3;
    width: 156px;
    margin: 0;
    margin-bottom: 8px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

/* ============================================================
   SMALL MOBILE (≤400px)
   ============================================================ */
@media (max-width: 400px) {
  .hero-headline {
    font-size: 29px;
  }

  .phone-group {
    width: 280px;
    height: 310px;
  }

  .phone-mockup--center {
    width: 120px;
    height: 260px;
  }

  .phone-mockup--left,
  .phone-mockup--right {
    width: 105px;
    height: 228px;
  }

  .btn-appstore--hero,
  .btn-appstore--cta {
    font-size: 14px;
    padding: 12px 20px 12px 18px;
  }
}

/* ============================================================
   LEGAL & SUPPORT PAGES
   ============================================================ */

/* Nav home link (visible on all breakpoints) */
.nav-home-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-link);
  margin-left: auto;
  margin-right: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.18s;
}

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

/* Page wrapper */
.page-main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 16px var(--page-pad) 72px;
}

/* Shared card shell */
.legal-card,
.support-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 52px 60px;
  box-shadow: var(--shadow-card);
}

/* Legal page typography */
.legal-card h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 3.8vw, 40px);
  color: var(--text-head);
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.legal-card .effective-date {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.legal-card h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--text-head);
  margin-top: 38px;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.legal-card p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 10px;
}

.legal-card ul {
  list-style: disc;
  margin: 6px 0 12px 22px;
}

.legal-card li {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 4px;
}

.legal-card a {
  color: var(--primary);
  text-decoration: underline;
  word-break: break-all;
}

.legal-card a:hover {
  color: var(--primary-dark);
}

/* Support page */
.support-card h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(26px, 3.8vw, 40px);
  color: var(--text-head);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.support-intro {
  font-size: 15.5px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 10px;
  max-width: 540px;
}

.email-display-wrap {
  margin-top: 24px;
  margin-bottom: 20px;
}

.email-display {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  border-bottom: 2px solid currentColor;
  padding: 2px 0;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.email-display:hover {
  color: var(--primary-dark);
}

.email-display:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
  border-radius: 3px;
}

.copy-email-btn {
  display: inline-flex;
  align-items: center;
  background: var(--primary-btn);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  margin-bottom: 14px;
  transition: background 0.18s, box-shadow 0.18s;
}

.copy-email-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 26px rgba(112, 87, 204, 0.48);
}

.copy-email-btn:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

.copy-status {
  min-height: 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mint);
  margin-bottom: 36px;
}

.copy-status.is-error {
  color: var(--orange);
  font-weight: 400;
}

.support-legal-links {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(124, 91, 214, 0.12);
}

.support-legal-links h2 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.support-legal-links a {
  color: var(--primary);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.15s;
  display: inline-block;
  margin-right: 24px;
}

.support-legal-links a:hover {
  color: var(--primary-dark);
}

/* Responsive for legal/support */
@media (max-width: 768px) {
  .legal-card,
  .support-card {
    padding: 32px 24px;
  }

  .legal-card a {
    word-break: break-word;
  }

  .email-display {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .legal-card,
  .support-card {
    padding: 24px 16px;
  }
}
