/* Morphalo landing page: Apple-like, white, Inter; the drawings are pencil on dot paper (Reenie Beanie notes). */
/* Inter in pieces: the browser downloads only the scripts a page uses (Cyrillic, Greek, Vietnamese, accented Latin…).
   Arabic, Hebrew, Hindi, Thai, Chinese, Japanese and Korean fall back to the system font. */
@font-face { font-family: Inter; src: url("/fonts/inter-cyrillic-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Inter; src: url("/fonts/inter-cyrillic.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; src: url("/fonts/inter-greek-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+1F00-1FFF; }
@font-face { font-family: Inter; src: url("/fonts/inter-greek.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: Inter; src: url("/fonts/inter-vietnamese.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: Inter; src: url("/fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Reenie Beanie"; src: url("/fonts/reenie-beanie-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
    --bg: #ffffff; --alt: #f5f5f7; --ink: #1d1d1f; --muted: #6e6e73; --link: #0066cc; --line: #d2d2d7;
    --accent: #4f46e5; --dot: #c9c9ce;
    color-scheme: light;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { font: 17px/1.47 Inter, -apple-system, "Segoe UI Variable", system-ui, sans-serif; color: var(--ink); background: var(--bg);
       -webkit-font-smoothing: antialiased; letter-spacing: -0.011em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(980px, 100% - 44px); margin-inline: auto; }
/* Paper: every section is a sheet of dot paper with a fine grain; the grey ones a slightly deeper paper. */
.dots, section, .final { background: url("/img/paper-grain.svg"), radial-gradient(circle, #d6d6db 1.1px, transparent 1.4px) 0 0 / 26px 26px, var(--bg); }
.hero.dots { background: url("/img/paper-grain.svg"), radial-gradient(circle, var(--dot) 1.1px, transparent 1.4px) 0 0 / 26px 26px, var(--bg); }

/* The bar: white glass over the page. No saturation boost: on some Android phones it tints the glass green. */
.bar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; font-size: 13px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 17px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 28px; }
.bar nav a { color: var(--ink); opacity: .8; }
.bar nav a.buy { opacity: 1; background: var(--link); color: #fff; border-radius: 980px; padding: 4px 12px; font-weight: 500; }
.bar nav a.buy:hover { text-decoration: none; background: #0077ed; }

/* hero */
.hero { text-align: center; padding: 84px 0 48px; overflow: hidden; }
.hero h1 { font-size: clamp(48px, 8vw, 80px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.hero .tag { font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.hero .links { display: flex; gap: 28px; justify-content: center; align-items: center; margin-top: 26px; font-size: 19px; flex-wrap: wrap; }
/* the Microsoft Store button: the Store's own logo and real text, drawn by the page */
.store { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 14px; border-radius: 12px;
         background: #000; color: #fff; text-align: left; transition: background .15s; }
.store:hover { background: #2a2a2d; text-decoration: none; }
.store img { display: block; width: 30px; height: 30px; }
.store span { display: flex; flex-direction: column; font-size: 19px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.store small { font-size: 11.5px; font-weight: 500; letter-spacing: 0; opacity: .85; }
.store.big { height: 58px; padding: 0 24px 0 16px; }
.store.big img { width: 34px; height: 34px; }
.store.big span { font-size: 21px; }
.hero .note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.scene { display: block; width: min(1100px, 100% - 16px); height: auto; margin: 36px auto 0; overflow: visible; }

/* the drawings */
.graphite { filter: url(#grain); }
.hand { font-family: "Reenie Beanie", cursive; }
/* The handwriting font only has Latin letters; other scripts fall back to a system font, brought down to its size. */
:is([lang="ar"], [lang="he"], [lang="hi"], [lang="th"], [lang="el"], [lang="ru"], [lang="uk"]) .hand { font-size-adjust: .3; }
:is([lang="ja"], [lang="ko"], [lang^="zh"]) .hand { font-size-adjust: ic-height .58; }
/* Set by early.js before the first paint, only when motion is welcome: hero.js then draws it all in. */
.anim #sk-pencil path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim #sk-notes, .anim #sk-ink { opacity: 0; }

section { padding: 120px 0; }
.alt { background: url("/img/paper-grain.svg"), radial-gradient(circle, #c9c9d0 1.1px, transparent 1.4px) 0 0 / 26px 26px, #f2f2f5;
       box-shadow: inset 0 1px 0 #e4e4ea, inset 0 -1px 0 #e4e4ea; }
h2 { font-size: clamp(36px, 5.4vw, 56px); font-weight: 700; letter-spacing: -0.028em; line-height: 1.07; text-align: center; }
.sub { color: var(--muted); font-size: 21px; text-align: center; max-width: 640px; margin: 14px auto 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; text-align: center; list-style: none; padding: 0; }
.steps .num { font: 34px/1 "Reenie Beanie", cursive; color: var(--accent); }
.steps h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 8px; }
.steps p { color: var(--muted); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.tile { border-radius: 28px; padding: 44px 36px 24px; text-align: center; box-shadow: 0 1px 2px rgba(29,29,31,.04), 0 12px 40px rgba(29,29,31,.05); }
.tile.dots { background: radial-gradient(circle, #d6d6db 1.1px, transparent 1.4px) 0 0 / 26px 26px, #fff; }
.tile h3 { font-size: 30px; font-weight: 700; letter-spacing: -0.024em; line-height: 1.12; }
.tile p { color: var(--muted); margin: 10px auto 0; max-width: 34ch; }
.art { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }

.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 32px; margin-top: 64px; }
.kinds h3 { font-size: 19px; font-weight: 600; }
.kinds p { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* privacy: the words and a checklist on the left, one pencil lock on the right */
.privacy-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.privacy h2, .privacy .sub { text-align: start; margin-inline-start: 0; }
.privacy .sub { max-width: 30ch; }
.facts { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin-top: 44px; }
.facts li { display: grid; grid-template-columns: 34px 1fr; column-gap: 6px; align-items: baseline; color: var(--muted); font-size: 16px; }
.facts .tick { grid-row: span 2; width: 28px; height: 24px; align-self: start; margin-top: 2px; overflow: visible; }
.facts b { color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.privacy-lock { display: block; width: 100%; max-width: 380px; height: auto; justify-self: center; overflow: visible; }

.faq .list { max-width: 760px; margin: 48px auto 0; }
details { border-top: 1px solid #dcdce2; padding: 22px 0; }
details:last-child { border-bottom: 1px solid #dcdce2; }
summary { font-weight: 600; font-size: 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 300; font-size: 26px; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin-top: 10px; }

/* the trailer: a still with a play button; the video loads only when asked for */
.film { text-align: center; }
/* crop marks at the corners, like a printed sheet */
.film-frame { max-width: 1068px; margin: 4px auto 0; padding: 44px;
              background: url("/img/sketch/mark-tl.svg") left top no-repeat, url("/img/sketch/mark-tr.svg") right top no-repeat,
                          url("/img/sketch/mark-bl.svg") left bottom no-repeat, url("/img/sketch/mark-br.svg") right bottom no-repeat; }
.film-card { position: relative; max-width: 980px; margin: 0 auto; border-radius: 28px; overflow: hidden; border: 1px solid #e5e5ea;
             box-shadow: 0 30px 80px rgba(29,29,31,.10); background: #fff; aspect-ratio: 16 / 9; }
.film-card video { display: block; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.film-play { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border: 0; border-radius: 50%; cursor: pointer;
             background: rgba(29,29,31,.86); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); transition: transform .15s, background .15s; }
.film-play::after { content: ""; margin-left: 6px; border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.film-play:hover { background: #000; transform: scale(1.05); }
.film-play:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
.film-play[hidden] { display: none; }
.film-card.playing .film-play { opacity: 0; pointer-events: none; }
.film-card.ready video { cursor: pointer; }
/* a thin light line instead of the browser's dark bar: how far along, click or drag to jump */
.film-bar { position: absolute; left: 24px; right: 24px; bottom: 18px; height: 16px; cursor: pointer; display: flex; align-items: center; }
.film-bar::before { content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(29,29,31,.12); }
.film-done { position: relative; display: block; height: 4px; width: 0; border-radius: 4px; background: var(--accent); }
.film-done::after { content: ""; position: absolute; right: -6px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: #fff;
                    border: 2px solid var(--accent); box-sizing: border-box; opacity: 0; transition: opacity .15s; }
.film-bar:hover .film-done::after, .film-bar:focus-visible .film-done::after { opacity: 1; }
.film-bar:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 6px; }
.film-bar[hidden] { display: none; }
.film-cap { color: var(--muted); font-size: 14px; margin-top: 16px; }

.final { text-align: center; padding: 120px 0 100px; }
.final img.logo { width: 88px; height: 88px; margin: 0 auto 24px; display: block; }
.final .links { display: flex; justify-content: center; margin-top: 30px; }

footer { background: var(--alt); color: var(--muted); font-size: 12px; padding: 20px 0 28px; }
footer .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
footer .links { justify-self: end; }
footer .foot-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); opacity: 1; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
footer .foot-brand:hover { text-decoration: none; }
footer a { color: var(--ink); opacity: .8; }
footer .sep { margin: 0 6px; }

/* the language menu: the current language, opening upwards into the 26 */
.langs { position: relative; display: inline-block; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); opacity: .8; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover { opacity: 1; }
.langs ul { position: absolute; bottom: calc(100% + 10px); inset-inline-end: -12px; z-index: 6; list-style: none; margin: 0; padding: 8px;
            display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 2px; background: #fff; border: 1px solid var(--line);
            border-radius: 14px; box-shadow: 0 18px 50px rgba(29,29,31,.14); max-height: 70vh; overflow-y: auto; }
.langs li a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--ink); opacity: 1; font-size: 13px; white-space: nowrap; }
.langs li a:hover { background: var(--alt); text-decoration: none; }
.langs li a[aria-current="true"] { background: #eef0ff; color: var(--accent); font-weight: 600; }

/* right-to-left (Arabic, Hebrew): the page mirrors; drawings and the video's progress line stay as drawn */
[dir="rtl"] .privacy h2, [dir="rtl"] .privacy .sub { text-align: right; }
[dir="rtl"] .scene, [dir="rtl"] .art, [dir="rtl"] .film-bar { direction: ltr; }

@media (max-width: 760px) {
    .bar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
    .bar nav a:not(.buy) { display: none; }
    .hero { padding-top: 56px; }
    section { padding: 80px 0; }
    .sub { font-size: 19px; }
    .steps, .tiles { grid-template-columns: 1fr; }
    .kinds { grid-template-columns: 1fr 1fr; }
    .tile { padding: 36px 16px 16px; }
    .langs ul { grid-template-columns: 1fr 1fr; inset-inline-end: auto; left: 50%; transform: translateX(-50%); }
    .film-card { border-radius: 18px; }
    .film-frame { padding: 0; margin-top: 36px; background: none; }
    .privacy-grid { grid-template-columns: 1fr; gap: 28px; }
    .privacy-lock { order: -1; max-width: 190px; }
    .facts { grid-template-columns: 1fr; gap: 18px; margin-top: 32px; }
    footer .wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 10px; }
    footer .foot-brand { order: -1; }
    footer .links { justify-self: center; }
    .film-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
}
/* Pencil sketches in the margins, as if the designer's sheet went on: only where the margins have room for them.
   parallax.js shifts them by --py while scrolling, so they sit on a sheet further back. */
@media (min-width: 1240px) {
    #how { background: url("/img/sketch/ring.svg") calc(50% + 760px) calc(40px + var(--py, 0px)) no-repeat, url("/img/paper-grain.svg"),
                       radial-gradient(circle, #d6d6db 1.1px, transparent 1.4px) 0 0 / 26px 26px, var(--bg); }
    #features { background: url("/img/sketch/block.svg") calc(50% - 600px) calc(120px + var(--py, 0px)) no-repeat, url("/img/paper-grain.svg"),
                            radial-gradient(circle, #c9c9d0 1.1px, transparent 1.4px) 0 0 / 26px 26px, #f2f2f5; }
    #kinds { background: url("/img/sketch/files.svg") 50% var(--py, 0px) no-repeat, url("/img/paper-grain.svg"),
                         radial-gradient(circle, #d6d6db 1.1px, transparent 1.4px) 0 0 / 26px 26px, var(--bg); }
}

/* On a phone the same dots crowd a small screen: lighter and a little further apart there. */
@media (max-width: 760px) {
    .dots, section, .final, .hero.dots { background: url("/img/paper-grain.svg"), radial-gradient(circle, #e3e3e8 .9px, transparent 1.2px) 0 0 / 30px 30px, var(--bg); }
    .alt { background: url("/img/paper-grain.svg"), radial-gradient(circle, #d9d9df .9px, transparent 1.2px) 0 0 / 30px 30px, #f2f2f5; }
    .tile.dots { background: radial-gradient(circle, #e3e3e8 .9px, transparent 1.2px) 0 0 / 30px 30px, #fff; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
