/* Brain Memo — brainmemo.app
   Brand kit v1.0: Midnight Navy, Soft Lavender, Mist, Slate.
   IBM Plex Sans for English, Noto Sans Arabic for Arabic. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/noto-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/noto-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/noto-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/noto-sans-arabic-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --navy: #15213F;
  --navy-2: #1E2C52;
  --lavender: #D6CAFF;
  --lavender-soft: #EEE9FF;
  --mist: #F6F4FB;
  --slate: #586176;
  --white: #FFFFFF;
  --line: #E5E2EE;
  --on-navy-muted: #B9BCD0;

  --font: "IBM Plex Sans", "Noto Sans Arabic", system-ui, sans-serif;
  --radius: 28px;
  --wrap: 1160px;
  --gutter: 24px;
}

:lang(ar) { --font: "Noto Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

*, *::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;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(ar) body, body:lang(ar) { font-size: 18px; line-height: 1.8; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.4; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 16px; top: 16px; z-index: 10; background: var(--navy); color: var(--white); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }

/* ---------------------------------------------------------------- nav */

.nav { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav .brand img { height: 44px; width: auto; margin-inline-start: -6px; }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0 0 0 auto; padding: 0; }
:lang(ar) .nav ul { margin: 0 auto 0 0; }
.nav ul a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--slate); }
.nav ul a:hover { color: var(--navy); }
.lang { font-weight: 600; font-size: 15px; text-decoration: none; padding: 7px 14px; border-radius: 999px; background: var(--mist); }
.lang:hover { background: var(--lavender-soft); }
.lang[lang="ar"] { font-family: "Noto Sans Arabic", sans-serif; }
.lang[lang="en"] { font-family: "IBM Plex Sans", sans-serif; }

/* ------------------------------------------------------------- buttons */

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: background .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ghost { background: var(--mist); color: var(--navy); }
.btn-ghost:hover { background: var(--lavender-soft); }
.btn-lavender { background: var(--lavender); color: var(--navy); }
.btn-lavender:hover { background: #E4DCFF; }
.btn svg { width: 20px; height: 20px; flex: none; }
:lang(ar) .btn .arrow { transform: scaleX(-1); }

/* ---------------------------------------------------------------- hero */

.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy); background: var(--lavender-soft); padding: 6px 14px 6px 10px; border-radius: 999px; margin-bottom: 22px; }
:lang(ar) .eyebrow { padding: 6px 10px 6px 14px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); }
.hero h1 { font-size: clamp(40px, 5.2vw, 60px); }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--lavender) 62%, var(--lavender) 92%, transparent 92%); padding-inline: 2px; }
.hero .lede { margin-top: 22px; font-size: 20px; line-height: 1.55; color: var(--slate); max-width: 34em; }
:lang(ar) .hero .lede { font-size: 20px; line-height: 1.85; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--slate); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--navy); }

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 600px; }
.hero-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--lavender-soft); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hero-art .phone { position: relative; }
.hero-art .phone.front { width: 290px; z-index: 2; }
.hero-art .phone.back { width: 250px; margin-top: 64px; margin-inline-start: -70px; z-index: 1; }
.hero-art .bubble { position: absolute; z-index: 3; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px; font-size: 14px; line-height: 1.4; box-shadow: 0 12px 32px rgba(21, 33, 63, .1); display: flex; gap: 10px; align-items: center; }
.hero-art .bubble b { display: block; font-weight: 600; }
.hero-art .bubble span { color: var(--slate); font-size: 13px; }
.hero-art .bubble .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--lavender); display: grid; place-items: center; flex: none; }
.hero-art .bubble .ic svg { width: 20px; height: 20px; }
.hero-art .b1 { top: 70px; inset-inline-start: -10px; }
.hero-art .b2 { bottom: 70px; inset-inline-end: -6px; }

/* phone frame around a screenshot */
.phone { background: var(--navy); padding: 9px; border-radius: 46px; box-shadow: 0 30px 60px -20px rgba(21, 33, 63, .35), 0 0 0 1px rgba(21, 33, 63, .08); }
.phone img { border-radius: 38px; width: 100%; aspect-ratio: 780 / 1688; object-fit: cover; object-position: top; background: var(--white); }

/* ------------------------------------------------------------ sections */

section { scroll-margin-top: 80px; }
.section { padding: 96px 0; }
.section.mist { background: var(--mist); }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin-bottom: 14px; }
:lang(ar) .kicker { letter-spacing: 0; font-size: 15px; }
.section h2, .privacy h2 { font-size: clamp(32px, 4vw, 44px); max-width: 18em; }
.section .intro, .privacy .intro { margin-top: 18px; font-size: 19px; color: var(--slate); max-width: 38em; }
.center { text-align: center; }
.center h2, .center .intro { margin-inline: auto; }

/* how it works: three phones */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; counter-reset: step; }
.step .phone { width: 100%; max-width: 280px; margin-inline: auto; }
.step h3 { font-size: 22px; margin-top: 32px; display: flex; align-items: center; gap: 12px; }
.step h3::before { counter-increment: step; content: counter(step); width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--lavender); display: inline-grid; place-items: center; font-size: 15px; flex: none; }
.step p { margin-top: 10px; color: var(--slate); }

/* feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .art { background: var(--lavender-soft); border-radius: 40px; padding: 48px 32px 0; display: flex; justify-content: center; overflow: hidden; height: 520px; }
.feature .art .phone { width: 300px; border-radius: 46px 46px 0 0; padding-bottom: 0; align-self: flex-start; }
.feature .art .phone img { border-radius: 38px 38px 0 0; aspect-ratio: auto; height: 470px; object-fit: cover; object-position: top; }
.feature.flip .art { order: 2; }
.feature h3 { font-size: clamp(28px, 3vw, 36px); }
.feature p.body { margin-top: 16px; font-size: 18px; color: var(--slate); }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--lavender) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315213F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
:lang(ar) .ticks li::before { margin-top: 6px; }

/* privacy band */
.privacy { background: var(--navy); color: var(--white); border-radius: 48px; margin-inline: var(--gutter); padding: 96px 0; }
.privacy .kicker { color: var(--lavender); }
.privacy h2 { color: var(--white); }
.privacy .intro { color: var(--on-navy-muted); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; }
.pcard { background: var(--navy-2); border-radius: var(--radius); padding: 28px; }
.pcard .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--lavender); color: var(--navy); display: grid; place-items: center; }
.pcard .ic svg { width: 24px; height: 24px; }
.pcard h3 { font-size: 19px; margin-top: 22px; color: var(--white); }
.pcard p { margin-top: 8px; color: var(--on-navy-muted); font-size: 16px; }
.note { margin-top: 36px; font-size: 15px; color: var(--on-navy-muted); }

/* bilingual */
.bi { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.sample { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; display: grid; gap: 18px; }
.sample .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.sample .who i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid currentColor; font-size: 13px; }
.sample .who small { font-weight: 400; color: var(--slate); font-family: "IBM Plex Sans", sans-serif; }
.sample .line { margin-top: 6px; font-size: 18px; line-height: 1.8; }
.sample mark { background: var(--lavender-soft); color: inherit; padding: 1px 4px; border-radius: 4px; }
.sample [lang="ar"] { font-family: "Noto Sans Arabic", "IBM Plex Sans", sans-serif; }
.sample [lang="en"] { font-family: "IBM Plex Sans", "Noto Sans Arabic", sans-serif; }
.s-purple { color: #7559D6; } .s-green { color: #1F8A5B; } .s-orange { color: #D9622B; }

/* small feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.mist .card { border-color: transparent; }
.card .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--lavender-soft); color: var(--navy); display: grid; place-items: center; }
.card .ic svg { width: 22px; height: 22px; }
.card h3 { font-size: 19px; margin-top: 20px; }
.card p { margin-top: 8px; color: var(--slate); font-size: 16px; }

/* faq */
.faq { max-width: 820px; margin: 48px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 0; font-weight: 600; font-size: 19px; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; font-size: 22px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 26px; color: var(--slate); max-width: 44em; }

/* closing cta */
.cta { text-align: center; padding: 104px 0 96px; }
.cta img.icon { width: 88px; height: 88px; margin: 0 auto 28px; }
.cta h2 { font-size: clamp(34px, 4.6vw, 52px); margin-inline: auto; max-width: 16em; }
.cta p { margin: 18px auto 0; color: var(--slate); font-size: 19px; max-width: 32em; }
.cta .ctas { justify-content: center; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 15px; color: var(--slate); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer img { height: 36px; width: auto; margin-inline-start: -5px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--navy); }

/* reveal on scroll (only when JS has marked the page) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------------------------------------------------------- responsive */

@media (max-width: 1020px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .feature { gap: 48px; }
}

@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .nav ul { display: none; }
  .nav .lang { margin-inline-start: auto; }
  .hero { padding-top: 32px; }
  .hero .wrap, .bi { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; margin-top: 8px; }
  .hero-art::before { width: 380px; height: 380px; }
  .hero-art .phone.front { width: 230px; }
  .hero-art .phone.back { width: 190px; margin-inline-start: -60px; margin-top: 48px; }
  .hero-art .b1 { top: 24px; inset-inline-start: 0; }
  .hero-art .b2 { bottom: 24px; inset-inline-end: 0; }
  .section { padding: 72px 0; }
  .steps { grid-template-columns: 1fr; gap: 56px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 36px; padding: 40px 0; }
  .feature.flip .art { order: 0; }
  .feature .art { height: 440px; padding-top: 36px; border-radius: 32px; }
  .feature .art .phone { width: 260px; }
  .feature .art .phone img { height: 400px; }
  .privacy { border-radius: 32px; padding: 72px 0; margin-inline: 8px; }
  .faq summary { font-size: 17px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero .lede { font-size: 18px; }
  .hero-art .bubble { display: none; }
  .hero-art .phone.front { width: 200px; }
  .hero-art .phone.back { width: 168px; margin-inline-start: -56px; }
  .hero-art::before { width: 320px; height: 320px; }
  .pgrid, .grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .nav .brand img { height: 38px; }
}
