/* ==========================================================================
   1Me website theme
   White sheet on a black page, one accent blue, grey question labels above
   bold statements, a pinned phone that travels as you scroll.
   Type: Poppins only.
   ========================================================================== */

:root {
  /* ink scale: black at different strengths, as the theme uses */
  --ink: rgba(0, 0, 0, 0.85);
  --ink-2: rgba(0, 0, 0, 0.65);
  --body: rgba(0, 0, 0, 0.56);
  --mute: rgba(0, 0, 0, 0.28);
  --ghost: rgba(0, 0, 0, 0.13);
  --line: rgba(0, 0, 0, 0.08);
  --flat: #f5f5f5;
  --flat-2: #ececec;
  --white: #fff;

  /* the one accent: 1Me blue */
  --blue: #1d80e2;
  --blue-dark: #1568c2;
  --blue-soft: rgba(29, 128, 226, 0.1);

  /* footer (on black) */
  --on-black: rgba(255, 255, 255, 0.65);
  --on-black-mute: rgba(255, 255, 255, 0.32);

  --r: 7px;
  --r-lg: 15px;
  --r-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-device: drop-shadow(22px 32px 38px rgba(0, 0, 0, 0.14));
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #fff; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: #fff; color: var(--body); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; padding: 0; font-style: normal; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: #fff; }

.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 600; font-size: 14px; transition: top .3s; }
.skip:focus { top: 16px; }

/* the white sheet with rounded bottom corners, sitting on the black page */
.sheet { position: relative; z-index: 1; background: var(--white); border-radius: 0 0 var(--r-lg) var(--r-lg); overflow-x: clip; }
.wrap { width: min(1240px, 100% - 80px); margin-inline: auto; }
.wrap.narrow { width: min(860px, 100% - 80px); }

/* ---------- type ---------- */
.q { font-weight: 600; font-size: 20px; line-height: 1.3; color: var(--mute); margin-bottom: 16px; }
.say { font-weight: 600; letter-spacing: -0.022em; line-height: 1.14; color: var(--ink); text-wrap: balance; }
h1.say, h2.say { font-size: clamp(30px, 3.5vw, 46px); }
h3.say { font-size: clamp(26px, 2.7vw, 36px); }
.lead { font-size: 17px; line-height: 1.7; color: var(--body); text-wrap: pretty; }
.b { color: var(--blue); }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--blue); margin-top: 22px; }
.link i { transition: transform .4s var(--ease); }
.link:hover i { transform: translateX(5px); }

