/* Momentez — "Sundial": the page stands on the sky of the visitor's hour (DESIGN.md). */
@font-face {
  font-family: "Ysabeau Office";
  src: url("ysabeau-office.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* sky.js rewrites these from the local clock; defaults are 13:00 */
  --top: #F4BF55;
  --bottom: #FFF2CC;
  --ink: #2B1A10;
  --ink-low: #2B1A10;
  --on-ink: #FFF1DE;
  --sheet: #FFFAF3E6;
  --text: #2B1A10;
  --text-soft: #5E4431;
  --gold: #FFC76B;
  --amber: #FFA43A;
  --sun: #FFFBF2;
  --gutter: clamp(16px, 5vw, 72px);
}

* { box-sizing: border-box; }

html { background: var(--top); }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(var(--top), var(--bottom)) fixed;
  color: var(--text);
  font: 400 18px/28px "Ysabeau Office", system-ui, sans-serif;
  /* Ysabeau Office has a small x-height: the same px would read a size smaller than the Geologica these sizes were drawn for (Sergey 11.10). */
  font-size-adjust: .46;
  font-optical-sizing: auto;
  transition: background 1.2s;
  -webkit-font-smoothing: antialiased;
}

/* grain over the sky, as in the app */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("grain.png");
  mix-blend-mode: soft-light;
  opacity: .18;
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:focus-visible, .pill:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 8px; }
.top .pill:focus-visible { outline-color: var(--ink); }
.sheet a:focus-visible { outline-color: var(--text); }

/* ---- sky part ---- */

.top {
  position: relative;
  z-index: 1;
  color: var(--ink);
  min-height: 92svh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 20px var(--gutter) 0;
  overflow: hidden;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  font-weight: 500;
  position: relative;
  z-index: 2;
}
/* text on the sky is 24px+ (WCAG large): at dusk no ink reaches 4.5:1 on a mid-tone sky */
.bar .name, .bar .lang { font-size: 24px; letter-spacing: -.02em; }
.bar .name { text-decoration: none; padding: 8px 0; }
.bar .lang { padding: 8px 0 8px 16px; }

h1 {
  margin: clamp(20px, 5svh, 56px) 0 0;
  font-size: clamp(44px, min(7vw, 12svh), 104px);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -.045em;
  max-width: 9ch;
  position: relative;
  z-index: 2;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.pill:active { transform: scale(.96); }
.pill[aria-disabled] { cursor: default; text-align: center; }
.pill[aria-disabled]:active { transform: none; }

/* living sky, variant 2 of docs/prototype/sky.html */
.life { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.mote { position: absolute; border-radius: 50%; background: #fff; animation: rise var(--d) ease-in-out infinite; animation-delay: var(--dl); }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 20%, 80% { opacity: var(--o); } 100% { transform: translate(var(--x), -140px); opacity: 0; } }
.fly {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFF0D0; box-shadow: 0 0 8px 2px #FFE9C466;
  animation: wander var(--d) ease-in-out infinite alternate, blink 3.2s ease-in-out infinite; animation-delay: var(--dl);
}
@keyframes wander { 33% { transform: translate(28px, -20px); } 66% { transform: translate(-16px, -38px); } 100% { transform: translate(20px, -8px); } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.star { position: absolute; border-radius: 50%; background: #FFF6E4; animation: blink var(--d) ease-in-out infinite; animation-delay: var(--dl); }

/* ---- reading part: the sheet ---- */

.sheet {
  position: relative;
  z-index: 1;
  background: var(--sheet);
  padding: 14px var(--gutter) 40px;
  color: var(--text);
}
.grip { width: 40px; height: 5px; border-radius: 3px; background: #2B1A1033; margin: 0 auto 40px; }

.sheet h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.03em;
  margin: 0 0 16px;
}
.sheet p { margin: 0 0 14px; max-width: 36em; }
.soft { color: var(--text-soft); }

.cite { font-size: 15px; line-height: 22px; }

.end {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding: 40px 0 0; max-width: 1180px; border-top: 1px solid #2B1A101f;
}
.end .pill { background: var(--text); color: #FFF1DE; }
.end .buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.end nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }
.end nav a { display: inline-block; padding: 10px 0; }

@media (min-width: 900px) {
  .sheet { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 64px; }
  .sheet > .grip, .sheet > .end { grid-column: 1 / -1; }
}

/* ---- privacy ---- */

.top.slim { min-height: 0; padding-bottom: 36px; }
.top.slim h1 { font-size: clamp(32px, 6vw, 80px); max-width: 14ch; hyphens: auto; margin-top: clamp(28px, 7vh, 72px); }
.doc { max-width: 40em; padding: 12px 0 24px; }
.doc h2 { font-size: 26px; margin-top: 40px; }
.doc h2:first-child { margin-top: 0; }
.doc ul { padding-left: 1.2em; margin: 0 0 14px; }
.doc li { margin: 0 0 8px; }
.doc code { font: inherit; font-weight: 500; }

@media (max-width: 520px) {
  .top { min-height: 0; }
  .grip { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

