/* ============================================
   MOMOTARO.APP — Global Styles
   ============================================ */

/* --- Fonts --- */
@font-face {
  font-family: 'Stellar';
  src: url('/fonts/Stellar-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Louize';
  src: url('/fonts/Louize-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
/* IBM Plex Sans loaded via Google Fonts in Base.astro */

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* --- Variables --- */
:root {
  --text: #240e0e;
  --bg: #F7F7F7;
  --accent: #ffa600;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --content-max: 1159px;
  --content-pad: clamp(10px, 5vw, 48px);

  --font-display: 'Stellar', sans-serif;
  --font-body: 'Louize', Georgia, serif;
  --font-ui: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Sans', monospace;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}
html {
  overflow-x: hidden;
}

/* --- Typography --- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.display-hero { font-size: 80px; letter-spacing: 0; line-height: 1; }
.display-lg { font-size: 70px; letter-spacing: 0; line-height: 1; }

.body-lg {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.01em;
  line-height: 1.8;
}
.body-md {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.6;
}
.body-sm {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

.label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.75rem, 1vw, 0.875rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 1200px) {
  .body-lg { font-size: 30px; }
  .display-lg { font-size: 55px; }
  .science-heading { font-size: 55px; }
  .display-hero { font-size: 65px; }
}
@media (max-width: 768px) {
  .body-lg { font-size: 24px; line-height: 1.4; }
  .body-md { font-size: 20px; }
  /* Section headings: all same size */
  .display-lg,
  .science-heading { font-size: 40px !important; letter-spacing: 0 !important; line-height: 1 !important; }
  /* Card headings: smaller than sections */
  .content-card h3,
  .science-block h3 { font-size: 28px !important; }
  .display-hero { font-size: 50px; }
  .body-text-centered { padding: 0 !important; }
  .content-wrapper { padding-left: 10px; padding-right: 10px; }
  .section-centered { gap: 30px; }
}

/* --- Layout --- */
/* Consistent 50px gap between all content blocks */
.content-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 120px var(--content-pad) 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 200;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* No scroll background — nav items have their own pill wrappers */
.nav-left {
  display: flex;
  align-items: center;
}
/* --- Language Toggle --- */
.lang-toggle {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 100px;
  padding: 6px;
  gap: 0;
  position: relative;
}
.lang-pill {
  position: absolute;
  height: calc(100% - 12px);
  border-radius: 100px;
  background: var(--bg);
  transition: left 0.35s var(--ease), width 0.35s var(--ease);
  top: 6px;
  left: 6px;
  width: 38px;
  pointer-events: none;
}
.lang-item {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  color: #B0B0B0;
  padding: 4px 8px;
  position: relative;
  z-index: 1;
  transition: color 0.3s var(--ease);
}
.lang-item.active {
  color: #473E2C;
  font-weight: 600;
}
.lang-item:hover { color: #473E2C; }
.lang-store {
  padding: 4px 6px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  transition: all 0.3s var(--ease);
}
.lang-store:hover svg {
  stroke: #D4A017;
}
.nav-right {
  display: flex;
  align-items: center;
}
.nav-cta {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  height: 40px;
  padding: 0 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 30px;
  transition: opacity 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}
.nav-cta svg { flex-shrink: 0; fill: var(--bg); }
.nav-cta:hover { opacity: 0.85; }

/* --- Hero --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  width: 100%;
}
.hero-presents {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.2;
  color: #000000;
  margin-bottom: 0;
}
.hero-banner {
  margin: 20px 0;
}
.banner-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 12px 28px;
  background: #f5d5c8;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 500;
  transition: background 0.3s var(--ease);
}
.banner-pill strong {
  font-weight: 700;
}
.banner-pill:hover { background: #f0c4b3; }
.hero-media {
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
}
.hero-media img,
.hero-media video {
  width: 100%;
  display: block;
}

/* --- Centered section helper --- */
.section-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  gap: 50px;
}
.mascot-centered {
  margin-bottom: 0;
}
.body-text-centered {
  width: 100%;
  padding: 40px;
  margin-top: 0;
}

/* --- Science --- */
.science-heading {
  font-family: var(--font-display);
  font-size: 70px;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  max-width: 100%;
}
.science-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  width: 100%;
}
.science-block {
  background: #ffffff;
  border-radius: 30px;
  height: 500px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 20px;
}
.science-block .label {
  display: none;
}
.science-block h3 {
  font-family: var(--font-display);
  font-size: 35px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.science-block .body-md {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.4;
}
.science-footnotes {
  width: 100%;
  max-width: 900px;
  padding: 30px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #1C1C1C;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.science-footnotes p { margin: 0; }

/* --- Features (Swipe / Focus / Tap) --- */
.features-section {
  width: 100%;
  background: linear-gradient(to bottom, #FFFFFF 0%, #F7F7F7 50%);
  border-radius: 30px;
  overflow: hidden;
  position: relative;
}
.features-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 90vh;
  align-items: center;
  padding: 0 20px;
}
.feature-item h3 {
  font-family: var(--font-display);
  font-size: 35px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.feature-top-left {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  margin-bottom: 140px;
  z-index: 2;
  margin-right: -80px;
}
.feature-top-right {
  grid-column: 3;
  grid-row: 2;
  align-self: start;
  margin-top: -40px;
  text-align: right;
  z-index: 2;
  margin-left: -80px;
}
.feature-bottom-left {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin-top: 230px;
  z-index: 2;
  margin-right: -80px;
}
/* Feature items hidden until phone is in position */
.features-section .feature-item {
  opacity: 0 !important;
  transform: translateY(-16px) !important;
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.features-section.text-visible .feature-item {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.features-section.text-visible .feature-top-left { transition-delay: 1.8s; }
.features-section.text-visible .feature-top-right { transition-delay: 2.2s; }
.features-section.text-visible .feature-bottom-left { transition-delay: 2.6s; }
.features-phone {
  grid-column: 2;
  grid-row: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}
.features-phone img {
  width: 100%;
  max-width: 340px;
  border-radius: 36px;
  transform: scale(0.7);
  transition: transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.features-section.phone-ready .features-phone img {
  transform: scale(1.1) rotate(-5deg);
}

/* --- 2-Column Card Grid --- */
.two-column-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  width: 100%;
}
.content-card {
  background: #ffffff;
  border-radius: 30px;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 20px;
  min-height: 400px;
}
.content-card h3 {
  font-family: var(--font-display);
  font-size: 35px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.card-body {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.03em;
  line-height: 1.4;
}

/* --- Audio Player --- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 10px;
  width: 300px;
}
.audio-bar {
  flex: 1;
  height: 3px;
  background: #8C8C89;
  border-radius: 2px;
}

/* --- Themes Grid --- */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 27px;
  width: 100%;
  cursor: grab;
}
.themes-grid:active { cursor: grabbing; }
.theme-item {
  width: 100%;
  height: auto;
  border-radius: 16px;
  opacity: 0;
  transform: scale(0.8) translateY(64px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.theme-item.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* --- Stats illustration card --- */
.stats-illustration {
  width: 100%;
  height: 400px;
  background: #FF9900;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}
.stats-illustration img {
  max-height: 100%;
  object-fit: contain;
}

/* --- Footer Card --- */
.footer-card {
  background: var(--accent);
  color: var(--text);
  border-radius: 30px;
  width: 100%;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  overflow: hidden;
}
.footer-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
}
.footer-brand-logo {
  width: 120px;
  height: auto;
}
.footer-location {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.4;
}
.footer-email {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
}
.footer-email a {
  transition: opacity 0.3s var(--ease);
}
.footer-email a:hover { opacity: 0.7; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.footer-links a {
  font-family: var(--font-body);
  font-size: 18px;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
}
.footer-links a:hover { opacity: 1; }
.footer-kofi {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  background: var(--text);
  color: var(--bg);
  border-radius: 100px;
  transition: opacity 0.3s var(--ease);
}
.footer-kofi:hover { opacity: 0.85; }

/* --- Squircle (superellipse continuous corners) --- */
/* Uses slightly oversized border-radius + outline trick for smoother curvature */
.science-block,
.content-card,
.features-section,
.footer-card,
.stats-illustration,
.hero-media {
  /* Continuous corner smoothing (Safari) */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

/* --- Store Page --- */
.store-heading {
  text-align: center;
  font-size: clamp(60px, 13vw, 160px);
  letter-spacing: 0.01em;
  line-height: 0.8;
  width: 100%;
}
.store-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  width: 100%;
  align-items: stretch;
}
.store-product-image {
  overflow: hidden;
  border-radius: 30px;
}
.store-product-image {
  position: relative;
}
.store-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.store-img.active {
  opacity: 1;
  position: relative;
}
.store-product-text {
  background: #ffffff;
  border-radius: 30px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.store-waitlist {
  width: 100%;
  background: #f5d5c8;
  border-radius: 30px;
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.store-waitlist-text {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}
.store-form {
  display: flex;
  gap: 0;
  max-width: 420px;
}
.store-input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 15px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px 0 0 12px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}
.store-input::placeholder {
  color: #B0B0B0;
}
.store-submit {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  background: var(--text);
  color: var(--bg);
  border-radius: 0 12px 12px 0;
  transition: opacity 0.3s var(--ease);
}
.store-submit:hover {
  opacity: 0.85;
}
.store-reseller {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
}
.store-reseller a {
  text-decoration: underline;
  transition: opacity 0.3s var(--ease);
}
.store-reseller a:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .store-product {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .store-product-image {
    max-height: none;
  }
  .store-product-text {
    padding: 30px 20px;
  }
  .store-waitlist {
    padding: 30px 20px;
  }
  .store-waitlist-text {
    font-size: 20px;
  }
  .store-form {
    max-width: 100%;
  }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .science-grid { grid-template-columns: 1fr; gap: 30px; }
  .science-block { height: auto; min-height: 300px; }
  .two-column-grid { grid-template-columns: 1fr; gap: 30px; }
  /* Features: keep relative layout, scale down for tablet/mobile */
  .features-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 40px 20px 60px;
    gap: 0;
  }
  .features-phone {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .features-phone img {
    max-width: 260px;
    margin: 0 auto;
    transform: scale(0.8) !important;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }
  .features-section.phone-ready .features-phone img {
    transform: scale(1) rotate(-5deg) !important;
  }
  /* Feature text: faster delays, tighter spacing */
  .features-section .feature-item {
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
  }
  .features-section.text-visible .feature-top-left { transition-delay: 0.2s !important; }
  .features-section.text-visible .feature-top-right { transition-delay: 0.4s !important; }
  .features-section.text-visible .feature-bottom-left { transition-delay: 0.6s !important; }
  .feature-item {
    margin: 0 !important;
    align-self: auto;
  }
  .feature-item h3 {
    font-size: 28px;
  }
  .feature-item .body-sm {
    font-size: 15px;
  }
  .feature-top-left {
    order: 2;
    text-align: center;
    max-width: 320px;
    padding-top: 16px;
  }
  .feature-top-right {
    order: 3;
    text-align: center;
    max-width: 320px;
    padding-top: 12px;
    margin-left: 0 !important;
  }
  .feature-bottom-left {
    order: 4;
    text-align: center;
    max-width: 320px;
    padding-top: 12px;
  }
  .features-section {
    height: auto;
  }
}
@media (max-width: 768px) {
  /* Mobile: card fan stack */
  .themes-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px;
    gap: 0;
    overflow: visible;
  }
  .theme-item {
    position: absolute !important;
    width: 180px !important;
    border-radius: 20px;
    transform-origin: center center !important;
    opacity: 1 !important;
    transform: none !important;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.3s ease !important;
  }
  .footer-card { height: auto; padding: 60px 20px; border-radius: 24px; }
  .footer-brand-logo { width: 120px; }
}
