/* ==========================================================================
   MERAI — website stylesheet
   Design tokens taken from the MERAI Figma export (plum #6D4C71,
   lavender #E0CFE3, pink #FFB3C6, ink #1A1A1A).
   Sections: tokens · reset · layout · buttons · header · footer
             home · feature pages · about · legal · motion · responsive
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --plum:        #6D4C71;
  --plum-deep:   #7C4B83;
  --plum-dark:   #5A3E5E;
  --lavender:    #E0CFE3;
  --lavender-50: #F3EBF5;
  --pink:        #FFB3C6;

  --ink:         #1A1A1A;
  --ink-2:       #1E1E1E;
  --body:        #3A3A3A;
  --muted:       #6E6870;
  --paper:       #FFFFFF;
  --soft:        #F9F9F9;

  --line:        rgba(26, 26, 26, .10);
  --line-inv:    rgba(255, 255, 255, .18);

  --brand-grad:  linear-gradient(160deg, #DFB6E2 0%, #9B5FA8 100%);
  --btn-grad:    linear-gradient(92deg, #7C5A85 0%, #6D4C71 100%);

  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   24px;
  --radius-xl:   40px;

  --shadow-sm:   0 2px 10px rgba(26, 26, 26, .06);
  --shadow:      0 18px 44px -20px rgba(26, 26, 26, .28);
  --shadow-lg:   0 40px 90px -34px rgba(26, 26, 26, .42);

  --container:   1240px;
  --gutter:      clamp(20px, 4.4vw, 48px);
  --nav-h:       88px;

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }

:focus-visible { outline: 3px solid var(--plum-deep); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 300;
  background: var(--ink); color: #fff; padding: 12px 20px;
  border-radius: 0 0 12px 12px; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--soft { background: var(--soft); }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
}
.split--reverse > *:first-child { order: 2; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 30px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; letter-spacing: -.005em;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--plum { background: var(--btn-grad); color: #fff; box-shadow: 0 10px 24px -12px rgba(109, 76, 113, .9); }
.btn--plum:hover { box-shadow: 0 16px 32px -14px rgba(109, 76, 113, 1); }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; }

.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: #fff; box-shadow: var(--shadow); }

.btn--outline { border-color: currentColor; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 9px 20px 9px 14px; border-radius: 12px;
  background: var(--ink); color: #fff; min-width: 178px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store img, .store svg { width: 26px; height: 26px; flex: none; }
.store span { display: block; line-height: 1.2; }
.store .store__top  { font-size: .7rem; opacity: .8; }
.store .store__name { font-size: .95rem; font-weight: 600; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; }
.logo img { width: 38px; height: auto; flex: none; }
.logo span {
  font-size: 1.65rem; font-weight: 800; letter-spacing: -.045em; line-height: 1;
  color: var(--ink);
}
.logo--light span { color: #fff; }
.logo--sm img { width: 30px; }
.logo--sm span { font-size: 1.35rem; }

/* ---------- header ---------- */
.header { position: absolute; top: 0; left: 0; right: 0; z-index: 120; }
.header--solid {
  position: sticky; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .25s ease, box-shadow .25s ease;
}
.header--solid.is-stuck { border-bottom-color: var(--line); box-shadow: 0 4px 22px -16px rgba(26, 26, 26, .5); }

.header__inner { display: flex; align-items: center; gap: 24px; height: var(--nav-h); }

.mainnav { display: flex; align-items: center; gap: 6px; margin-inline: auto; }
.mainnav > li { position: relative; }
.mainnav a:not(.btn), .mainnav .navbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 1rem; font-weight: 500; color: var(--ink);
  transition: opacity .18s ease, background-color .18s ease;
}
.mainnav a:not(.btn):hover, .mainnav .navbtn:hover { background: rgba(26, 26, 26, .05); }
.mainnav .navbtn { cursor: pointer; }
.mainnav .navbtn svg { width: 15px; height: 15px; transition: transform .25s ease; }
.mainnav .navbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.mainnav [aria-current="page"] { color: var(--plum); font-weight: 600; }