/* ---------- buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 16px; border: 1.6px solid transparent; border-radius: var(--r); background: var(--white); color: var(--ink-2); font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; cursor: pointer; transition: background .4s, color .4s, border-color .4s, transform .4s var(--ease); }
.button:hover { background: var(--flat); color: var(--ink); }
.button:active { transform: scale(0.97); }
.button.flat { background: var(--flat); }
.button.flat:hover { background: var(--flat-2); }
.button.outline { color: var(--blue); border-color: var(--blue); background: transparent; }
.button.outline:hover, .dl.open .button.outline { background: var(--blue); color: #fff; }
.button.primary { background: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-dark); color: #fff; }
.button.current { color: var(--ink); background: var(--flat); }
.button.lg { height: 52px; padding: 0 24px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* "Available for iOS & Android" dropdown */
.dl { position: relative; display: inline-block; }
.dl-menu { position: absolute; right: 0; top: 100%; padding-top: 8px; min-width: 100%; z-index: 20; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease), visibility .3s; }
.dl.center .dl-menu { right: auto; left: 50%; translate: -50% 0; }
.dl:hover .dl-menu, .dl:focus-within .dl-menu, .dl.open .dl-menu { opacity: 1; visibility: visible; transform: none; }
.dl-card { background: #fff; border-radius: 12px; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.14), 0 0 0 1px var(--line); overflow: hidden; }
.dl-card a { display: flex; align-items: center; gap: 12px; padding: 15px 18px; font-weight: 600; font-size: 14px; line-height: 16px; color: var(--ink); white-space: nowrap; transition: background .3s, color .3s; }
.dl-card a + a { border-top: 1px solid var(--line); }
.dl-card a:hover { background: var(--flat); color: var(--blue); }
.dl-card i { font-size: 18px; width: 18px; text-align: center; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badges img { height: 48px; width: auto; border-radius: 8px; transition: transform .4s var(--ease), opacity .3s; }
.badges a:hover img { transform: translateY(-3px); }

/* ---------- top navigation ---------- */
.menu { position: fixed; inset: 0 0 auto 0; z-index: 60; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); padding: 34px 0 18px; transition: padding .5s var(--ease), box-shadow .5s, transform .6s var(--ease); }
.menu.scrolled { padding: 12px 0; box-shadow: 0 1px 0 var(--line); }
.menu.away { transform: translateY(-110%); }
.menu-in { display: flex; align-items: center; gap: 18px; width: min(1386px, 100% - 80px); margin-inline: auto; }
.logo { display: flex; align-items: flex-start; gap: 16px; margin-right: auto; }
.logo img { height: 30px; width: auto; flex: none; }
.logo b { display: block; font-size: 14px; line-height: 17px; font-weight: 600; color: var(--ink-2); padding-top: 6px; transition: padding .5s var(--ease); }
.logo span span { display: block; font-size: 14px; line-height: 17px; font-weight: 600; color: var(--mute); max-width: 112px; max-height: 40px; margin-top: 4px; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s, margin .5s var(--ease); }
.menu.scrolled .logo span span { max-height: 0; opacity: 0; margin-top: 0; }
.menu-links { display: flex; align-items: center; gap: 2px; }
.menu-links .button { background: transparent; }
.menu-links .button:hover, .menu-links .button.current { background: rgba(0, 0, 0, 0.045); }
.burger { display: none; width: 44px; height: 44px; border-radius: var(--r); position: relative; transition: background .3s; }
.burger:hover { background: var(--flat); }
.burger::before, .burger::after { content: ""; position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .5s var(--ease), top .5s var(--ease); }
.burger::before { top: 17px; }
.burger::after { top: 25px; }
.menu-open .burger::before { top: 21px; transform: rotate(45deg); }
.menu-open .burger::after { top: 21px; transform: rotate(-45deg); }

.m-menu { position: fixed; inset: 0; z-index: 55; background: #fff; padding: 120px 30px 40px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.menu-open .m-menu { opacity: 1; visibility: visible; }
.menu-open body { overflow: hidden; }
.m-menu a.m-link { font-weight: 600; font-size: 30px; line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); padding: 8px 0; opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .7s var(--ease), color .3s; transition-delay: calc(var(--i) * 50ms + 80ms); }
.m-menu a.m-link[aria-current] { color: var(--blue); }
.menu-open .m-menu a.m-link { opacity: 1; transform: none; }
.m-menu .badges { margin-top: auto; padding-top: 30px; }

/* ---------- the story: pinned phone + statements ---------- */
.story { position: relative; }
.story-device, .story-dots, .story-cue { display: none; }

/* stacked layout: phones, small windows, no JavaScript, reduced motion */
.step { padding: 56px 0; }
.step.hero { padding: 140px 0 10px; }
.step-in { width: min(1240px, 100% - 80px); margin-inline: auto; display: grid; gap: 40px; }
.step-text { max-width: 620px; }
.step-text .q { font-size: 20px; }
.step-media img { margin-inline: auto; width: auto; max-height: min(74vh, 640px); filter: var(--shadow-device); }
.step-media.cut img { -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }

/* pinned layout: switched on by site.js on wide screens */
.story-on .story { height: calc((var(--n) - 1) * 110vh + 145vh); }
.story-on .story-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.story-on .step { position: absolute; inset: 0; padding: 0; pointer-events: none; }
.story-on .step.live { pointer-events: auto; }
.story-on .step-in { position: relative; height: 100%; display: block; }
.story-on .step-media { display: none; }
.story-on .step-text { position: absolute; top: calc(50% + 30px); width: min(45%, 570px); max-width: none; opacity: var(--o, 0); transform: translateY(calc(-50% + var(--ty, 0px))); will-change: opacity, transform; }
.story-on .step[data-side="left"] .step-text { left: 47%; }
.story-on .step[data-side="right"] .step-text { right: 48%; }
.story-on .step-text .q { font-size: 23px; margin-bottom: 20px; }
.story-on .step-text .say { font-size: clamp(30px, 3.3vw, 47px); line-height: 1.1; }
.story-on .story-device { display: block; position: absolute; z-index: 2; left: 50%; top: calc(50% + 34px); height: min(74vh, 780px); width: calc(min(74vh, 780px) * 0.92); transform: translate(-50%, -50%) translate3d(var(--x, 0px), 0, 0); will-change: transform; pointer-events: none; }
.story-device .rise { position: absolute; inset: 0; }
.story-device img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: scale(0.95); transition: opacity .55s ease, transform 1s var(--ease); filter: var(--shadow-device); }
.story-device img.on { opacity: 1; transform: none; }
.story-device img.wide { padding: 5% 0; }
.story-device img.cut { -webkit-mask-image: linear-gradient(#000 80%, transparent 97%); mask-image: linear-gradient(#000 80%, transparent 97%); }
.story-on .story-device .rise { animation: rise 1.4s var(--ease) both .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(70px) scale(0.96); } to { opacity: 1; transform: none; } }

.story-on .story-dots { display: flex; flex-direction: column; gap: 10px; position: absolute; z-index: 3; right: 34px; top: 50%; transform: translateY(-50%); }
.story-dots button { width: 18px; height: 18px; display: grid; place-items: center; }
.story-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ghost); transition: background .4s, transform .5s var(--ease); }
.story-dots button:hover::before { background: var(--mute); }
.story-dots button.on::before { background: var(--blue); transform: scale(1.5); }
.story-on .story-cue { display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); font-weight: 600; font-size: 12px; color: var(--mute); opacity: var(--cue, 1); pointer-events: none; }
.story-cue span { width: 1.6px; height: 30px; border-radius: 2px; background: var(--ghost); position: relative; overflow: hidden; }
.story-cue span::after { content: ""; position: absolute; inset: 0; background: var(--ink-2); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section.tight { padding: clamp(60px, 7vw, 100px) 0; }
.section.grey { background: var(--flat); }
.head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(44px, 6vw, 76px); }
.head .say { max-width: 760px; }
.head .lead { max-width: 660px; margin-top: 20px; }
.head .actions { justify-content: center; margin-top: 28px; }
.head.left { text-align: left; align-items: flex-start; }

