/* Norah Studio documentation site: overview + one guide per device.
   Built by scripts/build-web-docs.py. The policy pages keep style.css. */

:root {
  --bg: #ffffff;
  --ink: #101010;
  --text: #696969;
  --soft: #a8a8a8;
  --line: #e8e8ed;
  --tint: #f5f5f7;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b { font-weight: 600; color: var(--ink); }
kbd {
  display: inline-block; min-width: 1.7em; padding: 1px 6px; margin: 0 2px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  font: 600 0.82em/1.5 var(--font); color: var(--ink); text-align: center; background: #fff;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in {
  max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
  height: 56px; display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 22px; width: auto; }
.devices { display: flex; gap: 4px; margin: 0 auto; }
.devices a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text);
  padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.devices a:hover { color: var(--ink); }
.devices a[aria-current="page"] { color: var(--ink); background: var(--tint); font-weight: 600; }
.get {
  text-decoration: none; font-size: 14px; font-weight: 600; color: #fff; background: var(--ink);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.get:hover { background: #333; }

/* ---------- type ---------- */
.eyebrow {
  margin: 0 0 18px; font-size: 16px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: #4c4c4c;
}
.mega-word {
  margin: 0; font-weight: 600; font-size: clamp(48px, 8.4vw, 116px);
  line-height: 0.95; letter-spacing: -0.04em; color: var(--ink);
}
.h2 {
  margin: 0 0 22px; font-weight: 600; font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.1; letter-spacing: -0.015em; color: #131313;
}
.h2 .dim { color: rgba(16, 16, 16, 0.35); }
.lede { margin: 0; max-width: 660px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--text); letter-spacing: -0.01em; }
.lede + .lede { margin-top: 1em; }
.center .lede, .center-lede { margin-left: auto; margin-right: auto; }
.giant {
  margin: 0 0 clamp(32px, 5vw, 64px); font-weight: 600; font-size: clamp(44px, 7.6vw, 104px);
  line-height: 1; letter-spacing: -0.035em; color: var(--soft); text-align: center;
}
.small { font-size: 14px; color: var(--soft); margin: 18px 0 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(28px, 4vw, 56px) var(--gutter) 64px; text-align: center; overflow: hidden; }
.hero .eyebrow { margin-bottom: 10px; }
.hero-text { position: relative; z-index: 1; transform: translateY(calc(var(--p, 0) * -40px)); opacity: calc(1 - var(--p, 0) * 0.6); }
.hero-device {
  position: relative; margin: clamp(20px, 3vw, 40px) auto 0;
  transform: translateY(calc((1 - var(--p, 0)) * 4%)) scale(calc(0.96 + var(--p, 0) * 0.04));
  transform-origin: 50% 0;
}
.hero-mac .hero-device { max-width: 1100px; }
.hero-ipad .hero-device { max-width: 1060px; }
.hero-iphone .hero-device { max-width: min(400px, 74vw); }
.device { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.16)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.08)); }
.hero .device { margin: 0 auto; }

/* a device whose screen is a loop: the video sits under a frame with a see-through screen */
.live { position: relative; display: block; }
.live .live-frame { position: relative; z-index: 1; width: 100%; }
.live video { position: absolute; z-index: 0; object-fit: cover; background: #f2f2f4; }
.live-iphone video { left: 4.015%; top: 1.769%; width: 91.825%; height: 96.461%; }
.live-ipad video { left: 3.212%; top: 4.184%; width: 93.696%; height: 91.736%; }

/* overview trio */
/* the Mac in the middle, the iPad and the iPhone in front of its two lower corners */
.trio-hero { max-width: 1180px; aspect-ratio: 100 / 60; }
.trio-hero .device { position: absolute; }
.th-mac { width: 68%; left: 16%; top: 6.7%; }
.th-ipad { width: 33%; left: 6%; bottom: 6.7%; z-index: 1; }
.th-iphone { width: 12.5%; right: 9%; bottom: 6.7%; z-index: 2; }

/* breadcrumb above a deep page's hero: quiet, like an eyebrow */
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 0 0; font-size: 14px; color: var(--soft); }
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--soft); }

.intro { padding: clamp(20px, 5vw, 60px) 0 clamp(40px, 6vw, 70px); }
.intro .badge { margin-top: 34px; }

/* ---------- page index ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 0 clamp(40px, 6vw, 80px); }
.toc a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--text);
  padding: 7px 14px; border-radius: 999px; background: var(--tint); transition: background .2s, color .2s;
}
.toc a:hover { background: #ebebef; color: var(--ink); }

/* ---------- chapters ---------- */
.chapter { padding: clamp(90px, 13vw, 180px) 0 0; }
.stage { margin: clamp(48px, 7vw, 90px) auto 0; padding: 0 var(--gutter); display: flex; justify-content: center; }
.stage .device-mac { width: min(100%, 1100px); }
.stage .device-ipad { width: min(100%, 1000px); }
.stage .device-iphone { width: min(62%, 360px); }
.swap { display: block; width: min(100%, 1100px); }
.swap img { width: 100%; }
.stage-pair { gap: clamp(24px, 4vw, 60px); align-items: flex-end; }
.stage-pair .device-ipad { width: min(66%, 780px); }
.stage-pair .device-iphone { width: min(22%, 250px); }

