:root {
  color-scheme: light;
  --surface: #fff;
  --nav: #fffffff0;
  --btn: #2554e8;
  --btnh: #1a3fb8;
  --bd2: #c9d6f2;
  --t2: #2a3a52;
  --t3: #3b4a63;
  --phone: #eef2f8;
  --bezel: #0f1b2d;
  --store: #0f1b2d;
  --storeh: #1c2b45;
  --band: #0b2a5b;
  --bg: #f6f8fc;
  --card: #fff;
  --tx: #0f1b2d;
  --mu: #56657d;
  --p: #2554e8;
  --pd: #1a3fb8;
  --soft: #eaf0ff;
  --line: #e2e8f1;
  --navy: #0b2a5b;
  --r: 18px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --card: #131c2e;
  --surface: #131c2e;
  --nav: #0b1220ee;
  --tx: #e8eefb;
  --mu: #9aa9c4;
  --p: #6b95ff;
  --soft: #1a2744;
  --line: #23314d;
  --bd2: #34486e;
  --btn: #2f63f0;
  --btnh: #2554e8;
  --t2: #c5d2ea;
  --t3: #b4c2dc;
  --phone: #0e1626;
  --bezel: #2b3a57;
  --store: #1d2c4a;
  --storeh: #263a62;
  --band: #10264f;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .3s, color .3s, border-color .3s;
}

svg.i {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

img, svg {
  max-width: 100%;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid #8fb0ff;
  outline-offset: 3px;
}

/* ---------------- Navbar & Logo ---------------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--nav);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, border-color .3s;
}

nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.45rem;
  text-decoration: none;
  color: var(--tx);
}

.logo .app-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

.links {
  order: 1;
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.links a {
  color: var(--mu);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: .2s;
}

.links a:hover, .links a.on {
  color: var(--p);
  background: var(--soft);
}

.links a.cta, .links a.cta.on {
  background: var(--btn);
  color: #fff;
}

.links a.cta:hover {
  background: var(--btnh);
}

#mb {
  display: none;
  background: none;
  border: 0;
  color: var(--tx);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------------- Theme Toggle Button ---------------- */
.tg {
  order: 2;
  margin-left: 8px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--tx);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: .2s;
}

.tg:hover {
  background: var(--soft);
  color: var(--p);
}

.tg .sn { display: none; }
:root[data-theme="dark"] .tg .sn { display: inline; }
:root[data-theme="dark"] .tg .mn { display: none; }

/* ---------------- Buttons & Shared UI ---------------- */
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 13px 26px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--btn);
  transition: transform .2s, box-shadow .2s, background .2s;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.btn:hover {
  background: var(--btnh);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #2554e833;
}

.btn.o {
  background: var(--surface);
  color: var(--tx);
  border-color: var(--line);
}

.btn.o:hover {
  background: var(--soft);
  border-color: var(--bd2);
  box-shadow: none;
}

.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--soft);
  color: var(--p);
  font-weight: 600;
  font-size: 0.85rem;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.9rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 18px 0;
}

.gt {
  color: var(--p);
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.sub {
  color: var(--mu);
  margin-bottom: 36px;
  max-width: 640px;
}

/* ---------------- Privacy Policy Specific Styling ---------------- */
.ph {
  text-align: center;
  padding: 60px 0 30px;
}

.ph h1 {
  margin: 16px 0 12px;
}

.ph p {
  color: var(--mu);
  max-width: 680px;
  margin: 0 auto 14px;
  font-size: 1.05rem;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 40px;
  justify-content: center;
}

.toc a {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--tx);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: .2s;
}

.toc a:hover {
  background: var(--soft);
  color: var(--p);
  border-color: var(--bd2);
  transform: translateY(-1px);
}

.sec {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px 32px;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}

.sec:hover {
  border-color: var(--bd2);
}