/* row of phones */
.phonesline { display: flex; justify-content: center; align-items: center; gap: clamp(10px, 3.2vw, 54px); padding: 0 20px; }
.phonesline img { width: auto; flex: none; filter: var(--shadow-device); }
.phonesline .s { height: clamp(150px, 23vw, 330px); }
.phonesline .m { height: clamp(190px, 28vw, 400px); }
.phonesline .l { height: clamp(230px, 34vw, 480px); }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); }
.stat { padding: 34px 20px 0; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-weight: 600; font-size: clamp(38px, 4.6vw, 62px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat > span { display: block; margin-top: 12px; font-weight: 600; font-size: 14px; color: var(--mute); }

/* tiles */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.tile { background: var(--flat); border-radius: var(--r-lg); padding: 32px 30px 34px; transition: background .5s, transform .7s var(--ease), box-shadow .7s var(--ease); }
.tile:hover { background: #fff; transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--line); }
.tile.span2 { grid-column: span 2; }
.tile h3, .tile h4 { font-weight: 600; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 8px; }
.tile p { font-size: 15px; line-height: 1.6; }
.tile .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--blue); font-size: 19px; margin-bottom: 22px; transition: background .5s, color .5s; }
.tile:hover .ico { background: var(--blue); color: #fff; }
.tile .pic { width: 52px; height: 52px; margin-bottom: 22px; object-fit: contain; }
.section.grey .tile { background: #fff; }
.section.grey .tile .ico { background: var(--flat); }

/* plain items (no tile) */
.item { padding-top: 26px; border-top: 1px solid var(--line); }
.item .pic { width: 56px; height: 56px; object-fit: contain; margin-bottom: 22px; }
.item h3 { font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.item p { font-size: 15px; line-height: 1.6; }

/* manifesto */
.manifesto { display: grid; grid-template-columns: 1fr 220px; gap: clamp(40px, 7vw, 110px); align-items: center; }
.manifesto blockquote { font-weight: 600; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.18; letter-spacing: -0.022em; color: var(--ink); }
.manifesto blockquote .w { transition: opacity .35s linear; }
.js .manifesto blockquote .w { opacity: 0.16; }
.js .manifesto blockquote .w.on { opacity: 1; }
.manifesto p.lead { margin-top: 30px; max-width: 640px; }
.manifesto .seal img { width: 100%; max-width: 220px; border-radius: var(--r-lg); filter: drop-shadow(0 24px 40px rgba(29, 128, 226, 0.22)); }

/* detail rows: label + statement on the left, the facts on the right */
.detail { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(30px, 6vw, 100px); padding: clamp(44px, 5vw, 70px) 0; border-top: 1px solid var(--line); }
.detail > div:first-child { position: sticky; top: 110px; align-self: start; }
.detail .q { font-size: 18px; margin-bottom: 12px; }
.detail .lead { margin-bottom: 8px; }
.points li { display: grid; grid-template-columns: minmax(150px, 5fr) 9fr; gap: 6px 24px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.points li:first-child { border-top: 0; }
.lead + .points li:first-child { border-top: 1px solid var(--line); margin-top: 14px; }
.points b { font-weight: 600; color: var(--ink); }

/* two-column rows with a picture */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 7vw, 110px); align-items: center; padding: clamp(46px, 6vw, 90px) 0; }
.duo.flip .duo-media { order: 2; }
.duo-media img { margin-inline: auto; max-height: 640px; width: auto; filter: var(--shadow-device); }
.duo-media.shot img, .shot { border-radius: var(--r-lg); box-shadow: 0 34px 80px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--line); filter: none; max-height: none; width: 100%; }
.duo-media.paper img { filter: none; border-radius: var(--r-lg); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--line); max-height: 600px; }
.cutout { width: 100%; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.2)); }
.duo-text .q { font-size: 18px; margin-bottom: 12px; }
.duo-text .lead { margin-top: 20px; }
.duo-text .points { margin-top: 10px; }
.duo-text .points li { grid-template-columns: 1fr; gap: 2px; }

