/* Inlaid — inlaid.app
   Mona Sans is the published variable font (OFL), served as is from /fonts. */

@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/MonaSans.ttf") format("truetype");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --ink: #111419;
  --pearl: #F6F7F9;

  --ground: #F6F7F9;
  --surface: #FFFFFF;
  --raised: #E8EDF3;
  --seam: #D7DDE5;
  --text: #111419;
  --text-2: #5D6673;
  --text-3: #7A838F;
  --shadow: 0 1px 2px rgba(17, 20, 25, .06), 0 8px 24px -8px rgba(17, 20, 25, .12);
  --shadow-lg: 0 2px 4px rgba(17, 20, 25, .05), 0 24px 48px -18px rgba(17, 20, 25, .28);
  --tile: #111419;

  /* Vivid accents, for the wordmark's tiles */
  --peacock: #00A8BA;
  --ultramarine: #8183FF;
  --fuchsia: #F350AE;
  --coral: #FF8A75;
  --saffron: #FFCA70;
  --jade: #00A88C;

  --gutter: 16px;
  --max: 1120px;
  --radius-card: 24px;
  --radius-btn: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171B21;
    --surface: #232831;
    --raised: #2D333D;
    --seam: #39404B;
    --text: #F6F7F9;
    --text-2: #BAC3CF;
    --text-3: #8F99A6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -18px rgba(0, 0, 0, .7);
    --tile: #F6F7F9;
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --radius-card: 28px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--peacock); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-weight: 780;
  font-stretch: 110%;
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(36px, 7.6vw, 64px); }
h2 { font-size: clamp(30px, 5.6vw, 48px); }

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.45;
  color: var(--text-2);
  margin: 0;
  text-wrap: pretty;
}

p { margin: 0; }

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-block;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

/* The dot of each i: a small square tile set in grout, sitting on the dotless i's stem. */
.wordmark .t {
  display: inline-block;
  width: .14em;
  height: .14em;
  margin: 0 .03em .631em -.17em;
  vertical-align: baseline;
  border-radius: .02em;
  background: var(--c, var(--tile));
  outline: max(1px, .012em) solid var(--seam);
  outline-offset: .014em;
}

/* Each tile holds a color for 1.2 s, then crossfades to the next in 0.3 s.
   Six colors make a 7.2 s cycle; the second tile runs 3.5 steps ahead,
   so the two never match and never change at the same moment. */
.wordmark.cycle .t { animation: tiles 7.2s infinite; }
.wordmark.cycle .t:last-of-type { animation-delay: -4.2s; }

@keyframes tiles {
  0%, 12.5%        { background: var(--peacock); }
  16.667%, 29.167% { background: var(--ultramarine); }
  33.333%, 45.833% { background: var(--fuchsia); }
  50%, 62.5%       { background: var(--coral); }
  66.667%, 79.167% { background: var(--saffron); }
  83.333%, 95.833% { background: var(--jade); }
  100%             { background: var(--peacock); }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark.cycle .t { animation: none; }
  .wordmark.cycle .t:first-of-type { background: var(--peacock); }
  .wordmark.cycle .t:last-of-type { background: var(--fuchsia); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--seam) 60%, transparent);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.site-header .wordmark { font-size: 26px; }
