/* paceduet.com, the public page. It wears the app's own design (docs/visual-design.md):
   paper and one ink, colour only in the session marks, lume only on today. */

@font-face {
  font-family: "Planner Notation";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/notation-normal.woff2") format("woff2");
  unicode-range: U+2032-2033, U+2248;
}

@font-face {
  font-family: "Planner Notation";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/notation-italic.woff2") format("woff2");
  unicode-range: U+2032-2033, U+2248;
}

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  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: "Schibsted Grotesk";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2");
  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;
}

/* Hebrew letters only, scaled so their height is 0.9 of Schibsted's cap height, as in the app. */
@font-face {
  font-family: "Planner Hebrew";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  size-adjust: 106.5%;
  src: url("/fonts/noto-sans-hebrew-hebrew-wght-normal.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+FB1D-FB4F;
}

:root {
  color-scheme: light;
  --paper: #fcfbf8;
  --bench: #f2f1ed;
  --ink: #1b1d21;
  --ink-2: rgb(27 29 33 / 0.64);
  --hair: rgb(27 29 33 / 0.11);
  --rule: rgb(27 29 33 / 0.16);
  --lume: #7ae7ea;
  --lume-deep: #00829a;
  --on-lume: #1b1d21;
  --long: #1a56ad;
  --recovery: #34a08e;
  --quality: #ad386d;
  --strength: #a676e4;
  --mark-w: 1.5px;
  --side: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #161513;
    --bench: #1f1e1b;
    --ink: #edebe7;
    --ink-2: rgb(237 235 231 / 0.66);
    --hair: rgb(237 235 231 / 0.12);
    --rule: rgb(237 235 231 / 0.18);
    --lume: #65d2d5;
    --lume-deep: #4fc3cb;
    --on-lume: #1b1d21;
    --long: #4067b6;
    --recovery: #12ad92;
    --quality: #b94a6f;
    --strength: #a57ade;
  }
}

@media (min-width: 768px) {
  :root {
    --side: 40px;
  }
}

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "Planner Notation", "Schibsted Grotesk", "Planner Hebrew", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

/* Hebrew reads with more air and never takes letter-spacing. */
html[lang="he"] body {
  line-height: 1.7;
  word-spacing: 0.05em;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--lume-deep);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2.5px;
}

:focus-visible {
  outline: 2px solid var(--lume-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Numbers, paces and addresses stay left to right inside Hebrew. */
.nt {
  unicode-bidi: isolate;
  direction: ltr;
}

.est {
  font-style: italic;
}

html[lang="he"] .est {
  font-style: normal;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--side);
}

/* The top bar: the mark and the name, as the app signs itself, and the other language. */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  display: block;
  flex: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

/* The opening: what PaceDuet is, beside a week as the app draws it. */

.hero {
  display: grid;
  gap: 36px;
  padding: 28px 0 56px;
}

h1 {
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

html[lang="he"] h1 {
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 34rem;
  margin-top: 20px;
  font-size: 19px;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 72px;
    align-items: center;
    padding: 64px 0 96px;
  }
}

/* The sheet: one week, rows and marks exactly as the week list draws them. */

.sheet {
  max-width: 420px;
  padding: 4px 12px 8px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--paper);
  line-height: 1.35;
  word-spacing: normal;
}

.sheet-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 8px;
}

.sheet-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

html[lang="he"] .sheet-title {
  letter-spacing: 0;
}