/* six ways to share */
.methods { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.method { position: relative; padding: 38px 34px 44px; border-bottom: 1px solid var(--line); transition: background .5s; }
.method:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); }
.method .n { position: absolute; right: 30px; top: 30px; font-weight: 600; font-size: 14px; color: var(--ghost); }
.method img { width: 104px; height: 104px; object-fit: contain; margin: 0 0 22px -8px; mix-blend-mode: multiply; transition: transform .8s var(--ease); }
.method:hover img { transform: scale(1.08) rotate(-3deg); }
.method h3 { font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.method p { font-size: 15px; line-height: 1.6; }

/* cards with a picture on top */
.pcard { background: var(--flat); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform .7s var(--ease), box-shadow .7s var(--ease), background .5s; }
.pcard:hover { transform: translateY(-6px); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--line); }
.section.grey .pcard { background: #fff; }
.pcard .pic { height: 280px; display: grid; place-items: center; padding: 30px 30px 0; overflow: hidden; }
.pcard .pic img { max-height: 290px; width: auto; align-self: start; filter: drop-shadow(10px 16px 22px rgba(0, 0, 0, 0.14)); transition: transform 1s var(--ease); }
.pcard:hover .pic img { transform: translateY(-8px) scale(1.03); }
.pcard .body { padding: 26px 30px 34px; }
.pcard h3 { font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--ink); margin-bottom: 8px; }
.pcard p { font-size: 15px; line-height: 1.6; }