/* how-to steps */
.howto { margin: clamp(48px, 6vw, 72px) 0 0; max-width: 760px; }
.howto h4 { margin: 0 0 14px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.howto ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.howto li {
  counter-increment: s; position: relative; padding: 16px 0 16px 48px;
  border-top: 1px solid var(--line); font-size: 18px; color: var(--text);
}
.howto li::before {
  content: counter(s); position: absolute; left: 0; top: 15px;
  font-weight: 600; font-size: 18px; color: var(--ink);
}

/* feature columns */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 48px); margin: clamp(56px, 7vw, 90px) 0 0; }
.col h4 { margin: 0 0 8px; font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; color: #131313; }
.col p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--text); letter-spacing: -0.01em; }
.col .go, .lede .go { display: block; width: fit-content; margin-top: 10px; font-weight: 600; color: var(--ink); text-decoration: none; }
.col .go::after, .lede .go::after { content: " ›"; }
.col .go:hover, .lede .go:hover { text-decoration: underline; }

/* numbers */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: clamp(56px, 7vw, 80px) 0 0; }
.stat b { display: block; font-size: clamp(44px, 6vw, 72px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.stat span { display: block; margin-top: 10px; font-size: 16px; color: var(--text); }

/* effect families */
.families { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px; margin: clamp(56px, 7vw, 90px) 0 0; }
.family h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--soft); }
.family ul { margin: 0; padding: 0; list-style: none; }
.family li { font-size: 22px; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; }

/* keyboard */
.keys { width: 100%; max-width: 760px; margin: clamp(48px, 6vw, 72px) 0 0; border-collapse: collapse; }
.keys td { padding: 15px 0; border-top: 1px solid var(--line); font-size: 18px; color: var(--text); vertical-align: middle; }
.keys td:first-child { width: 42%; white-space: nowrap; }
.keys kbd { font-size: 15px; }

/* light / dark switch */
.appearance { margin-top: clamp(80px, 10vw, 130px); }
.seg { display: flex; justify-content: center; gap: 4px; width: max-content; margin: 0 auto; padding: 4px; border-radius: 999px; background: var(--tint); }
.seg button {
  border: 0; background: transparent; font: 600 14px var(--font); color: var(--text);
  padding: 8px 20px; border-radius: 999px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); }
.appearance .stage { margin-top: 40px; }
.appearance-pic { transition: opacity .25s; }
.appearance .small { margin-top: 28px; }

