/* Memlow website. Colours, type and shapes follow the app (paper, ink, note colours, Bricolage + DM Sans). */

/* Urdu is written in Nastaliq, as in the app (only Arabic-script letters use it, so it loads on Urdu pages only). */
@font-face { font-family: "Memlow Nastaliq"; font-weight: 400; font-style: normal; font-display: swap; src: url("/notefonts/noto_nastaliq_urdu_regular.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Memlow Nastaliq"; font-weight: 700 800; font-style: normal; font-display: swap; src: url("/notefonts/noto_nastaliq_urdu_bold.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Bricolage"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/bricolage-800.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/dmsans-400.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/dmsans-500.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/dmsans-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #F3F1EC;
  --paper-deep: #EAE6DD;
  --card: #FFFFFF;
  --ink: #1E1B26;
  --ink-soft: #3A3644;
  --muted: #5E5968;
  --line: rgba(30, 27, 38, .11);
  --dots: rgba(30, 27, 38, .075);
  --butter: #FBE7A1;
  --sage: #CFE2C9;
  --peach: #F8D2BF;
  --sky: #CFE1F2;
  --lilac: #DDD3F0;
  --rose: #F7D5DE;
  --mint: #CDEBE3;
  --butter-ink: #6B5310;
  --late: #B4431D;
  --on-ink: #F3F1EC;
  --phone: #17151E;
  --shadow: 0 40px 80px -30px rgba(30, 27, 38, .35);
  --shadow-soft: 0 18px 40px -22px rgba(30, 27, 38, .35);
  --radius: 28px;
  --max: 1180px;
  --display: "Bricolage", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Glass (the header), the hairline around cards, and the soft lift of a card. */
  --glass: rgba(255, 255, 255, .7);
  --ring: rgba(30, 27, 38, .07);
  --lift: 0 1px 1px rgba(30, 27, 38, .04), 0 14px 34px -20px rgba(30, 27, 38, .3);
  --band: #1E1B26;
}

/* Dark: chosen with the switch in the header or footer (assets/js/site.js sets data-mode). Light is
   the default, like the app's paper. */
:root[data-mode="dark"] {
  color-scheme: dark;
  --paper: #141218;
  --paper-deep: #1B1821;
  --card: #1F1C26;
  --ink: #F3F1EC;
  --ink-soft: #D9D4DF;
  --muted: #B3ADBC;
  --line: rgba(243, 241, 236, .12);
  --dots: rgba(243, 241, 236, .06);
  --butter: #3C3418;
  --sage: #22322A;
  --peach: #3D2820;
  --sky: #1D2C3B;
  --lilac: #2A2440;
  --rose: #3A2330;
  --mint: #1B332D;
  --butter-ink: #F2D673;
  --late: #F08A62;
  --on-ink: #1E1B26;
  --phone: #000000;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  --shadow-soft: 0 18px 40px -22px rgba(0, 0, 0, .7);
  --glass: rgba(31, 28, 38, .72);
  --ring: rgba(243, 241, 236, .08);
  --lift: 0 1px 1px rgba(0, 0, 0, .25), 0 14px 34px -20px rgba(0, 0, 0, .7);
  --band: #221F2B;
}
/* Switching doesn't animate every colour on the page. */
.mode-switching *, .mode-switching *::before, .mode-switching *::after { transition: none !important; }

/* ---- Base ---------------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; }
h3 { font-family: var(--body); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
::selection { background: var(--butter); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }
.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dots { background-image: radial-gradient(var(--dots) 1.6px, transparent 2px); background-size: 28px 28px; }

/* ---- Buttons, chips ------------------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 700 17px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--card); }
.btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }

/* Google Play button: "Coming soon" until launch, then a link (see the launch switch at the end). */
.store-btn {
  display: inline-flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 26px 8px 18px;
  border-radius: 18px; background: var(--ink); color: var(--paper); text-decoration: none; box-shadow: var(--shadow-soft);
  transition: transform .15s ease;
}
.store-btn:hover { transform: translateY(-1px); }
.store-btn .icon { width: 28px; height: 28px; stroke-width: 1.9; }
.store-btn small { display: block; font: 500 12px/1.2 var(--body); opacity: .75; letter-spacing: .02em; }
.store-btn strong { display: block; font: 700 19px/1.15 var(--body); }
.store-btn[aria-disabled="true"] { cursor: default; }
.store-btn[aria-disabled="true"]:hover { transform: none; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 600 15px/1.2 var(--body); color: var(--ink-soft);
}
.chip .icon { width: 18px; height: 18px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 600 15px/1.2 var(--body); color: var(--ink-soft);
}
.eyebrow b { padding: 5px 12px; border-radius: 999px; background: var(--butter); color: var(--butter-ink); font-weight: 700; }
.kicker { display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 14px/1.2 var(--body); letter-spacing: .02em; }

/* ---- Header -------------------------------------------------------------------------------- */
/* A floating glass bar, like the app's sidebar: the page shows softly through it. */

.site-header { position: sticky; top: 0; z-index: 50; padding: 12px 0 0; pointer-events: none; }
.site-header .container {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px;
  width: calc(100% - 32px); max-width: calc(var(--max) - 24px); padding: 0 10px 0 16px; pointer-events: auto;
  border-radius: 22px; background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: inset 0 0 0 1px var(--ring), 0 12px 32px -22px rgba(30, 27, 38, .35);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header.scrolled .container { box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -22px rgba(30, 27, 38, .45); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font: 800 26px/1 var(--display); letter-spacing: -.045em; }
.nav { order: 1; margin-inline-start: auto; display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) { padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 15.5px; text-decoration: none; color: var(--ink-soft); transition: background-color .15s ease, color .15s ease; }
.nav a:not(.btn):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.nav a[aria-current]:not(.btn) { background: var(--ink); color: var(--paper); }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: 15px; margin-inline-start: 6px; }
/* The account button: "Sign in", or a round photo or initial when signed in. */
.nav a.account-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; margin-inline-start: 6px;
  border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); background: transparent; color: var(--ink);
  font: 700 15px/1 var(--body); text-decoration: none;
}
.nav a.account-btn:hover { background: var(--card); }
.nav a.account-btn.is-in { width: 44px; padding: 0; overflow: hidden; background: var(--butter); color: var(--butter-ink); font: 800 18px/1 var(--display); box-shadow: inset 0 0 0 1.5px var(--line); }
.nav a.account-btn.is-in img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Light or dark: the sun shows in dark (to go light), the moon in light. */
.mode-btn {
  order: 2; display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color .15s ease, transform .2s ease;
}
.mode-btn:hover { background: var(--card); }
.mode-btn:active { transform: scale(.94); }
.mode-btn .icon { grid-area: 1 / 1; width: 20px; height: 20px; transition: opacity .2s ease, transform .3s ease; }
.mode-btn .sun { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-mode="dark"] .mode-btn .sun { opacity: 1; transform: none; }
[data-mode="dark"] .mode-btn .moon { opacity: 0; transform: rotate(60deg) scale(.6); }
html:not(.js) .mode-btn, html:not(.js) .mode-pick { display: none; }