/* onboarding steps */
.timeline { counter-reset: t; margin-top: 26px; }
.timeline li { counter-increment: t; position: relative; padding: 18px 0 18px 58px; border-top: 1px solid var(--line); }
.timeline li::before { content: "0" counter(t); position: absolute; left: 0; top: 18px; font-weight: 600; font-size: 20px; line-height: 1.3; color: var(--ghost); transition: color .6s; }
.timeline li:hover::before { color: var(--blue); }
.timeline h4 { font-weight: 600; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.timeline p { font-size: 15px; line-height: 1.6; }

/* integrations */
.papers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.paper { background: var(--flat); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 54px); display: grid; place-items: center; }
.paper img { max-height: 420px; width: auto; mix-blend-mode: multiply; }
.paper.white { background: #fff; box-shadow: 0 0 0 1px var(--line); }

/* plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin-inline: auto; }
.plan { background: var(--flat); border-radius: var(--r-lg); padding: 38px 36px 40px; display: flex; flex-direction: column; border: 1.6px solid transparent; }
.plan.featured { background: #fff; border-color: var(--blue); box-shadow: 0 30px 70px rgba(29, 128, 226, 0.16); }
.plan .tag { font-weight: 600; font-size: 14px; color: var(--mute); }
.plan.featured .tag { color: var(--blue); }
.plan .price { font-weight: 600; font-size: 44px; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); margin: 8px 0 6px; }
.plan .sub { font-size: 15px; margin-bottom: 22px; }
.plan ul { margin-bottom: 30px; }
.plan li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.plan li i { color: var(--blue); width: 16px; text-align: center; }
.plan li.no { color: var(--mute); }
.plan li.no i { color: var(--ghost); }
.plan .button { margin-top: auto; align-self: flex-start; }
.fine { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--mute); margin-top: 18px; }

/* closing call */
.closing { text-align: center; display: flex; flex-direction: column; align-items: center; }
.closing .say { max-width: 640px; }
.closing .lead { max-width: 560px; margin-top: 18px; }
.closing .actions, .closing .badges { justify-content: center; margin-top: 30px; }

/* inner page hero */
.page-hero { padding: clamp(170px, 19vw, 220px) 0 clamp(50px, 6vw, 80px); text-align: center; }
.page-hero .wrap { display: flex; flex-direction: column; align-items: center; }
.page-hero h1 { font-weight: 600; font-size: clamp(34px, 4.7vw, 60px); line-height: 1.08; letter-spacing: -0.028em; color: var(--ink); max-width: 900px; text-wrap: balance; }
.page-hero .lead { max-width: 660px; margin-top: 22px; font-size: 18px; }
.page-hero .actions { justify-content: center; margin-top: 30px; }
.page-hero .mark { height: 150px; width: auto; margin-bottom: 26px; }
.page-hero .device { margin-top: clamp(40px, 6vw, 80px); }
.page-hero .device img { max-height: min(78vh, 760px); width: auto; filter: var(--shadow-device); }
.page-hero.legal-hero { text-align: left; padding-bottom: 30px; }
.page-hero.legal-hero .wrap { align-items: flex-start; }

/* legal pages */
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(30px, 6vw, 90px); align-items: start; padding-bottom: 120px; }
.toc { position: sticky; top: 100px; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 8px; }
.toc h2 { font-weight: 600; font-size: 14px; color: var(--mute); margin-bottom: 12px; }
.toc a { display: block; padding: 7px 0 7px 14px; border-left: 1.6px solid var(--line); font-weight: 600; font-size: 13px; line-height: 1.4; color: var(--ink-2); transition: color .3s, border-color .3s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--blue); border-color: var(--blue); }
.prose { max-width: 740px; }
.prose h2 { font-weight: 600; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); margin: 54px 0 14px; scroll-margin-top: 100px; }
.prose p { margin-bottom: 16px; }
.prose p strong { font-weight: 600; color: var(--ink); }
.prose a { color: var(--blue); font-weight: 500; }
.prose a:hover { text-decoration: underline; }
.prose address { margin-top: 40px; padding: 26px 28px; background: var(--flat); border-radius: var(--r-lg); line-height: 1.8; color: var(--ink-2); font-weight: 500; }
.summary { background: var(--flat); border-radius: var(--r-lg); padding: 30px 32px 16px; }
.summary h2 { margin: 0 0 6px; font-size: 20px; }
.summary .note { font-size: 14px; color: var(--mute); font-weight: 500; margin-bottom: 6px; }
.summary .points li { grid-template-columns: 150px 1fr; }

/* ---------- guides ---------- */
[hidden] { display: none !important; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; font-size: 14px; color: var(--mute); margin-bottom: 18px; }
.crumbs a { color: var(--ink-2); transition: color .3s; }
.crumbs a:hover { color: var(--blue); }
.crumbs i { font-style: normal; color: var(--ghost); }
.page-hero.ghero { padding-bottom: 44px; }
.page-hero.ghero h1 { font-size: clamp(30px, 3.6vw, 46px); max-width: 860px; }
.page-hero.ghero .lead { margin-top: 16px; }