.header--hero .mainnav a:not(.btn),
.header--hero .mainnav .navbtn { color: #fff; }
.header--hero .mainnav a:not(.btn):hover,
.header--hero .mainnav .navbtn:hover { background: rgba(255, 255, 255, .16); }
.header--hero .mainnav [aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

/* features dropdown */
.dropdown {
  position: absolute; top: calc(100% + 10px); left: -8px; z-index: 130;
  width: min(460px, 88vw); padding: 26px 28px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  display: grid; gap: 18px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: none; }
.mainnav .dropdown a:not(.btn) {
  display: block; padding: 0; border-radius: 10px; background: none;
}
.mainnav .dropdown a:not(.btn):hover { background: none; }
.dropdown a strong {
  display: block; font-size: 1.02rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.015em; transition: color .18s ease;
}
.dropdown a:hover strong { color: var(--plum); }
.dropdown a p { margin-top: 5px; font-size: .84rem; line-height: 1.5; color: var(--muted); }

.navtoggle {
  display: none; margin-left: auto; width: 46px; height: 46px;
  border-radius: 12px; border: 1px solid var(--line); cursor: pointer;
  place-items: center; color: var(--ink);
}
.header--hero .navtoggle { border-color: rgba(255, 255, 255, .5); color: #fff; }
.navtoggle svg { width: 22px; height: 22px; }
.navtoggle .i-close { display: none; }
.navtoggle[aria-expanded="true"] .i-open { display: none; }
.navtoggle[aria-expanded="true"] .i-close { display: block; }

/* ---------- footer ---------- */
.footer { background: var(--plum); color: #fff; padding: clamp(48px, 6vw, 72px) 0 28px; }
.footer__top {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}
.footer h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; }
.footer nav ul { display: grid; gap: 13px; }
.footer nav a { font-size: .95rem; opacity: .92; transition: opacity .18s ease; }
.footer nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer .stores { margin-top: 34px; flex-direction: column; }
.footer .store { background: #1A1A1A; }

.footer__bottom {
  margin-top: clamp(32px, 5vw, 52px); padding-top: 22px;
  border-top: 1px solid var(--line-inv);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  transition: background-color .18s ease;
}
.socials a:hover { background: rgba(255, 255, 255, .14); }
.socials svg { width: 19px; height: 19px; }
.footer__meta { display: grid; gap: 6px; justify-items: end; font-size: .8rem; opacity: .9; text-align: right; }
.footer__meta .made { display: inline-flex; align-items: center; gap: 6px; }
.footer__meta .made img { width: 16px; }

/* ---------- home: hero ---------- */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 6, 12, .48) 0%, rgba(10, 6, 12, .10) 26%, rgba(10, 6, 12, 0) 45%),
    linear-gradient(to top, rgba(10, 6, 12, .34) 0%, rgba(10, 6, 12, 0) 40%);
}
.hero__inner { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(28px, 4vw, 56px); }
.hero__tagline {
  margin-left: auto; max-width: 15ch; text-align: right;
  color: #fff; font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.25;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
  margin-bottom: clamp(56px, 12vw, 150px);
}
.hero h1 {
  color: #fff; font-weight: 800; letter-spacing: -.04em; line-height: .95;
  font-size: clamp(3.2rem, 12vw, 10.5rem);
  text-shadow: 0 4px 40px rgba(0, 0, 0, .35);
}

/* ---------- home: intro ---------- */
.intro__lines { display: grid; gap: 6px; margin-bottom: 26px; }
.intro__lines p {
  font-size: clamp(1.5rem, 3.1vw, 2.35rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.2;
}
.intro__lines em { font-style: normal; color: var(--plum-deep); }
.intro p.copy { color: var(--body); font-size: 1rem; max-width: 44ch; }
.intro .btn { margin-top: 28px; }
.intro__phone { justify-self: center; max-width: 320px; }

/* ---------- home: band + stats ---------- */
.band { position: relative; height: clamp(280px, 42vw, 560px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; }

.stats__head { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
.stats__label { font-size: .95rem; font-weight: 600; color: var(--ink); }
.stats__head h2 { font-size: clamp(1.5rem, 2.8vw, 2.05rem); line-height: 1.3; }
.stats__head h2 + h2 { margin-top: 28px; }

.stats__grid {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px);
}
.stat b {
  display: block; font-size: clamp(2.6rem, 5.6vw, 4.25rem); font-weight: 700;
  letter-spacing: -.05em; line-height: 1; color: var(--ink);
}
.stat p { margin-top: 16px; font-size: 1rem; font-weight: 600; color: var(--ink); max-width: 22ch; }

/* ---------- page header (inner pages) ---------- */
.pagehead { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); text-align: center; }
.pagehead h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.pagehead p { margin: 16px auto 0; max-width: 62ch; color: var(--body); }
.pagehead--left { text-align: left; }
.pagehead--left p { margin-inline: 0; }

/* ---------- feature pages ---------- */
.frow { padding: clamp(40px, 6vw, 76px) 0; }
.frow h2 { margin-bottom: 22px; }
.frow p { color: var(--body); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.7; }
.frow ul { display: grid; gap: 18px; margin-top: 8px; }
.frow li {
  position: relative; padding-left: 26px;
  font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.55; color: var(--body);
}
.frow li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--plum);
}
.frow figure { margin: 0; justify-self: center; }
.frow figure img { max-height: 560px; width: auto; margin-inline: auto; }

.panel {
  background: var(--lavender); border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 52px); display: grid; place-items: center;
  min-height: 280px;
}
.panel img { max-height: 420px; width: auto; border-radius: 14px; }
.panel--tall img { max-height: 520px; }

/* chingu page */
.chingu-cta { display: grid; justify-items: center; gap: 26px; }
.chingu-cta img { max-width: 260px; }

/* ---------- about ---------- */
.prose-lead { font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.75; color: var(--body); }
.prose-lead p + p { margin-top: 18px; }