.menu-btn { order: 3; display: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.menu-btn .close { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }

/* Without JavaScript the links simply wrap; with it, they fold into a menu on small screens. */
@media (max-width: 1080px) {
  .site-header { position: static; }
  .site-header .container { flex-wrap: wrap; padding-block: 8px; }
  .nav { flex-wrap: wrap; }
  .js .site-header { position: sticky; }
  .js .site-header .container { flex-wrap: nowrap; padding-block: 0; }
  .js .mode-btn { margin-inline-start: auto; }
  .js .menu-btn { display: inline-flex; }
  .js .nav {
    position: absolute; inset-inline: 0; top: calc(100% + 8px); display: none; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  }
  .js .menu-open .nav { display: flex; }
  .js .nav a:not(.btn) { padding: 14px 16px; font-size: 17px; }
  .js .nav .btn { margin: 6px 0 0; min-height: 52px; }
  .js .nav a.account-btn { margin: 6px 0 0; min-height: 52px; font-size: 17px; }
  .js .nav a.account-btn.is-in { width: auto; border-radius: 999px; }
  .js .nav a.account-btn.is-in img { width: 40px; height: 40px; }
}
@media (max-width: 420px) { .brand span { font-size: 23px; } .site-header .container { width: calc(100% - 20px); padding-inline-start: 12px; } }
/* ---- Phone frame --------------------------------------------------------------------------- */

.phone {
  position: relative; width: 300px; padding: 10px; border-radius: 44px; background: var(--phone);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.phone img { width: 100%; height: auto; border-radius: 35px; }

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

.hero { position: relative; padding: 56px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(48% 55% at 82% 38%, color-mix(in srgb, var(--butter) 90%, transparent), transparent 70%),
    radial-gradient(36% 40% at 100% 95%, color-mix(in srgb, var(--peach) 80%, transparent), transparent 70%),
    radial-gradient(30% 35% at 0% 100%, color-mix(in srgb, var(--sky) 70%, transparent), transparent 70%);
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(46px, 7.2vw, 88px); margin: 22px 0 22px; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--butter) 62%, var(--butter) 92%, transparent 92%); padding-inline: .06em; }
.lead { font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; color: var(--muted); max-width: 560px; margin-bottom: 30px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }

.hero-visual { position: relative; height: 660px; }
.hero-visual .phone { position: absolute; }
.hero-visual .phone-front { width: 300px; inset-inline-end: 150px; top: 20px; z-index: 2; }
.hero-visual .phone-back { width: 270px; inset-inline-end: -10px; top: 92px; transform: rotate(6deg); z-index: 1; }
.float-card {
  position: absolute; z-index: 3; display: flex; gap: 14px; padding: 16px 18px; border-radius: 26px;
  background: var(--card); box-shadow: var(--shadow); color: var(--ink);
}
.popup { inset-inline-start: -10px; top: 300px; width: 340px; animation: float 6s ease-in-out infinite; }
.popup .bell { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--peach); display: grid; place-items: center; color: #6A3A28; }
.popup .bell .icon { width: 22px; height: 22px; fill: currentColor; stroke-width: 1.4; }
.popup .meta { display: block; font: 500 14px/1.2 var(--body); color: var(--muted); margin-bottom: 4px; }
.popup .title { display: block; font: 700 17px/1.25 var(--body); margin-bottom: 12px; }
.popup .actions { display: flex; gap: 8px; }
.popup .actions span { padding: 8px 16px; border-radius: 999px; font: 700 14px/1.2 var(--body); background: var(--paper-deep); }
.popup .actions span:first-child { background: var(--ink); color: var(--paper); }
.saved { inset-inline-end: 14px; bottom: 40px; align-items: center; padding: 12px 18px; border-radius: 999px; font: 600 15px/1.2 var(--body); animation: float 7s ease-in-out infinite reverse; }
.saved i { width: 10px; height: 10px; border-radius: 50%; background: #3E9B5A; box-shadow: 0 0 0 5px color-mix(in srgb, #3E9B5A 22%, transparent); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 980px) {
  .hero { padding-top: 32px; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-copy .cta-row, .hero-copy .chips { justify-content: center; }
  .hero-visual { height: 600px; max-width: 560px; width: 100%; margin-inline: auto; }
  .hero-visual .phone-front { inset-inline-end: auto; inset-inline-start: 50%; margin-inline-start: -170px; }
  .hero-visual .phone-back { inset-inline-end: 0; }
  .popup { inset-inline-start: 0; top: 330px; }
}
@media (max-width: 560px) {
  .hero-visual { height: 520px; }
  .hero-visual .phone-front { width: 250px; margin-inline-start: -150px; }
  .hero-visual .phone-back { width: 220px; inset-inline-end: -24px; top: 70px; }
  .popup { width: 290px; top: 300px; inset-inline-start: -4px; padding: 14px; }
  .popup .title { font-size: 15px; }
  .saved { display: none; }
}

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

.section { padding: 104px 0; }
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(36px, 5.2vw, 60px); margin-bottom: 18px; }
.section-head p { font-size: 20px; color: var(--muted); margin: 0; }

/* Promise strip */
.promise { padding: 0 0 40px; }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise li { display: flex; gap: 14px; padding: 22px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.promise .badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--ink); }
.promise strong { display: block; font-size: 17px; line-height: 1.3; margin-bottom: 2px; }
.promise span { display: block; font-size: 15px; line-height: 1.45; color: var(--muted); }
@media (max-width: 980px) { .promise ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .promise ul { grid-template-columns: 1fr; } }

.bg-butter { background-color: var(--butter); }
.bg-sage { background-color: var(--sage); }
.bg-peach { background-color: var(--peach); }
.bg-sky { background-color: var(--sky); }
.bg-lilac { background-color: var(--lilac); }
.bg-rose { background-color: var(--rose); }
.bg-mint { background-color: var(--mint); }