.sec h2 {
  font-size: 1.45rem;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.n {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--btn);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sec h3 {
  margin: 20px 0 8px;
  color: var(--p);
  font-size: 1.08rem;
  font-weight: 700;
}

.sec p, .sec li {
  color: var(--t3);
  font-size: 0.98rem;
  line-height: 1.6;
}

.sec ul {
  padding-left: 22px;
  margin: 10px 0 16px;
}

.sec li {
  margin-bottom: 6px;
}

.sec li::marker {
  color: var(--p);
}

.note {
  border-left: 4px solid var(--p);
  padding: 12px 18px;
  background: var(--soft);
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  font-size: 0.95rem;
  color: var(--t2);
}

/* ---------------- Hero & Landing Page ---------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  padding: 70px 0;
}

.hero p {
  color: var(--mu);
  font-size: 1.12rem;
  max-width: 520px;
  margin-bottom: 28px;
}

.hero .btn {
  margin: 0 10px 10px 0;
}

/* ---------------- Phone Mockup & IG Feed ---------------- */
.phone {
  width: min(300px, 80vw);
  height: 580px;
  margin: auto;
  border-radius: 42px;
  border: 10px solid var(--bezel);
  background: var(--phone);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px #0f1b2d2e;
  display: flex;
  flex-direction: column;
  animation: fl 6s ease-in-out infinite;
}

.phone:before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 80px;
  height: 18px;
  margin-left: -40px;
  background: var(--bezel);
  border-radius: 99px;
  z-index: 20;
}

@keyframes fl {
  50% { transform: translateY(-12px); }
}

.phone-header {
  height: 50px;
  padding: 22px 14px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}

.phone-brand {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.phone-header-icons {
  display: flex;
  gap: 10px;
}

.phone-header-icons svg {
  width: 1rem;
  height: 1rem;
}

.phone-screen {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.scroll {
  padding: 8px 8px 0;
  animation: up 28s linear infinite;
}

.phone:hover .scroll {
  animation-play-state: paused;
}

@keyframes up {
  to { transform: translateY(-50%); }
}

.phone-nav {
  height: 46px;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
}

.phone-nav button {
  background: none;
  border: none;
  color: var(--mu);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-nav button.active, .phone-nav button:hover {
  color: var(--tx);
}

.phone-nav svg {
  width: 1.2rem;
  height: 1.2rem;
}

.phone-nav-av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* Instagram Post Layout */
.ig-post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 0 0 10px 0;
}

.ig-post .who {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ig-post .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--p);
  background: var(--soft);
}

.ig-post .av .av-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ig-post .u-name {
  font-size: .82rem;
  font-weight: 700;
}

.ig-post .who small {
  font-size: .68rem;
  color: var(--mu);
}

.ig-post .more-dot {
  margin-left: auto;
  font-size: .7rem;
  color: var(--mu);
}

.ig-post .art {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0,0,0,.03);
  position: relative;
}

.ig-post .art .post-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-post .art img[src*="meelogoo"] {
  object-fit: contain;
  padding: 18px;
  background: var(--surface);
}

.ig-post .act {
  display: flex;
  gap: 12px;
  padding: 8px 10px 4px;
  color: var(--mu);
}

.ig-post .act button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  display: flex;
  gap: 5px;
  align-items: center;
  cursor: pointer;
  font-size: .85rem;
}

.ig-post .act button.on {
  color: #e11d48;
}

.ig-post .act button.on svg {
  fill: #e11d48;
}

.ig-post .caption {
  padding: 0 10px;
  font-size: .8rem;
  line-height: 1.35;
  color: var(--t2);
  margin-top: 2px;
}

.ig-post .caption b {
  font-weight: 700;
  color: var(--tx);
  margin-right: 4px;
}

/* ---------------- Ticker Bar ---------------- */
.tick {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 14px 0;
  background: var(--surface);
}

.tick div {
  display: flex;
  gap: 40px;
  padding-right: 40px;
  width: max-content;
  animation: tk 30s linear infinite;
  font-weight: 600;
  font-size: 1.15rem;
}