.site-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 560; }
.site-nav a { text-decoration: none; color: var(--text-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

/* ---------- App Store badge (not a link until launch) ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 20px 12px 16px;
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: #FFFFFF;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 24px -12px rgba(17, 20, 25, .6);
  cursor: default;
  user-select: none;
}
.badge .mark { width: 30px; height: 30px; flex: none; }
.badge span { display: block; line-height: 1.1; text-align: left; }
.badge small { display: block; font-size: 11px; font-weight: 560; letter-spacing: .02em; opacity: .78; }
.badge strong { display: block; font-size: 20px; font-weight: 720; font-stretch: 108%; letter-spacing: -0.01em; }

@media (prefers-color-scheme: dark) {
  .badge { background: var(--pearl); color: var(--ink); box-shadow: none; }
}

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

.hero { padding: 56px 0 48px; text-align: center; }
.hero .wordmark { font-size: clamp(84px, 23vw, 168px); margin-bottom: clamp(18px, 2.6vw, 28px); }
.hero h1 { margin-bottom: 16px; }
.hero .lede { max-width: 30em; margin: 0 auto 32px; }

@media (min-width: 720px) { .hero { padding: 88px 0 64px; } }

/* ---------- Showcase ----------
   iOS proportions: a small widget is square, a medium one is two smalls and the gap between.
   1em is 16pt on a 170pt-tall widget, as on iPhone. */

.shelf-wrap { container-type: inline-size; max-width: 760px; margin: 0 auto; }
.shelf {
  --cols: 2; --gap: 14px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: calc((100cqi - (var(--cols) - 1) * var(--gap)) / var(--cols));
  grid-auto-flow: row dense;
  gap: var(--gap);
}
@media (min-width: 640px) { .shelf { --cols: 3; --gap: 24px; } }

.w { position: relative; container-type: size; min-width: 0; }
.w.m { grid-column: span 2; }

.face {
  position: absolute; inset: 0;
  font-size: 9.4cqh;
  /* about 22% of the small widget's side */
  border-radius: 1.42em;
  padding: 1.3em;
  overflow: hidden;
  display: flex; flex-direction: column;
  color: #FFFFFF;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-lg);
  isolation: isolate;
}
.face::after {
  /* a soft sheen, like glass under light */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 85% at 0% 0%, rgba(255, 255, 255, .13), transparent 58%);
}

/* The label leads with a grouted tile, like the dots in the wordmark. */
.f-label {
  display: flex; align-items: center; gap: .5em;
  font-size: .84em; font-weight: 680; font-stretch: 104%; letter-spacing: -0.005em;
}
.f-label::before {
  content: ""; flex: none; width: .5em; height: .5em; border-radius: .1em;
  background: var(--hi);
  outline: 1px solid rgba(255, 255, 255, .28); outline-offset: .1em;
}
.f-sub { font-size: .74em; font-weight: 560; opacity: .72; }
.f-num { font-weight: 820; font-stretch: 112%; letter-spacing: -0.03em; line-height: .9; }
.foot { margin-top: auto; display: flex; flex-direction: column; }

/* Steps: Peacock, a segmented bar of soft squares */
.w-steps { --hi: #8FEFF7; }
.w-steps .face { background: linear-gradient(160deg, #0B95A3 0%, #00646F 55%, #00424B 100%); }
.w-steps .f-num { font-size: 2.3em; }
.w-steps .f-sub { margin-top: .4em; }
.segs { display: grid; grid-template-columns: repeat(10, 1fr); gap: .2em; margin-top: .75em; }
.segs i { aspect-ratio: 1; border-radius: .16em; background: rgba(255, 255, 255, .15); }
.segs i.on { background: var(--hi); }
.segs i.part { background: linear-gradient(90deg, var(--hi) 40%, rgba(255, 255, 255, .15) 40%); }

/* Sleep Score: Ultramarine, a slim 0–100 bar beside the night's details */
.w-sleep { --hi: #BDBFFF; }
.w-sleep .face {
  background: linear-gradient(160deg, #3236AE 0%, #20237A 55%, #13154A 100%);
  display: grid; grid-template-columns: auto .42em minmax(0, 1fr); column-gap: 1.3em;
}
.w-sleep .score { display: flex; flex-direction: column; padding-right: .2em; }
.w-sleep .score .f-num { font-size: 3.3em; }
.w-sleep .band { font-size: 1em; font-weight: 680; color: var(--hi); margin-top: .35em; }
.w-sleep .score .f-label { margin-top: auto; }
.vbar { position: relative; border-radius: .21em; background: rgba(255, 255, 255, .14); overflow: hidden; }
.vbar i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: var(--hi); border-radius: .21em; }
.items { margin: 0; display: flex; flex-direction: column; justify-content: space-between; }
.items div {
  display: flex; justify-content: space-between; align-items: baseline; gap: .6em;
  padding: .32em 0; border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.items div:first-child { padding-top: 0; }
.items div:last-child { border-bottom: 0; padding-bottom: 0; }
.items dt { font-size: .76em; font-weight: 560; opacity: .72; }
.items dd { margin: 0; font-size: .88em; font-weight: 700; font-stretch: 106%; }

/* Habit: Fuchsia, a grid of the last ten weeks in shades of one color */
.w-habit { --hi: #FFB0D8; }
.w-habit .face {
  background: linear-gradient(160deg, #94226A 0%, #66134B 55%, #430B32 100%);
  flex-direction: row; gap: 1.3em;
}
.w-habit .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.w-habit .info > .f-sub { margin-top: .4em; }
.w-habit .streak { margin-top: auto; display: flex; flex-direction: column; }
.w-habit .streak .f-num { font-size: 2.5em; }
.w-habit .streak .f-sub { margin-top: .4em; }
.grid {
  --g: .24em;
  --t: calc((10.638em - 2.6em - 6 * var(--g)) / 7);
  flex: none;
  display: grid;
  grid-template-rows: repeat(7, var(--t));
  grid-auto-columns: var(--t);
  grid-auto-flow: column;
  gap: var(--g);
}
.grid i { border-radius: .2em; background: rgba(255, 255, 255, .09); }
.grid i.a { background: #84306A; }
.grid i.b { background: #B24489; }
.grid i.c { background: #E166AC; }
.grid i.d { background: #FFA8D4; }
.grid i.x { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

/* Countdown: Coral */
.w-count { --hi: #FFC4B5; }
.w-count .face { background: linear-gradient(160deg, #C24E33 0%, #8C2E1C 55%, #5A1A0F 100%); }
.w-count .f-label + .f-sub { margin-top: .3em; }
.w-count .f-num { font-size: 3.8em; letter-spacing: -0.045em; }
.w-count .unit { font-size: .92em; font-weight: 680; margin-top: .3em; }

/* ---------- Three points ---------- */

.points { padding: 72px 0; }
.points .wrap { display: grid; gap: 32px; grid-template-columns: 1fr; max-width: calc(920px + 2 * var(--gutter)); }
@media (min-width: 760px) {
  .points { padding: 104px 0; }
  .points .wrap { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}
.point h2 {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 740; font-stretch: 106%; letter-spacing: -0.015em; line-height: 1.2;
  margin-bottom: 8px;
}
.point h2::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 2.5px;
  background: var(--tile); outline: 1px solid var(--seam); outline-offset: 2px;
}
.point p { color: var(--text-2); font-size: 17px; line-height: 1.5; max-width: 22em; }

/* ---------- Pricing ---------- */

.pricing { padding: 0 0 72px; }
@media (min-width: 720px) { .pricing { padding-bottom: 104px; } }
.price-card {
  max-width: 760px; margin: 0 auto;
  background: var(--surface); border-radius: calc(var(--radius-card) + 4px); box-shadow: var(--shadow-lg);
  padding: 44px 24px; text-align: center;
}
.price-card h2 { margin-bottom: 14px; }
.price-card .lede { max-width: 30em; margin: 0 auto 12px; }
.price-card .fine { color: var(--text-3); font-size: 15px; margin: 0 auto 30px; max-width: 36em; }
@media (min-width: 720px) { .price-card { padding: 64px 48px; } }

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

.site-footer { border-top: 1px solid var(--seam); padding: 32px 0 44px; font-size: 15px; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.site-footer nav a { text-decoration: none; font-weight: 560; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .legal { font-size: 13px; color: var(--text-3); }
@media (min-width: 760px) {
  .site-footer .wrap { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 24px; }
}

/* ---------- Document pages (Privacy, Support) ---------- */

.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: calc(720px + 2 * var(--gutter)); }
.doc header { margin-bottom: 40px; }
.doc h1 { font-size: clamp(36px, 7vw, 56px); margin-bottom: 14px; }
.doc .meta { color: var(--text-3); font-size: 15px; }
.doc h2 { font-size: 24px; font-weight: 740; font-stretch: 106%; letter-spacing: -0.015em; margin: 44px 0 12px; line-height: 1.2; }
.doc p, .doc li { color: var(--text-2); font-size: 17px; line-height: 1.6; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 12px 0 0; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--text-3); }
.doc strong { color: var(--text); font-weight: 650; }
.doc a { color: var(--text); }

.summary {
  background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 8px;
}
.summary h2 { margin-top: 0; font-size: 19px; }
.summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary li { position: relative; padding-left: 26px; margin: 0; color: var(--text); font-weight: 520; }
.summary li::before {
  content: ""; position: absolute; left: 2px; top: .52em; width: 11px; height: 11px; border-radius: 3px;
  background: var(--tile); outline: 1px solid var(--seam); outline-offset: 2px;
}

.counted { display: grid; gap: 12px; margin: 16px 0 4px; }
.counted div { background: var(--surface); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.counted b { display: block; color: var(--text); font-weight: 680; font-size: 16px; }
.counted code { display: inline-block; margin: 8px 0 6px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13.5px; background: var(--raised); color: var(--text); border-radius: 7px; padding: 3px 8px; }
.counted span { display: block; color: var(--text-2); font-size: 15px; }

.contact-card {
  background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 26px 24px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--radius-btn);
  background: var(--ink); color: #FFFFFF !important; text-decoration: none; font-weight: 640; font-size: 16px;
}
@media (prefers-color-scheme: dark) { .button { background: var(--pearl); color: var(--ink) !important; } }

.faq { margin-top: 12px; border-top: 1px solid var(--seam); }
.faq details { border-bottom: 1px solid var(--seam); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-size: 18px; font-weight: 660; font-stretch: 104%; color: var(--text); line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq .answer { padding: 0 0 22px; }
.faq .answer p, .faq .answer li { font-size: 16.5px; }
.faq ol { padding-left: 1.3em; margin: 8px 0 0; }
.faq ol li { margin: 4px 0; color: var(--text-2); line-height: 1.55; }

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

.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.lost .wordmark { font-size: clamp(72px, 20vw, 140px); margin-bottom: 24px; }
.lost h1 { font-size: clamp(30px, 6vw, 44px); margin-bottom: 12px; }
.lost .lede { margin-bottom: 28px; }
.lost .t:first-of-type { --c: var(--coral); }
.lost .t:last-of-type { --c: transparent; }