.sheet-sum {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.days {
  margin: 0;
  padding: 0;
  list-style: none;
}

.day {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 4px 0;
}

.day + .day {
  border-top: 1px solid var(--hair);
}

.gut {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-block-start: 8px;
  padding-inline-end: 14px;
}

.dnum {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.wd {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

/* Today: the lume key-cap numeral. */
.is-today .gut {
  padding-block-start: 4px;
}

.is-today .dnum {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-inline-end: -8px;
  border-radius: 12px;
  background: var(--lume);
  color: var(--on-lume);
}

.is-today .wd {
  margin-top: 5px;
  margin-inline-end: -2px;
  color: var(--ink);
  font-weight: 600;
}

.sess {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  min-height: 56px;
  padding: 8px 0 10px;
}

.sess-mk {
  padding-block-start: 5px;
}

.nm {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
}

.set {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
}

.rest .nm {
  font-weight: 500;
  color: var(--ink-2);
}

.fig {
  min-width: 64px;
  padding-inline-start: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
  text-align: end;
  white-space: nowrap;
}

.sheet-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding: 12px 0 8px;
  border-top: 1px solid var(--hair);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cap {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  background: var(--lume);
}

/* Words for screen readers only. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Marks: outline is planned, fill is done. */

.mk {
  display: block;
  flex: none;
  overflow: visible;
}

.mk-o {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--mark-w);
}

.mk-f {
  fill: currentColor;
}

.c-long {
  color: var(--long);
}

.c-recovery {
  color: var(--recovery);
}

.c-quality {
  color: var(--quality);
}

.c-strength {
  color: var(--strength);
}

.c-rest {
  color: var(--ink-2);
}

.c-ink {
  color: var(--ink);
}

/* The page's one moment: the week's done sessions fill in, one after another, as runs do. */
@media (prefers-reduced-motion: no-preference) {
  .fills .mk-f {
    stroke: currentColor;
    stroke-width: var(--mark-w);
    animation: fill-in 0.5s ease-out both;
  }

  .fills.f1 .mk-f {
    animation-delay: 0.6s;
  }

  .fills.f2 .mk-f {
    animation-delay: 0.9s;
  }

  .fills.f3 .mk-f {
    animation-delay: 1.2s;
  }
}

@keyframes fill-in {
  from {
    fill-opacity: 0;
    stroke-opacity: 1;
  }
  to {
    fill-opacity: 1;
    stroke-opacity: 0;
  }
}

/* Under the opening: where it stands, who runs it, privacy. */

.about {
  display: grid;
  gap: 32px;
  max-width: 38rem;
  padding: 0 0 64px;
}

@media (min-width: 1024px) {
  .about {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px;
    max-width: none;
    padding: 40px 0 88px;
    border-top: 1px solid var(--hair);
  }
}

h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

html[lang="he"] h2 {
  letter-spacing: 0;
}

.about h2 {
  margin-bottom: 8px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 16px 0 32px;
  border-top: 1px solid var(--hair);
  font-size: 15px;
  color: var(--ink-2);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}

/* The privacy policy: one reading column. */

.doc {
  max-width: 40rem;
  padding: 28px 0 72px;
}

.doc h1 {
  font-size: clamp(34px, 4.2vw, 46px);
}

.updated {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.doc section {
  margin-top: 44px;
  scroll-margin-top: 24px;
}

.doc h2 {
  margin-bottom: 10px;
}

.doc p + p,
.doc p + ul,
.doc ul + p,
.doc .data + p {
  margin-top: 14px;
}

.doc ul {
  margin: 0;
  padding-inline-start: 1.25em;
}

.doc li + li {
  margin-top: 8px;
}

.doc li::marker {
  color: var(--ink-2);
}

.panel {
  padding: 20px 22px 22px;
  border-radius: 18px;
  background: var(--bench);
}

.doc .short {
  margin-top: 32px;
}

.short h2 {
  font-size: 17px;
  font-weight: 700;
}

.doc section.panel {
  margin-top: 44px;
}

/* What we collect: one block per kind of data, so it reads on a phone. */

.data {
  border-bottom: 1px solid var(--hair);
}

.data > div {
  padding: 14px 0 16px;
  border-top: 1px solid var(--hair);
}

.data h3 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 600;
}

.data dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  font-size: 16px;
}

.data dt {
  color: var(--ink-2);
}

/* The 404 page. */

.lost {
  max-width: 34rem;
  padding: 56px 0 96px;
}

.lost p {
  margin-top: 16px;
  font-size: 19px;
}