/* Feature rows: copy beside a phone that rises from a note-coloured panel. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.feature + .feature { margin-top: 120px; }
.feature.flip .feature-visual { order: 2; }
.feature h2 { font-size: clamp(34px, 4.4vw, 54px); margin-bottom: 18px; }
.feature .lead { margin-bottom: 26px; }
.feature-visual {
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  height: 600px; padding-top: 64px; border-radius: 40px; overflow: hidden;
  background-image: radial-gradient(var(--dots) 1.6px, transparent 2px); background-size: 28px 28px;
}
.feature-visual .phone { width: 320px; }
.feature-visual.top-cut { align-items: flex-end; padding: 0 0 64px; }
.feature-visual .float-card { top: auto; inset-inline-start: 28px; bottom: 32px; width: auto; max-width: 300px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 14px; align-items: flex-start; font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.ticks li .tick { width: 28px; height: 28px; flex: none; border-radius: 9px; background: var(--ink); color: var(--paper); display: grid; place-items: center; margin-top: 1px; }
.ticks li .tick .icon { width: 17px; height: 17px; stroke-width: 2.6; }
.ticks strong { color: var(--ink); }
@media (max-width: 980px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .feature-visual { order: 0; }
  .feature + .feature { margin-top: 88px; }
  .feature-visual { height: 520px; }
  .feature-visual .phone { width: 290px; }
}
@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .feature-visual { height: 460px; border-radius: 32px; padding-top: 44px; }
  .feature-visual .phone { width: 260px; }
}

/* Widgets panel: the home screen crop sits in a rounded "screen". */
.widget-shot { width: min(440px, 88%); margin-top: 0; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow); }
.widget-shot img { width: 100%; height: auto; }

