/* ============================================================
   ME Soft World — Modern App Studio Theme
   Saffron brand · clean neutral base · floating animations
   ============================================================ */

:root {
  --brand:        #FF7A1A;
  --brand-deep:   #F05E0C;
  --brand-dark:   #D14C00;
  --brand-soft:   #FFB672;
  --brand-pale:   #FFF1E5;
  --gold:         #FFD166;
  --bg:           #FAF8F6;
  --ink:          #1E2433;
  --ink-soft:     #5D6675;
  --line:         #EEE5DC;
  --white:        #FFFFFF;
  --footer-bg:    #171C26;
  --radius:       18px;
  --shadow:       0 6px 24px rgba(30, 36, 51, 0.08);
  --shadow-lg:    0 16px 48px rgba(30, 36, 51, 0.14);
  --shadow-brand: 0 10px 30px rgba(240, 94, 12, 0.28);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--brand-deep); text-decoration: none; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

/* ---------------- Animations ---------------- */

@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(2deg); }
}

@keyframes floatYAlt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-24px) rotate(-3deg); }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -20px) scale(1.06); }
}

@keyframes pulseRing {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.05); }
}

/* Scroll-reveal (class added by main.js) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 246, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-svg {
  filter: drop-shadow(0 4px 10px rgba(240, 94, 12, 0.3));
  transition: transform .3s ease;
}
.logo:hover .logo-svg { transform: rotate(-6deg) scale(1.05); }

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.logo-text span { color: var(--brand-deep); }

.main-nav { display: flex; gap: 30px; align-items: center; }

.main-nav a {
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--brand-deep); }
.main-nav a.active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-deep);
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

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

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(255, 209, 102, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 60% at 10% 110%, rgba(209, 76, 0, 0.5), transparent 60%),
    linear-gradient(140deg, var(--brand) 0%, var(--brand-deep) 55%, var(--brand-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 96px 0 120px;
}

.hero-inner { position: relative; z-index: 2; }

/* Floating glass tiles with app emojis */
.float-tile {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  animation: floatY 7s ease-in-out infinite;
  pointer-events: none;
}
.float-tile.t1 { left: 7%;  top: 22%;  animation-duration: 6.5s; }
.float-tile.t2 { right: 8%; top: 18%;  animation: floatYAlt 8s ease-in-out infinite; }
.float-tile.t3 { left: 14%; bottom: 16%; animation: floatYAlt 7.5s ease-in-out infinite; animation-delay: -2s; }
.float-tile.t4 { right: 15%; bottom: 20%; animation-duration: 8.5s; animation-delay: -3.5s; }
.float-tile.t5 { left: 46%; top: 10%;  width: 54px; height: 54px; font-size: 26px; animation-duration: 9s; animation-delay: -1.5s; }

/* Soft drifting blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03) 70%);
  animation: drift 12s ease-in-out infinite;
  pointer-events: none;
}
.hero-blob.b1 { width: 240px; height: 240px; left: -80px; top: -60px; }
.hero-blob.b2 { width: 320px; height: 320px; right: -120px; bottom: -140px; animation-delay: -5s; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.4px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.22;
  max-width: 820px;
  margin: 0 auto 18px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #FFE8B0, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  max-width: 660px;
  margin: 0 auto 36px;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.97rem;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-3px); }

.btn-white {
  background: var(--white);
  color: var(--brand-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.btn-outline-white {
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: var(--white);
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.12); }

.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
  box-shadow: var(--shadow-brand);
}
.btn-brand:hover { box-shadow: 0 14px 36px rgba(240, 94, 12, 0.38); }

.btn-play {
  background: #16181D;
  color: var(--white);
  padding: 10px 22px;
  font-size: 0.9rem;
  border-radius: 12px;
}
.btn-play:hover { background: #000; }

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

.section { padding: 80px 0; }
.section.alt { background: linear-gradient(180deg, #FFF6EE, var(--brand-pale)); }

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 52px;
}

.section-head .kicker {
  display: inline-block;
  color: var(--brand-deep);
  background: var(--brand-pale);
  border-radius: 999px;
  padding: 5px 16px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.section-head p { color: var(--ink-soft); }

/* ---------------- App Cards ---------------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.app-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.app-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-soft);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 32px;
  background: linear-gradient(135deg, var(--brand-pale), #FFE0C2);
  margin-bottom: 18px;
  animation: floatY 5.5s ease-in-out infinite;
}
.app-card:nth-child(2) .app-icon { animation-delay: -1.8s; }
.app-card:nth-child(3) .app-icon { animation-delay: -3.6s; }
.app-card:nth-child(4) .app-icon { animation-delay: -2.7s; }

.app-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.app-cat {
  font-size: 0.8rem;
  color: var(--brand-deep);
  font-weight: 600;
  margin-bottom: 12px;
}

.app-card p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.app-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Feature / category cards ---------------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.feature-card .f-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-pale), #FFE0C2);
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature-card p { font-size: 0.92rem; color: var(--ink-soft); }

.feature-card .soon {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: var(--brand-pale);
  padding: 3px 12px;
  border-radius: 999px;
}

/* ---------------- Stats strip ---------------- */

.stats-strip {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
  border-radius: 22px;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  text-align: center;
  box-shadow: var(--shadow-brand);
}
.stats-strip::before,
.stats-strip::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: pulseRing 6s ease-in-out infinite;
}
.stats-strip::before { width: 200px; height: 200px; left: -70px; top: -70px; }
.stats-strip::after  { width: 260px; height: 260px; right: -90px; bottom: -110px; animation-delay: -3s; }

