/* Mely site — brand tokens from app theme */
:root {
  --ink: #17181c;
  --muted: #8a8f98;
  --faint: #b4b8c0;
  --line: #e6e8ec;
  --bg: #fbfcfe;
  --card: #ffffff;
  --primary: #8a66f7;
  --primary-soft: #c4b5fc;
  --lavender: #f1e9fc;
  --movement: #a66be8;
  --sky: #eaf3fc;
  --blue: #4685e8;
  --mint: #e7f6ee;
  --green: #2fa36b;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --page-pad: clamp(20px, 5vw, 28px);
}

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

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 8% 12%, rgba(138, 102, 247, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 92% 8%, rgba(70, 133, 232, 0.12), transparent 52%),
    radial-gradient(ellipse 55% 40% at 78% 92%, rgba(166, 107, 232, 0.1), transparent 55%),
    linear-gradient(165deg, #fbfcfe 0%, #f5f1fc 42%, #eef5fb 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: pulse-soft 14s ease-in-out infinite;
}

a {
  color: var(--primary);
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

/* —— Header / nav —— */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(251, 252, 254, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(230, 232, 236, 0.8);
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 64px;
  height: auto;
  padding-block: 12px;
  gap: 10px 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.35px;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  transition: color 0.15s ease;
}

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

.topbar {
  width: 100%;
  border-bottom: 1px solid rgba(230, 232, 236, 0.8);
  background: rgba(251, 252, 254, 0.72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.topbar .inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 18px var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.topbar .brand {
  font-size: 18px;
}

.topbar .mark {
  width: 32px;
  height: 32px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.top-nav a:hover {
  color: var(--ink);
}

/* —— Homepage hero —— */
.hero {
  width: 100%;
  text-align: center;
  padding-top: clamp(48px, 10vw, 88px);
  padding-bottom: clamp(40px, 8vw, 68px);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 auto 18px;
  max-width: 16ch;
  width: 100%;
  animation: rise 0.75s ease-out both;
}

.hero p {
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  color: var(--muted);
  max-width: 36em;
  width: 100%;
  margin: 0 auto 28px;
  animation: rise 0.75s ease-out 0.08s both;
}

.accent {
  background: linear-gradient(135deg, var(--primary), var(--movement));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  max-width: 100%;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 15px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 32px rgba(23, 24, 28, 0.14);
  animation: rise 0.75s ease-out 0.16s both;
}

.appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(138, 102, 247, 0.22);
}

.appstore .apple {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: #fff;
}

.appstore span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}

.appstore small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.2px;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.appstore strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-top: -1px;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* —— Homepage sections —— */
.section {
  width: 100%;
  padding-top: 28px;
  padding-bottom: 72px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.125rem);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  text-align: center;
  width: 100%;
}

.section-lead {
  color: var(--muted);
  margin: 0 auto 36px;
  max-width: 38em;
  width: 100%;
  text-align: center;
  font-size: clamp(1rem, 2.8vw, 1.0625rem);
}

.feature-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 720px;
}

.feature-list li {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.feature-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.2px;
  margin-bottom: 4px;
  color: var(--ink);
}

.feature-list span {
  color: var(--muted);
  font-size: 15.5px;
  overflow-wrap: anywhere;
}

.feature-list a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 650;
}

.feature-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guides {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 720px) {
  .guides {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 32px;
  }
}

.guide-link {
  display: block;
  text-decoration: none;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
  transition: transform 0.18s ease;
}

.guide-link:last-child {
  border-bottom: 1px solid var(--line);
}

@media (min-width: 720px) {
  .guide-link,
  .guide-link:last-child {
    border: none;
    padding: 0;
  }

  .guide-link:hover {
    transform: translateY(-2px);
  }
}

.guide-link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  color: var(--ink);
  transition: color 0.15s ease;
}

.guide-link span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.guide-link:hover strong {
  color: var(--primary);
}

.support {
  width: 100%;
  text-align: center;
  padding-top: 24px;
  padding-bottom: 72px;
}

.support h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.support p {
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: 34em;
  width: 100%;
}

.mailbtn {
  display: inline-block;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 650;
  text-decoration: none;
  color: var(--primary);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.mailbtn:hover {
  border-color: var(--primary-soft);
  background: var(--lavender);
  transform: translateY(-1px);
}

/* —— Content / legal / guide pages —— */
body > main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--page-pad) 72px;
}

body.home > main {
  max-width: none;
  margin: 0;
  padding: 0;
}

.eyebrow,
.updated {
  color: var(--primary);
  font-weight: 650;
  margin: 0 0 8px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.5vw, 1.3rem);
  letter-spacing: -0.02em;
  margin: 36px 0 8px;
}

h3 {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.2px;
  margin: 22px 0 6px;
}

body > main p,
body > main li {
  color: var(--muted);
  overflow-wrap: anywhere;
}

body > main strong {
  color: var(--ink);
}

.intro {
  color: var(--muted);
  margin: 0 0 28px;
}

ul,
ol {
  padding-left: 1.25em;
}

li {
  margin: 4px 0;
}

.callout {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 20px 0;
  backdrop-filter: blur(8px);
}

.callout strong {
  color: var(--ink);
}

.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--movement));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(138, 102, 247, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(138, 102, 247, 0.34);
  color: #fff;
}

.related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related a {
  display: block;
  margin: 8px 0;
  font-weight: 600;
  text-decoration: none;
}

.back {
  display: inline-block;
  margin-top: 40px;
  font-weight: 600;
  text-decoration: none;
}

.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-list li {
  border-top: 1px solid var(--line);
}

.guide-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.guide-list a {
  display: block;
  padding: 18px 0;
  text-decoration: none;
}

.guide-list strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  transition: color 0.15s ease;
}

.guide-list span {
  color: var(--muted);
  font-size: 15px;
}

.guide-list a:hover strong {
  color: var(--primary);
}

.disclaimer {
  color: var(--faint);
  font-size: 12.5px;
  max-width: 70ch;
  width: 100%;
  margin: 18px auto 0;
  text-align: center;
  line-height: 1.5;
}

body > main .disclaimer {
  text-align: left;
  margin: 28px 0 0;
  font-size: 13px;
}

/* —— Footer —— */
footer {
  width: 100%;
  border-top: 1px solid rgba(230, 232, 236, 0.9);
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
}

footer .inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 22px var(--page-pad);
  color: var(--faint);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--faint);
  font-size: 14px;
  width: 100%;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  font-weight: 600;
  min-width: 0;
}

.foot-links a {
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--ink);
}

body.home footer {
  padding: 32px 0 48px;
}

/* —— Motion —— */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.36;
  }
}

/* —— Responsive —— */
@media (max-width: 640px) {
  .brand {
    font-size: 17px;
    gap: 8px;
  }

  .mark {
    width: 30px;
    height: 30px;
  }

  .nav {
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 10px 14px;
    font-size: 13px;
  }

  .topbar .inner {
    padding-block: 14px;
  }

  .top-nav {
    width: 100%;
    justify-content: flex-start;
    font-size: 13px;
  }

  .section {
    padding-top: 12px;
    padding-bottom: 56px;
  }

  .section-lead {
    margin-bottom: 28px;
  }

  .support {
    padding-top: 12px;
    padding-bottom: 56px;
  }

  body > main {
    padding-top: 36px;
    padding-bottom: 56px;
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
  }

  .foot,
  footer .inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .appstore {
    padding: 12px 18px;
  }

  .appstore strong {
    font-size: 16px;
  }

  .hero h1,
  .hero p,
  .appstore {
    animation: none;
  }
}

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