/* Kōnst — konst.fit
 *
 * One stylesheet for the homepage and the legal pages. Hand-written, no
 * framework: the page is small, and a runtime CSS compiler on every visit was
 * the slowest thing the old site did.
 *
 * The palette is the app icon's: a warm milk mark on true black. The three
 * data inks are the app's own ring colours and appear only where data is drawn.
 */

:root {
  --black: #000;
  --panel: #161617;
  --panel-2: #1d1d1f;
  --hairline: rgba(255, 255, 255, 0.1);
  --ink: #f5f5f7;
  --muted: #8e8e93;
  --soft: #a1a1a6;
  --milk: #f2ede3;
  --milk-ink: #1d1b18;

  --sleep: #908dc8;
  --recovery: #5fc98a;
  --load: #e8a25c;

  --wide: 1120px;
  --text: 692px;
  --gutter: 22px;
  --radius-xl: 28px;
  --radius-l: 18px;

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--milk);
  color: var(--milk-ink);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 100;
}
.skip:focus {
  left: 12px;
}

/* ── Navigation ─────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--hairline);
}
.nav-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 13px;
  color: var(--soft);
}
.nav-links a:hover {
  color: var(--ink);
}

/* ── Buttons and links ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--milk);
  color: var(--milk-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn:hover {
  background: #fffaf0;
}
.btn-small {
  height: 30px;
  padding: 0 14px;
  font-size: 13px;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--milk);
  font-size: 17px;
}
.more:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.more svg {
  width: 9px;
  height: 14px;
}

/* ── Hero ──────────────────────────────────────────────────────────── */

.hero {
  padding: 88px var(--gutter) 40px;
  text-align: center;
}
.hero h1 {
  margin: 0 auto;
  max-width: 13ch;
  font-size: clamp(48px, 8.4vw, 96px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.045em;
}
.hero-lede {
  margin: 26px auto 0;
  max-width: 34em;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.38;
  color: var(--soft);
  letter-spacing: -0.016em;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.rings {
  margin: 76px auto 0;
  max-width: 820px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 4vw, 56px);
}
figure.ring {
  margin: 0;
  min-width: 0;
}
.ring svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
}
.ring .arc {
  fill: none;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay);
}
.ring figcaption {
  margin-top: 18px;
  font-size: clamp(15px, 1.8vw, 21px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ring-note {
  margin: 34px auto 0;
  max-width: 30em;
  font-size: 15px;
  color: var(--muted);
}

@keyframes draw {
  to {
    stroke-dashoffset: var(--rest);
  }
}

/* ── Chapters ──────────────────────────────────────────────────────── */

.chapter {
  padding: 150px var(--gutter) 0;
}
.chapter-head {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}
.chapter h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.chapter-head p {
  margin: 24px auto 0;
  max-width: 32em;
  font-size: clamp(19px, 2vw, 21px);
  line-height: 1.42;
  color: var(--soft);
}
.chapter-head .more {
  margin-top: 18px;
}

.stage {
  max-width: var(--wide);
  margin: 64px auto 0;
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 6vw, 72px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Facts under a stage: a quiet spec list, not a card grid. */
.facts {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  row-gap: 34px;
  list-style: none;
}
.facts li {
  padding: 0;
}
.facts strong {
  display: block;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.facts span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.47;
}

/* ── Vignettes: small, faithful pieces of the app's own UI ────────── */

.ui {
  width: min(100%, 480px);
  background: #000;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 20px;
  font-size: 15px;
  text-align: left;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.ui-title {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.ui-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Training: one exercise and its sets */
.sets {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}
.set {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 30px;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--panel-2);
  font-variant-numeric: tabular-nums;
}
.set .n {
  color: var(--muted);
}
.set .done {
  justify-self: end;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--milk);
  display: grid;
  place-items: center;
}
.set .done svg {
  width: 11px;
  height: 11px;
}
.set.next {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: var(--soft);
}
.set.next .done {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
}
.rest {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.rest b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Nutrition: the log bar and the reviewed foods */
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 8px 0 16px;
  border-radius: 999px;
  background: var(--panel-2);
}
.bar .typed {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar .caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--milk);
}
.bar .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--soft);
}
.bar .icon svg {
  width: 17px;
  height: 17px;
}
.foods {
  margin-top: 14px;
  border-radius: 16px;
  background: var(--panel-2);
  padding: 4px 16px;
}
.food {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}
.food:last-child {
  border-bottom: 0;
}
.food span:last-child {
  color: var(--muted);
}
.ui .btn {
  width: 100%;
  margin-top: 14px;
  height: 44px;
  font-size: 15px;
}