.founder { position: relative; margin-top: clamp(48px, 7vw, 88px); }
.founder__photo { border-radius: 0 var(--radius-xl) 0 var(--radius-xl); overflow: hidden; margin-left: auto; width: min(72%, 780px); }
.founder__photo img { width: 100%; height: auto; }
.founder__card {
  position: absolute; left: 0; top: clamp(-10px, 2vw, 24px); z-index: 2;
  background: #fff; border-radius: 4px 4px var(--radius) 4px;
  box-shadow: var(--shadow); padding: 26px 30px; max-width: 340px;
}
.founder__card h3 { font-size: 1.5rem; }
.founder__card .role { color: var(--plum-deep); font-weight: 700; font-size: .95rem; margin-top: 4px; }
.founder__card blockquote { margin: 18px 0 0; font-size: .98rem; font-weight: 600; line-height: 1.5; }

.misson-list { display: grid; gap: 16px; margin-top: 20px; }
.misson-list li { position: relative; padding-left: 24px; color: var(--body); line-height: 1.65; }
.misson-list li::before {
  content: ""; position: absolute; left: 4px; top: .68em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink);
}
.misson-list strong { color: var(--ink); }

/* ---------- legal / long-form ---------- */
.legal { padding-bottom: clamp(64px, 8vw, 104px); }
.legal__layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.legal__toc { position: sticky; top: calc(var(--nav-h) + 16px); }
.legal__toc h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.legal__toc ul { display: grid; gap: 10px; }
.legal__toc a { font-size: .92rem; color: var(--muted); line-height: 1.4; display: block; transition: color .18s ease; }
.legal__toc a:hover { color: var(--plum); }

.legal__body { max-width: 76ch; }
.legal__body > p:first-child { font-size: 1.05rem; color: var(--body); }
.legal__body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 44px;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.legal__body h3 { font-size: 1.12rem; margin-top: 30px; }
.legal__body p { margin-top: 14px; color: var(--body); font-size: 1rem; line-height: 1.7; }
.legal__body ul { margin-top: 16px; display: grid; gap: 11px; }
.legal__body li { position: relative; padding-left: 24px; color: var(--body); line-height: 1.65; }
.legal__body li::before {
  content: ""; position: absolute; left: 5px; top: .68em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--lavender);
  box-shadow: 0 0 0 1px var(--plum) inset;
}
.legal__body li strong { color: var(--ink); }
.legal__body a { color: var(--plum-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.callout {
  margin-top: 26px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--lavender-50); border: 1px solid var(--lavender);
}
.callout p:first-child { margin-top: 0; }

/* ---------- simple / stub pages ---------- */
.simple { padding: clamp(64px, 10vw, 130px) 0; text-align: center; }
.simple .mark { width: 74px; margin: 0 auto 26px; }
.simple h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.simple p { margin: 18px auto 0; max-width: 54ch; color: var(--body); }
.simple .btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 34px; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 44px; text-align: left; }
.contact-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.contact-card h3 { font-size: 1.1rem; }
.contact-card p { margin: 10px 0 0; max-width: none; font-size: .96rem; }
.contact-card a { color: var(--plum-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .store:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .legal__layout { grid-template-columns: 1fr; }
  .legal__toc { position: static; }
  .founder__photo { width: 100%; }
  .founder__card { position: static; max-width: none; margin-bottom: -20px; border-radius: var(--radius); }
}

@media (max-width: 900px) {
  :root { --nav-h: 76px; }
  .navtoggle { display: grid; }

  .mainnav {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    background: #fff; padding: 14px var(--gutter) 26px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 44px -26px rgba(26, 26, 26, .5);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    display: none;
  }
  .mainnav.is-open { display: flex; }
  .mainnav a:not(.btn), .mainnav .navbtn { color: var(--ink); width: 100%; padding: 13px 12px; font-size: 1.05rem; }
  .header--hero .mainnav a:not(.btn), .header--hero .mainnav .navbtn { color: var(--ink); }
  .header--hero .mainnav a:not(.btn):hover, .header--hero .mainnav .navbtn:hover { background: rgba(26, 26, 26, .05); }
  .header--hero .mainnav [aria-current="page"] { color: var(--plum); text-decoration: none; }
  .mainnav .navbtn { justify-content: space-between; }
  .mainnav > li:last-child { margin-top: 12px; }
  .mainnav > li:last-child .btn { width: 100%; }

  .dropdown {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-left: 2px solid var(--lavender);
    border-radius: 0; padding: 6px 0 10px 16px; margin: 2px 0 6px 12px;
    display: none;
  }
  .dropdown.is-open { display: grid; }
  .dropdown a p { display: none; }

  .split { grid-template-columns: 1fr; }
  .split--reverse > *:first-child { order: 0; }
  .stats__head { grid-template-columns: 1fr; gap: 20px; }
  .stats__grid { grid-template-columns: 1fr; gap: 36px; }
  .stat p { max-width: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__bottom { justify-content: flex-start; }
  .footer__meta { justify-items: start; text-align: left; }
  .frow figure img { max-height: 460px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { min-height: 78vh; }
  .hero__tagline { max-width: 12ch; margin-bottom: 40px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer .stores { flex-direction: row; }
  .panel { padding: 22px; border-radius: var(--radius-lg); }
  .frow figure img { max-height: 380px; }
  .store { min-width: 0; flex: 1 1 160px; }
}