/* search box on the guides home */
.gsearch { position: relative; display: block; width: min(100%, 520px); margin-top: 32px; }
.gsearch i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.gsearch input { width: 100%; height: 52px; padding: 0 18px 0 46px; border: 1.6px solid transparent; border-radius: var(--r); background: var(--flat); font-weight: 500; font-size: 15px; color: var(--ink); outline: 0; transition: background .3s, border-color .3s; }
.gsearch input::placeholder { color: var(--mute); }
.gsearch input:focus { background: #fff; border-color: var(--blue); }

/* lists of guides */
.page-hero + .gcat { padding-top: 30px; }
.gcat + .gcat { padding-top: 0; }
.gcat.first { padding-top: 0; }
.gcat .head .link { margin-top: 0; }
.ggroup { margin-top: 46px; }
.gcat.first .ggroup:first-child { margin-top: 0; }
.gtitle { font-weight: 600; font-size: 14px; color: var(--mute); margin-bottom: 12px; }
.gtitle a { transition: color .3s; }
.gtitle a:hover { color: var(--blue); }
.glist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(30px, 5vw, 80px); border-bottom: 1px solid var(--line); }
.gitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-content: start; padding: 22px 0 24px; border-top: 1px solid var(--line); }
.gitem h4 { font-weight: 600; font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); transition: color .3s; }
.gitem p { grid-column: 1; font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gitem .gmeta { grid-column: 1; font-weight: 600; font-size: 12.5px; color: var(--mute); margin-top: 6px; }
.gitem > i { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--ghost); transition: transform .4s var(--ease), color .3s; }
.gitem:hover h4 { color: var(--blue); }
.gitem:hover > i { color: var(--blue); transform: translateX(5px); }
.gnone { text-align: center; font-weight: 600; color: var(--mute); padding: 20px 0 100px; }
.gnone a { color: var(--blue); }
.gover { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.gover > div:first-child { position: sticky; top: 110px; }

/* one guide: section list on the left, the guide on the right */
.gdoc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(30px, 6vw, 90px); align-items: start; padding-bottom: 110px; }
.gnav { position: sticky; top: 100px; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 8px; }
.gnav h2 { font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.gnav h2 a:hover { color: var(--blue); }
.gnav h3 { font-weight: 600; font-size: 13px; color: var(--mute); margin: 22px 0 8px; }
.gnav li a { display: block; padding: 7px 0 7px 14px; border-left: 1.6px solid var(--line); font-weight: 600; font-size: 13px; line-height: 1.4; color: var(--ink-2); transition: color .3s, border-color .3s; }
.gnav li a:hover { color: var(--ink); }
.gnav li a.on { color: var(--blue); border-color: var(--blue); }
.gnav .all { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: color .3s; }
.gnav .all:hover { color: var(--blue); }
.gmain { min-width: 0; }

/* guide text (rich text from the guides: headings, nested lists, inline code) */
.prose.rich > :first-child { margin-top: 0; }
.prose.rich h3 { font-weight: 600; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin: 38px 0 12px; }
.prose.rich h4 { font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--ink); margin: 30px 0 10px; }
.prose.rich ol, .prose.rich ul { margin: 0 0 18px; padding-left: 22px; }
.prose.rich ol { list-style: decimal; }
.prose.rich ul { list-style: disc; }
.prose.rich li { margin-bottom: 10px; padding-left: 4px; }
.prose.rich li::marker { color: var(--mute); font-weight: 600; }
.prose.rich li > p { margin-bottom: 6px; }
.prose.rich li > ul, .prose.rich li > ol { margin: 8px 0 14px; }
.prose.rich li li { margin-bottom: 4px; }
.prose.rich strong { font-weight: 600; color: var(--ink); }
.prose.rich em { font-style: italic; }
.prose.rich code { font: inherit; font-weight: 500; font-size: 0.92em; background: var(--flat); border-radius: 5px; padding: 2px 7px; color: var(--ink-2); overflow-wrap: anywhere; }
.section.grey .prose.rich code { background: #fff; }

/* step-by-step walkthrough */
.walk { margin-top: 56px; padding: clamp(22px, 3.4vw, 40px); background: var(--flat); border-radius: var(--r-lg); }
.walk-head .q { font-size: 14px; margin-bottom: 6px; }
.walk-head h2 { font-weight: 600; font-size: 24px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.walk-start { margin-top: 10px; font-size: 15px; }
.walk-start a { color: var(--blue); font-weight: 500; }
.walk-body { margin-top: 28px; }
.walk-list { counter-reset: step; }
.walk-list li { counter-increment: step; }
.walk-list button { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--r); font-weight: 500; font-size: 15px; line-height: 1.5; color: var(--body); transition: background .3s, color .3s; }
.walk-list button::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; margin-top: -2px; border-radius: 50%; background: #fff; font-weight: 600; font-size: 12.5px; color: var(--ink-2); transition: background .3s, color .3s; }
.walk-list button strong { font-weight: 600; color: var(--ink); }
.walk-list button:hover { color: var(--ink); }
.shot { display: block; position: relative; overflow: hidden; background: #fff; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
/* app screenshots sit on a wide coloured backdrop: crop to the phone in the middle */
.walk.framed .shot, .walk.framed .walk-stage { aspect-ratio: 640 / 1419; border-radius: 6.2% / 2.8%; }
.walk.framed .shot img { position: absolute; left: -151.25%; top: -2.11%; width: 402.5%; max-width: none; height: auto; }
.walk.bare .shot, .walk.bare .walk-stage { aspect-ratio: 361 / 772; border-radius: 22px; }
.walk.bare .shot { box-shadow: inset 0 0 0 1px var(--line); }
.walk.screen .shot, .walk.screen .walk-stage { aspect-ratio: 1450 / 913; border-radius: 10px; }
/* without JavaScript every screenshot sits under its step */
.walk-list .shot { margin: 8px 0 20px 52px; width: min(100% - 52px, 230px); }
.walk.screen .walk-list .shot { width: min(100% - 52px, 640px); }
.walk-nav { display: none; }
/* with JavaScript: one stage, the steps beside it */
.walk.live .walk-body { display: grid; grid-template-columns: minmax(170px, 270px) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); align-items: start; }
.walk.live.screen .walk-body { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.walk.live .walk-stage { position: sticky; top: 104px; cursor: pointer; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.12)); }
.walk.live.screen .walk-stage { position: relative; top: auto; }
.walk.live .walk-stage .shot { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.walk.live .walk-stage .shot.on { opacity: 1; }
.walk.live .walk-list li.on button { background: #fff; color: var(--ink); }
.walk.live .walk-list li.on button::before { background: var(--blue); color: #fff; }
.walk.live .walk-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-left: 12px; }
.walk.live .walk-nav .button { width: 44px; padding: 0; }
.walk.live .walk-nav .button:disabled { opacity: .35; cursor: default; background: #fff; }
.walk-count { min-width: 64px; text-align: center; font-weight: 600; font-size: 13px; color: var(--mute); }
.walk.live.screen .walk-side { display: flex; flex-direction: column-reverse; }
.walk.live.screen .walk-nav { margin: 0 0 14px; padding-left: 0; justify-content: center; }
.walk.live.screen .walk-list { columns: 2; column-gap: 20px; }
.walk.live.screen .walk-list li { break-inside: avoid; }

.gvideo { margin-top: 48px; }
.gvideo video { display: block; width: 100%; max-height: 78vh; border-radius: var(--r-lg); background: #000; }
.gvideo figcaption { margin-top: 12px; font-weight: 600; font-size: 13px; color: var(--mute); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 60px; }
.pager a { display: block; padding: 20px 22px 22px; border-radius: var(--r-lg); background: var(--flat); transition: background .4s; }
.pager a:hover { background: var(--flat-2); }
.pager a.next { text-align: right; }
.pager span { display: block; font-weight: 600; font-size: 12.5px; color: var(--mute); margin-bottom: 6px; }
.pager b { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--ink); }
.ghelp { margin-top: 26px; font-size: 14.5px; }
.ghelp a { color: var(--blue); font-weight: 500; }

/* ---------- footer (on the black page, under the sheet) ---------- */
.footer { position: relative; z-index: 0; background: #000; margin-top: calc(var(--r-lg) * -1); padding: calc(80px + var(--r-lg)) 0 80px; color: var(--on-black); font-weight: 600; font-size: 13px; line-height: 18px; }
.footer-in { width: min(1386px, 100% - 80px); margin-inline: auto; display: flex; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer-main { display: flex; gap: 18px; align-items: flex-start; flex: none; }
.footer-main img { height: 30px; width: auto; }
.footer-main b { display: block; font-weight: 600; color: var(--on-black); }
.footer-main span span { display: block; color: var(--on-black-mute); max-width: 120px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 30px 44px; justify-content: flex-end; }
.footer-cols > div { max-width: 190px; }
.footer h2 { font-weight: 600; font-size: 13px; line-height: 18px; color: var(--on-black-mute); margin-bottom: 10px; }
.footer li a, .footer p a { color: var(--on-black); transition: color .3s; }
.footer li a:hover, .footer p a:hover { color: #fff; }
.footer p { color: var(--on-black-mute); }
.footer .apps a { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--on-black-mute); transition: color .3s; }
.footer .apps a:hover { color: #fff; }
.footer .apps img { height: 15px; width: auto; opacity: 0.75; transition: opacity .3s; }
.footer .apps a:hover img { opacity: 1; }

/* ---------- motion ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal="scale"] { transform: translateY(40px) scale(0.96); }
.js [data-reveal="left"] { transform: translateX(-46px); }
.js [data-reveal="right"] { transform: translateX(46px); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* statements arrive pale and fill in with ink */
.js [data-ink] { color: var(--ghost); transform: translateY(22px); transition: color 1.3s ease .12s, transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-ink].in { color: var(--ink); transform: none; }
.js .menu { animation: drop 1s var(--ease) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .menu-links, .menu .dl { display: none; }
  .burger { display: block; }
  .g5 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .footer-in { flex-direction: column; }
  .footer-cols { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .wrap, .wrap.narrow, .step-in { width: calc(100% - 40px); }
  .menu-in, .footer-in { width: calc(100% - 40px); }
  .menu { padding: 18px 0 12px; }
  .logo span span { display: none; }
  .logo b { padding-top: 6px; }
  .g3, .g5, .methods, .papers, .plans, .duo, .detail, .manifesto, .legal { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .tile.span2 { grid-column: auto; }
  .method:not(:nth-child(3n + 1)) { border-left: 0; }
  .method { padding: 30px 0 34px; }
  .method .n { right: 0; }
  .duo.flip .duo-media { order: 0; }
  .duo-media img { max-height: 520px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { padding-bottom: 20px; }
  .manifesto .seal { max-width: 150px; }
  .toc { position: static; max-height: none; }
  .detail > div:first-child { position: static; }
  .points li, .summary .points li { grid-template-columns: 1fr; gap: 2px; }
  .page-hero { padding-top: 130px; }
  .page-hero .mark { height: 110px; }
  .footer { padding: calc(56px + var(--r-lg)) 0 56px; }
  .footer-cols { gap: 28px 36px; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr; }
  .phonesline .hide-s { display: none; }
  .badges img { height: 44px; }
  .m-menu a.m-link { font-size: 26px; }
}

/* guides */
@media (max-width: 860px) {
  .glist, .gover, .gdoc { grid-template-columns: minmax(0, 1fr); }
  .gover > div:first-child { position: static; }
  .gdoc { padding-bottom: 80px; }
  .gnav { order: 2; position: static; max-height: none; margin-top: 20px; padding-top: 34px; border-top: 1px solid var(--line); }
  .page-hero.ghero { padding-bottom: 30px; }
  .walk.live.screen .walk-list { columns: 1; }
}
@media (max-width: 620px) {
  .walk.live .walk-body { grid-template-columns: minmax(0, 1fr); }
  .walk.live .walk-stage { position: relative; top: auto; width: min(100%, 230px); margin-inline: auto; }
  .walk.live.screen .walk-stage { width: 100%; }
  .walk.live .walk-nav { justify-content: center; padding-left: 0; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager a.next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-ink] { color: var(--ink); transform: none; }
  .js .manifesto blockquote .w { opacity: 1; }
}