/* ---------- black block ---------- */
.dark { background: #000; color: #fff; margin-top: clamp(90px, 13vw, 180px); padding-bottom: clamp(90px, 13vw, 180px); }
.dark .eyebrow { color: #8a8a8a; }
.dark .h2 { color: #fff; }
.dark .lede { color: var(--soft); }
.dark .lede a { color: #fff; }
.dark .mega { margin: 0 0 8px; font-weight: 600; font-size: clamp(96px, 18vw, 220px); line-height: 1; letter-spacing: -0.05em; }

/* ---------- devices ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: clamp(56px, 7vw, 90px) 0 0; }
.trio-card {
  display: flex; flex-direction: column; text-decoration: none; padding: 32px 28px 28px;
  border-radius: 28px; background: var(--tint); transition: transform .3s ease, background .3s;
}
.trio-card:hover { transform: translateY(-4px); }
.trio-card.here { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.trio-pic { height: 250px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 28px; }
.trio-pic .device { max-height: 100%; max-width: 100%; width: auto; height: auto; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.16)); }
.trio-card h4 { margin: 0 0 6px; font-size: 28px; font-weight: 600; letter-spacing: -0.015em; }
.trio-card p { margin: 0; font-size: 17px; color: var(--text); }
.trio-card .req { margin-top: 10px; font-size: 14px; color: var(--soft); }
.trio-card .more { margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--ink); }
.trio-card.here .more { color: var(--soft); }
.trio-card:not(.here) .more::after { content: " ›"; }

/* ---------- App Store badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; text-align: left;
  background: #000; color: #fff; border-radius: 12px; padding: 9px 20px 9px 16px; border: 1px solid #a6a6a6;
  transition: transform .2s;
}
.badge:hover { transform: scale(1.03); }
.badge .apple { width: 24px; height: 24px; fill: #fff; flex: none; margin-top: -3px; }
.badge span { display: flex; flex-direction: column; line-height: 1.05; }
.badge small { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
.badge b { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.badge-big { padding: 12px 26px 12px 20px; border-radius: 14px; }
.badge-big .apple { width: 30px; height: 30px; }
.badge-big small { font-size: 13px; }
.badge-big b { font-size: 27px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: clamp(48px, 6vw, 72px) 0 48px; text-align: left; }
.plan { padding: 30px 28px; border-radius: 28px; background: var(--tint); }
.plan h4 { margin: 0 0 18px; font-size: 16px; font-weight: 600; color: var(--text); }
.plan .price { margin: 0 0 8px; font-size: 40px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); line-height: 1.1; }
.plan .price small { font-size: 17px; font-weight: 500; color: var(--text); letter-spacing: 0; }
.plan p { margin: 0; color: var(--text); }
.note { margin: 28px auto 0; max-width: 560px; font-size: 14px; color: var(--soft); }

/* ---------- FAQ ---------- */
.faq .h2 { margin-bottom: 40px; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-size: 26px; font-weight: 400; color: var(--soft); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 24px; font-size: 18px; color: var(--text); max-width: 680px; }
.more-help { margin-top: 32px; color: var(--text); }

/* ---------- footer ---------- */
.foot { margin-top: clamp(110px, 15vw, 200px); padding: 56px 0 48px; background: var(--tint); }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph { display: block; line-height: 0; transition: transform .2s; }
.ph:hover { transform: scale(1.03); }
.ph img { width: 250px; max-width: 100%; height: auto; }
.foot-cols { display: flex; gap: 80px; margin: 48px 0 40px; flex-wrap: wrap; }
.foot-cols h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.foot-cols a { display: block; margin: 0 0 8px; font-size: 14px; color: var(--text); text-decoration: none; }
.foot-cols a:hover { color: var(--ink); text-decoration: underline; }
.fine { margin: 0; padding-top: 24px; border-top: 1px solid #dcdce0; font-size: 12px; line-height: 1.6; color: #86868b; max-width: 900px; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- devices that move with the scroll ----------
   Tied to the scroll position by the browser itself (scroll-driven animations), so the motion
   runs on the compositor and never lags behind a finger. Browsers without them keep the reveal. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stage > .device, .stage > .swap {
      animation: stand-up linear both; animation-timeline: view(); animation-range: entry 0% cover 48%;
      transform-origin: 50% 100%;
    }
    .stage > .device-iphone { animation-name: turn-in; transform-origin: 50% 60%; }
    .stage-pair > .device-ipad { animation-name: stand-up; }
    .stage-pair > .device-iphone { animation: overtake linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .trio-pic .device { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; transform-origin: 50% 100%; }
  }
}
/* a laptop or tablet lying back that stands up to face you */
@keyframes stand-up {
  from { transform: perspective(2000px) translateY(14%) rotateX(32deg) scale(0.82); opacity: 0.25; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
/* a phone turning round in the hand */
@keyframes turn-in {
  from { transform: perspective(1400px) translateY(10%) rotateY(-28deg) rotateX(12deg) scale(0.84); opacity: 0.25; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
/* the phone rises past the tablet beside it */
@keyframes overtake {
  from { transform: perspective(1400px) translateY(45%) rotateY(-20deg); }
  50% { transform: none; }
  to { transform: translateY(-14%); }
}
@keyframes lift {
  from { transform: translateY(18%) scale(0.86); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-text, .hero-device { transform: none !important; opacity: 1 !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .cols, .families { grid-template-columns: repeat(2, 1fr); }
  .trio, .plans { grid-template-columns: 1fr; }
  .trio-pic { height: 220px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-in { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .brand img { height: 20px; }
  .get { margin-left: auto; }
  .devices { order: 3; width: 100%; margin: 6px 0 8px; justify-content: space-between; }
  .devices a { padding: 6px 10px; font-size: 14px; }
  .cols { grid-template-columns: 1fr; }
  .families { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; }
  .family li { font-size: 18px; }
  .stats { gap: 12px; }
  .stat b { font-size: 34px; }
  .stat span { font-size: 14px; }
  .hero-device { margin-top: 20px; }
  /* on a phone the overview leads with the phone: it stands in front, larger, playing */
  .trio-hero { aspect-ratio: 100 / 84; }
  .th-mac { width: 86%; left: 7%; top: 9.5%; }
  .th-ipad { width: 44%; left: 3%; bottom: 7.1%; }
  .th-iphone { width: 17%; right: 6%; bottom: 7.1%; }
  .everywhere .trio-card:has(.trio-iphone) { order: -1; }
  .stage .swap { width: min(62%, 300px); }
  .stage-pair { gap: 0; }
  .stage-pair .device-ipad { width: 64%; margin-right: -10%; }
  .stage-pair .device-iphone { width: 40%; position: relative; z-index: 1; }
  .stage .device-ipad { width: 100%; }
  .stage .device-iphone { width: 70%; }
  .keys td:first-child { width: 46%; }
  .foot-cols { gap: 48px; }
  .howto li { font-size: 17px; }
}