/* Feature grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile { padding: 28px; border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.tile .badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; color: var(--ink); }
.tile h3 { font-size: 20px; margin-bottom: 8px; }
.tile p { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0; }
@media (max-width: 980px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Ink band */
.band { background: var(--band); color: #F3F1EC; border-radius: 48px; padding: 80px 64px; position: relative; overflow: hidden; }
.band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 60% at 90% 10%, rgba(251, 231, 161, .22), transparent 70%), radial-gradient(rgba(255, 255, 255, .05) 1.6px, transparent 2px);
  background-size: auto, 28px 28px;
}
.band > * { position: relative; z-index: 1; }
.band h2 { font-size: clamp(34px, 4.6vw, 56px); margin-bottom: 18px; color: #F3F1EC; }
.band .lead { color: rgba(243, 241, 236, .78); }
.band .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.band .col { padding: 26px; border-radius: 26px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.band .col h3 { font-size: 19px; margin: 14px 0 8px; color: #F3F1EC; }
.band .col p { font-size: 16px; line-height: 1.55; color: rgba(243, 241, 236, .75); margin: 0; }
.band .col .icon { color: #FBE7A1; width: 28px; height: 28px; }
.band a { color: #FBE7A1; }
.band .store-btn { background: #F3F1EC; color: #1E1B26; }
.band .btn-ghost { color: #F3F1EC; box-shadow: inset 0 0 0 1.5px rgba(243, 241, 236, .3); }
.band .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
@media (max-width: 980px) { .band { padding: 56px 28px; border-radius: 36px; } .band .cols { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 24px; font: 700 18px/1.35 var(--body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s ease; }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 22px; color: var(--muted); font-size: 17px; }
.faq .answer p:last-child { margin: 0; }

/* Closing call to action */
.closing { text-align: center; }
.closing .band { padding-block: 96px; }
.closing .band .lead { margin-inline: auto; }
.closing .cta-row { justify-content: center; margin: 0; }
.closing img.mark { width: 84px; height: 84px; margin: 0 auto 26px; border-radius: 22px; box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }

/* ---- Article pages (privacy, support) ------------------------------------------------------ */

.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: clamp(40px, 6vw, 68px); margin-bottom: 16px; }
.page-head .lead { margin: 0; }
.article { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; padding-bottom: 96px; }
.toc { position: sticky; top: 96px; padding: 20px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.toc strong { display: block; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 7px 10px; border-radius: 10px; font-size: 15px; line-height: 1.35; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { background: var(--paper-deep); color: var(--ink); }
.prose { max-width: 720px; font-size: 18px; line-height: 1.7; }
.prose h2 { font-size: clamp(26px, 3vw, 34px); margin: 52px 0 14px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose ul, .prose ol { padding-inline-start: 24px; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose .note {
  padding: 20px 22px; border-radius: 22px; background: var(--butter); color: var(--ink); margin: 0 0 1.4em;
  font-size: 18px; line-height: 1.6;
}
.prose .note.sky { background: var(--sky); }
.prose .note.sage { background: var(--sage); }
.prose .meta { color: var(--muted); font-size: 16px; }
.article > * { min-width: 0; }
.prose kbd, .path {
  font: 600 .92em/1.5 var(--body); padding: 2px 8px; border-radius: 8px; background: var(--paper-deep);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.prose code { font: 600 .9em/1.5 ui-monospace, "Cascadia Code", Consolas, monospace; padding: 2px 6px; border-radius: 6px; background: var(--paper-deep); }
@media (max-width: 900px) {
  .article { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
}

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px 30px; border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 40px;
}
.contact-card h2 { font-size: 28px; margin: 0 0 6px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 16px; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 48px; }
.topic-grid a { display: flex; gap: 12px; align-items: center; padding: 18px; border-radius: 20px; text-decoration: none; font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }
.topic-grid a:hover { filter: brightness(.97); }
@media (max-width: 760px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .topic-grid { grid-template-columns: 1fr; } }

/* ---- Features, templates and guides (made by scripts/seo-pages.mjs) ------------------------ */

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0 0 22px; padding: 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline: 8px; opacity: .55; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.byline { margin: 18px 0 0; color: var(--muted); font-size: 16px; }

.section.tight { padding: 56px 0; }
.container.narrow { max-width: 820px; }
.h-small { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 24px; }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.row-head .h-small { margin: 0; }
.more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.more-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.more-link .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.band .btn-light { background: #F3F1EC; color: #1E1B26; }
.points { padding-bottom: 8px; }
.faq.in-prose { max-width: none; margin: 0; }
.faq.in-prose summary { font-size: 17px; }

.link-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.link-cards a { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.link-cards a:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft); }
.link-cards .badge { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--ink); }
.link-cards a > span:last-child { min-width: 0; }
.link-cards small { display: block; margin-bottom: 4px; font: 700 13px/1.3 var(--body); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.link-cards strong { display: block; margin-bottom: 4px; font-size: 18px; line-height: 1.3; }
.link-cards a > span:last-child > span { display: block; font-size: 15px; line-height: 1.5; color: var(--muted); }
.link-cards.big a { padding: 26px; }
.link-cards.big strong { font-size: 20px; }

.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 32px; color: var(--muted); font-size: 16px; }
.link-row a { padding: 8px 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 600; text-decoration: none; }
.link-row a:hover { background: var(--paper-deep); }

.guide-list article { padding: 28px 0; border-bottom: 1px solid var(--line); }
.guide-list article:first-child { padding-top: 0; }
.guide-list .byline { margin: 0; font-size: 15px; }
.guide-list h2 { font-size: clamp(26px, 3vw, 34px); margin: 8px 0 10px; }
.guide-list h2 a { text-decoration: none; }
.guide-list h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-list p:last-child { margin: 0; color: var(--muted); }

/* Templates: the gallery and each template's page. A sheet is the note as the app opens it, in its
   colour, paper and font (notes.css holds those). Every line is one row of the paper. */
.cat-nav { margin-top: 28px; }
.cat-nav .chip { text-decoration: none; }
.cat-nav .chip:hover { background: var(--paper-deep); color: var(--ink); }
.tpl-groups { padding-bottom: 24px; }
.tpl-group { scroll-margin-top: 96px; }
.tpl-group + .tpl-group { margin-top: 56px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 18px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft); }
.tpl-card > strong { padding: 10px 8px 0; font-size: 18px; line-height: 1.3; }
.tpl-card > span:last-child { padding: 0 8px; font-size: 15px; line-height: 1.45; color: var(--muted); }

.tpl-sheet, .tpl-mini {
  --lh: 30px;
  display: block; overflow: hidden; border-radius: 22px; color: var(--ink);
  background-color: var(--s-bg, var(--card));
  font-family: var(--s-font, var(--body)); font-size: calc(17px * var(--s-scale, 1)); line-height: var(--lh);
  overflow-wrap: anywhere;
}
.tpl-sheet { padding: 24px 28px 30px; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
.tpl-mini { --lh: 20px; height: 176px; padding: 12px 16px; font-size: calc(12.5px * var(--s-scale, 1)); -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
:is(.tpl-sheet, .tpl-mini) :is(p, ul, ol, li, blockquote) { margin: 0; padding: 0; min-height: var(--lh); }
:is(.tpl-sheet, .tpl-mini) :is(ul, ol) { list-style: none; }
:is(.tpl-sheet, .tpl-mini) li { display: flex; align-items: center; gap: .55em; }
:is(.tpl-sheet, .tpl-mini) .s-ul li::before { content: ""; width: .36em; height: .36em; flex: none; border-radius: 50%; background: currentColor; margin-inline: .2em .1em; }
:is(.tpl-sheet, .tpl-mini) .s-ol { counter-reset: s-ol; }
:is(.tpl-sheet, .tpl-mini) .s-ol li { counter-increment: s-ol; }
:is(.tpl-sheet, .tpl-mini) .s-ol li::before { content: counter(s-ol) "."; min-width: 1.2em; font-variant-numeric: tabular-nums; }
:is(.tpl-sheet, .tpl-mini) .s-todo i { width: 1.05em; height: 1.05em; flex: none; border: 1.6px solid var(--s-label, var(--muted)); border-radius: .3em; }
:is(.tpl-sheet, .tpl-mini) .s-h { font-weight: var(--s-bold, 700); font-size: 1.12em; }
:is(.tpl-sheet, .tpl-mini) blockquote { padding-inline-start: .8em; border-inline-start: 3px solid var(--s-label, var(--muted)); font-style: italic; }
:is(.tpl-sheet, .tpl-mini) hr { height: 0; margin: calc(var(--lh) / 2 - 1px) 0; border: 0; border-top: 2px solid var(--s-strong, var(--line)); }
.tpl-sheet .s-title, .tpl-mini b { display: block; font-weight: var(--s-bold, 700); line-height: calc(var(--lh) * 2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-sheet .s-title { font-size: 1.55em; }
.tpl-mini b { font-size: 1.25em; }
.s-date { color: var(--s-label, var(--muted)); font-style: italic; font-weight: 400; }
.tpl-sheet[data-paper="LINED"], .tpl-sheet[data-paper="NOTEBOOK"], .tpl-mini[data-paper="LINED"], .tpl-mini[data-paper="NOTEBOOK"] {
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1.1px), var(--s-line) calc(var(--lh) - 1.1px), var(--s-line) var(--lh));
  background-position: 0 24px;
}
.tpl-mini:is([data-paper="LINED"], [data-paper="NOTEBOOK"]) { background-position: 0 12px; }
.tpl-sheet[data-paper="NOTEBOOK"] { padding-inline-start: 48px; }
.tpl-mini[data-paper="NOTEBOOK"] { padding-inline-start: 30px; }
.tpl-sheet[data-paper="NOTEBOOK"], .tpl-mini[data-paper="NOTEBOOK"] {
  background-image:
    linear-gradient(to right, transparent var(--margin, 32px), rgb(224 86 110 / .55) var(--margin, 32px), rgb(224 86 110 / .55) calc(var(--margin, 32px) + 1.5px), transparent calc(var(--margin, 32px) + 1.5px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1.1px), var(--s-line) calc(var(--lh) - 1.1px), var(--s-line) var(--lh));
}
.tpl-mini[data-paper="NOTEBOOK"] { --margin: 20px; }
.tpl-sheet[data-paper="GRID"], .tpl-mini[data-paper="GRID"] {
  background-image: linear-gradient(to right, var(--s-line) 1px, transparent 1px), linear-gradient(to bottom, var(--s-line) 1px, transparent 1px);
  background-size: 20px 20px;
}
.tpl-sheet[data-paper="DOTS"], .tpl-mini[data-paper="DOTS"] {
  background-image: radial-gradient(circle, var(--s-strong) 1.35px, transparent 1.6px);
  background-size: 20px 20px; background-position: center 10px;
}

.tpl-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 56px; align-items: start; }
.tpl-head h1 { font-size: clamp(38px, 5vw, 60px); }
.tpl-head .lead { margin-bottom: 28px; }
.tpl-figure { margin: 0; }
.tpl-figure figcaption { margin-top: 12px; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
  .tpl-hero { grid-template-columns: 1fr; gap: 36px; }
  .tpl-figure { max-width: 520px; }
}
@media (max-width: 560px) {
  .tpl-sheet { padding: 18px 18px 24px; }
  .tpl-sheet[data-paper="NOTEBOOK"] { --margin: 26px; padding-inline-start: 38px; }
  .tpl-sheet:is([data-paper="LINED"], [data-paper="NOTEBOOK"]) { background-position: 0 18px; }
}

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

.lost { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost .num { font: 800 clamp(96px, 18vw, 180px)/1 var(--display); letter-spacing: -.06em; color: var(--ink); }
.lost .num span { display: inline-block; background: var(--butter); border-radius: 32px; padding: 0 .12em; transform: rotate(-4deg); }
.lost p { color: var(--muted); font-size: 20px; margin: 18px auto 30px; max-width: 460px; }
.lost .cta-row { justify-content: center; margin: 0; }

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

.site-footer { padding: 32px 0 36px; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px 32px; padding-top: 40px; border-top: 1px solid var(--line); }
.site-footer.has-explore .container { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
/* The last word before the footer's links: open the app or get the phone app. */
.foot-cta {
  grid-column: 1 / -1; position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  margin-bottom: 8px; padding: 36px 40px; border-radius: 32px;
  background: radial-gradient(70% 140% at 0% 0%, var(--butter), transparent 62%), radial-gradient(60% 140% at 100% 100%, var(--sky), transparent 60%), radial-gradient(50% 120% at 60% 0%, var(--rose), transparent 60%), var(--card);
  box-shadow: inset 0 0 0 1px var(--ring);
}
.foot-cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(var(--dots) 1.5px, transparent 1.9px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.foot-cta > * { position: relative; z-index: 1; }
.foot-cta strong { display: block; margin-bottom: 6px; font: 800 clamp(26px, 3vw, 36px)/1.05 var(--display); letter-spacing: -.035em; color: var(--ink); }
.foot-cta span { display: block; max-width: 520px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.site-footer .foot-cta .cta-row { margin: 0; }
.site-footer .foot-cta .btn { min-height: 50px; }
.site-footer .foot-cta .btn-ghost { background: color-mix(in srgb, var(--card) 70%, transparent); }
.site-footer p { color: var(--muted); font-size: 15px; margin: 14px 0 0; max-width: 340px; }
.site-footer h2 { font: 700 13px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; color: var(--ink-soft); font-size: 15.5px; }
.site-footer ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; margin-top: 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .site-footer .container, .site-footer.has-explore .container { grid-template-columns: 1fr 1fr; }
  .site-footer .about { grid-column: 1 / -1; }
  .foot-cta { padding: 28px 24px; border-radius: 26px; }
}

/* Light, dark or the device's own (assets/js/site.js). */
.mode-pick { display: inline-flex; gap: 2px; margin-top: 20px; padding: 4px; border-radius: 999px; background: var(--paper-deep); box-shadow: inset 0 0 0 1px var(--line); }
.mode-pick button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 14px/1 var(--body); cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.mode-pick button:hover { color: var(--ink); }
.mode-pick button .icon { width: 16px; height: 16px; stroke-width: 2; }
.mode-pick button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(30, 27, 38, .12), inset 0 0 0 1px var(--line); }
/* Right to left: arrows point the reading way. */
[dir="rtl"] svg:has(> use[href$="#i-arrow"]) { transform: scaleX(-1); }

.lang-switch { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 4px; padding-top: 20px; border-top: 1px solid var(--line); }
.lang-switch a { padding: 6px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { background: var(--line); color: var(--ink); text-decoration: none; }
.lang-switch a[aria-current] { background: var(--ink); color: var(--paper); font-weight: 700; }

/* ---- Motion -------------------------------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---- Launch switch ------------------------------------------------------------------------- */
/* Until Memlow is live on Google Play, pages show "Coming soon". On launch day, swap the two
   rules below (hide .play-soon, show .play-live): every page follows. */
.play-live { display: none !important; }
.play-soon { }

/* ---- Urdu: Nastaliq needs room above and below the line ------------------------------------- */
html[lang="ur"] { --display: "Memlow Nastaliq", "Bricolage", "DM Sans", system-ui, sans-serif; --body: "Memlow Nastaliq", "DM Sans", system-ui, sans-serif; }
html[lang="ur"] body { line-height: 2.1; }
html[lang="ur"] :is(h1, h2, h3) { line-height: 1.75; letter-spacing: 0; }
html[lang="ur"] :is(.btn, .chip, .store-btn, .kicker, .eyebrow) { line-height: 1.9; }
/* Arabic and Urdu letters join: any letter-spacing would pull them apart. */
:dir(rtl) { letter-spacing: 0 !important; }