.tick span {
  color: var(--mu);
}

.tick span:nth-child(3n) {
  color: var(--p);
}

@keyframes tk {
  to { transform: translateX(-50%); }
}

/* ---------------- Sections, Grids & Cards ---------------- */
section {
  padding: 70px 0;
}

.cols, .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  transition: .25s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--bd2);
  box-shadow: 0 14px 30px #0f1b2d14;
}

.ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--p);
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.card p {
  color: var(--mu);
}

/* Download page action buttons */
.dl {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 10px 0 30px;
}

.dlb {
  gap: 14px;
  padding: 14px 28px;
  text-align: left;
  line-height: 1.2;
  font-size: 1.2rem;
  min-width: 260px;
  justify-content: center;
  background: var(--store);
}

.dlb:hover {
  background: var(--storeh);
  box-shadow: 0 8px 20px #0f1b2d33;
}

.dlb span {
  display: flex;
  flex-direction: column;
}

.dlb small {
  font-size: .7rem;
  font-weight: 500;
  opacity: .8;
  letter-spacing: .04em;
}

.dlb .bi {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.band {
  text-align: center;
  padding: 60px 20px;
  border-radius: 28px;
  background: var(--band);
  color: #fff;
  margin-bottom: 60px;
}

.band h2 {
  color: #fff;
}

.band p {
  margin-bottom: 22px;
  color: #cfe0ff;
}

.band .btn {
  background: #fff;
  color: var(--navy);
}

.band .btn:hover {
  background: #dbe6ff;
}

/* ---------------- Footer ---------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--mu);
  background: var(--surface);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer a {
  color: var(--mu);
  margin-left: 16px;
  text-decoration: none;
}

footer a:hover {
  color: var(--p);
}

/* ---------------- Reveal Animations ---------------- */
.rv {
  transition: opacity .6s, transform .6s;
}

.js .rv {
  opacity: 0;
  transform: translateY(20px);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ---------------- Responsive Media Queries ---------------- */
@media (max-width: 1024px) {
  .wrap { padding: 0 24px; }
  .hero { gap: 24px; padding: 50px 0; }
  section { padding: 50px 0; }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 36px 0;
  }
  .hero p {
    margin-inline: auto;
  }
  .hero .btn {
    margin: 0 6px 10px;
  }
  #mb {
    display: block;
  }
  .links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
    box-shadow: 0 14px 24px #0f1b2d14;
  }
  .links.open {
    display: flex;
  }
  .links a {
    padding: 12px 14px;
    text-align: center;
  }
  .ph {
    padding: 40px 0 20px;
  }
  .band {
    border-radius: 22px;
  }
  footer .wrap {
    justify-content: center;
    text-align: center;
  }
  footer a {
    margin: 0 8px;
  }
  .tg {
    order: 1;
    margin-left: auto;
  }
  #mb {
    order: 2;
    margin-left: 6px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
  nav .wrap {
    height: 60px;
  }
  .links {
    top: 60px;
  }
  .logo {
    font-size: 1.3rem;
  }
  .hero .btn, .dlb, .ph .btn, .sec .btn {
    width: 100%;
    justify-content: center;
    margin: 0 0 10px;
  }
  .dl {
    flex-direction: column;
    align-items: stretch;
  }
  .dlb {
    min-width: 0;
  }
  .sec {
    padding: 20px 16px;
  }
  .sec h2 {
    font-size: 1.2rem;
  }
  .card {
    padding: 20px;
  }
  .tick div {
    font-size: 1rem;
    gap: 24px;
  }
  .band {
    padding: 40px 16px;
  }
  .toc a {
    font-size: .8rem;
    padding: 6px 10px;
  }
  .sec .btn {
    word-break: break-all;
  }
}

@media (max-width: 360px) {
  h1 { font-size: 1.9rem; }
  .badge { font-size: 0.75rem; }
}

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