.stat { position: relative; z-index: 1; }
.stat h3 { font-size: 2rem; font-weight: 800; }
.stat p { font-size: 0.9rem; opacity: 0.95; }

/* ---------------- CTA band ---------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--white);
  border-radius: 22px;
  padding: 60px 28px;
  box-shadow: var(--shadow-brand);
}
.cta-band::before,
.cta-band::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: drift 10s ease-in-out infinite;
}
.cta-band::before { width: 180px; height: 180px; left: -60px; bottom: -80px; }
.cta-band::after  { width: 220px; height: 220px; right: -70px; top: -100px; animation-delay: -4s; }

.cta-band h2 { position: relative; z-index: 1; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-band p  { position: relative; z-index: 1; margin-bottom: 26px; opacity: 0.95; }
.cta-band .btn { position: relative; z-index: 1; }

/* ---------------- Page hero (inner pages) ---------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 85% 0%, rgba(255, 209, 102, 0.3), transparent 55%),
    linear-gradient(140deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 60px 0;
}
.page-hero::before,
.page-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: drift 11s ease-in-out infinite;
}
.page-hero::before { width: 160px; height: 160px; left: 4%; top: -60px; }
.page-hero::after  { width: 220px; height: 220px; right: -60px; bottom: -110px; animation-delay: -5s; }

.page-hero h1 { position: relative; z-index: 1; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
.page-hero p  { position: relative; z-index: 1; opacity: 0.95; max-width: 620px; margin: 10px auto 0; }

/* ---------------- Content / legal pages ---------------- */

.content-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: clamp(24px, 5vw, 48px);
  max-width: 880px;
  margin: 0 auto;
}

.content-box h2 {
  color: var(--ink);
  font-size: 1.35rem;
  margin: 28px 0 10px;
  padding-top: 8px;
}
.content-box h2:first-child { margin-top: 0; }

.content-box h3 {
  color: var(--brand-dark);
  font-size: 1.08rem;
  margin: 20px 0 8px;
}

.content-box p, .content-box li {
  color: var(--ink-soft);
  font-size: 0.97rem;
  margin-bottom: 10px;
}

.content-box ul { padding-left: 22px; margin-bottom: 14px; }

.content-box .updated {
  font-size: 0.85rem;
  color: var(--brand-deep);
  font-weight: 600;
  margin-bottom: 20px;
}

.content-box .highlight-box {
  background: var(--brand-pale);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 18px 0;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-art {
  position: relative;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 22px;
  min-height: 340px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-brand);
  overflow: hidden;
}
.about-art::before,
.about-art::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  animation: drift 10s ease-in-out infinite;
}
.about-art::before { width: 150px; height: 150px; left: -50px; top: -50px; }
.about-art::after  { width: 190px; height: 190px; right: -60px; bottom: -80px; animation-delay: -4s; }

.about-art .logo-svg {
  width: 150px;
  height: 150px;
  animation: floatY 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

.about-text h2 { color: var(--ink); font-size: 1.8rem; margin-bottom: 14px; }
.about-text p { color: var(--ink-soft); margin-bottom: 14px; }

/* ---------------- Contact page ---------------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 36px 28px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.contact-card .c-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-pale), #FFE0C2);
  font-size: 1.9rem;
  margin-bottom: 16px;
  animation: floatY 6s ease-in-out infinite;
}
.contact-card:nth-child(2) .c-icon { animation-delay: -2s; }
.contact-card:nth-child(3) .c-icon { animation-delay: -4s; }

.contact-card h3 { color: var(--ink); margin-bottom: 8px; }
.contact-card p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 18px; }

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

.site-footer {
  background: var(--footer-bg);
  color: #C8CDD6;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding: 56px 0 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 14px;
  max-width: 300px;
}

.footer-logo .logo-text { color: var(--white); }
.footer-logo .logo-text span { color: var(--brand-soft); }

.footer-col h4 {
  color: var(--brand-soft);
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: #C8CDD6;
  font-size: 0.92rem;
  margin-bottom: 9px;
  opacity: 0.85;
  transition: color .2s, opacity .2s;
}
.footer-col a:hover { color: var(--brand-soft); opacity: 1; }

.footer-meta {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 6px;
  letter-spacing: 0.4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 182, 114, 0.15);
  padding: 18px 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------------- 404 ---------------- */

.error-page {
  text-align: center;
  padding: 90px 0;
}
.error-page .big {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  animation: floatY 5s ease-in-out infinite;
  display: inline-block;
}
.error-page h1 { color: var(--ink); margin: 10px 0; }
.error-page p { color: var(--ink-soft); margin-bottom: 28px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .float-tile.t3, .float-tile.t4 { display: none; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-art { min-height: 240px; }
  .about-art .logo-svg { width: 110px; height: 110px; }
}

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

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 320px; }

  .main-nav a {
    padding: 14px 6%;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a.active { background: var(--brand-pale); border-bottom-color: var(--line); }

  .hero { padding: 68px 0 80px; }
  .section { padding: 56px 0; }

  .float-tile.t1 { left: 4%; top: 4%; width: 48px; height: 48px; font-size: 22px; }
  .float-tile.t2 { right: 4%; top: 76%; width: 48px; height: 48px; font-size: 22px; }
  .float-tile.t5 { display: none; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .float-tile.t2 { display: none; }
}