/* Health: a week of sleep against the person's own usual range */
.week {
  margin-top: 18px;
  position: relative;
  height: 168px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
}
.week .band {
  position: absolute;
  z-index: 1;
  left: -4px;
  right: -4px;
  bottom: 58%;
  height: 14%;
  background: rgba(255, 255, 255, 0.07);
  border-top: 1px dashed rgba(255, 255, 255, 0.45);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
.week i {
  position: relative;
  display: block;
  border-radius: 7px;
  background: var(--sleep);
}
.week i.short {
  background: rgba(144, 141, 200, 0.45);
}
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.legend {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.legend em {
  width: 16px;
  height: 9px;
  background: rgba(255, 255, 255, 0.07);
  border-top: 1px dashed rgba(255, 255, 255, 0.45);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.45);
}

/* Coach: a question about the screen, and the answer */
.ask {
  margin-left: auto;
  width: fit-content;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px 18px 6px 18px;
  background: var(--panel-2);
}
.answer {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.answer img {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.answer p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

/* Make it yours: the real alternate app icons */
.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(12px, 2.6vw, 28px);
  width: 100%;
  max-width: 780px;
}
.tiles img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22.5%;
}

/* Make it yours: present, but not the pitch — no stage, smaller type */
.yours {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 120px var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 48px;
  align-items: center;
}
.yours h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.yours p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 26em;
}
.yours .tiles {
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

/* ── Privacy, also, questions ─────────────────────────────────────── */

.privacy {
  max-width: var(--wide);
  margin: 150px auto 0;
  padding: 0 var(--gutter);
}
.privacy-inner {
  background: var(--panel);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 7vw, 88px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.privacy h2 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.privacy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 22px;
}
.privacy li strong {
  display: block;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.privacy li span {
  color: var(--muted);
  font-size: 15px;
}
.privacy .more {
  margin-top: 28px;
}

.also {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 120px var(--gutter) 0;
}
.also h2 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.faq {
  max-width: var(--text);
  margin: 0 auto;
  padding: 150px var(--gutter) 0;
}
.faq h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.035em;
  text-align: center;
}
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 36px 22px 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--soft);
  border-bottom: 1.6px solid var(--soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}
.faq details p {
  margin: 0 0 22px;
  color: var(--soft);
}

/* ── Beta signup ───────────────────────────────────────────────────── */

.beta {
  padding: 170px var(--gutter) 150px;
  text-align: center;
}
.beta img {
  width: 96px;
  height: 96px;
  margin: 0 auto 30px;
  border-radius: 22px;
}
.beta h2 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.beta p {
  margin: 20px auto 0;
  max-width: 30em;
  color: var(--soft);
  font-size: 19px;
}
.signup {
  margin: 34px auto 0;
  max-width: 440px;
  display: flex;
  gap: 10px;
}
.signup input[type='email'] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}
.signup input[type='email']::placeholder {
  color: var(--muted);
}
.signup input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 40px var(--panel) inset;
  caret-color: var(--ink);
}
.hidden-field {
  position: absolute;
  left: -9999px;
}
.signup-status {
  min-height: 24px;
  margin-top: 14px;
  font-size: 15px;
  color: var(--soft);
}

/* ── Footer ────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 20px var(--gutter) 28px;
}
.footer p {
  margin: 0 0 12px;
  max-width: 60em;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-links .copy {
  margin-right: auto;
}

/* ── Document pages (privacy, terms, support) ─────────────────────── */

.doc {
  max-width: var(--text);
  margin: 0 auto;
  padding: 72px var(--gutter) 120px;
}
.doc h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.doc .updated {
  margin: 12px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.doc h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.doc h3 {
  margin: 32px 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.doc p,
.doc li {
  color: #d2d2d7;
}
.doc ul {
  padding-left: 20px;
}
.doc li {
  margin: 8px 0;
}
.doc strong {
  color: var(--ink);
}
.doc a {
  color: var(--milk);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Smaller screens ───────────────────────────────────────────────── */

@media (max-width: 900px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .privacy-inner,
  .yours {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 734px) {
  :root {
    --gutter: 16px;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding-top: 56px;
  }
  .rings {
    margin-top: 52px;
  }
  .chapter {
    padding-top: 110px;
  }
  .stage {
    margin-top: 44px;
    border-radius: 22px;
  }
  .facts {
    grid-template-columns: 1fr;
    row-gap: 26px;
  }
  .yours .tiles {
    grid-template-columns: repeat(3, 1fr);
  }
  .signup {
    flex-direction: column;
  }
  .signup input[type='email'] {
    flex: none;
  }
  .footer-links .copy {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ring .arc {
    animation: none;
    stroke-dashoffset: var(--rest);
  }
}

.nav-links a[aria-current='page'] {
  color: var(--ink);
}

/* ── Shared-routine landing page ───────────────────────────────────── */

.shared-title {
  margin: 0;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.shared-note {
  font-size: 15px !important;
  color: var(--muted) !important;
}
.shared-join {
  max-width: 560px;
  margin: 72px auto 0;
  padding-top: 56px;
  border-top: 1px solid var(--hairline);
}
.shared-join h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
