/*
  Eggs & Oats: one stylesheet for every page.
  Colors, corners and type follow Puffy's design language
  (docs/DESIGN_LANGUAGE.md in the app repo): a slate ground, soft tiles
  separated by space, Urbanist for headings, the system face for reading,
  blue only where something is actionable, green for finished work.
*/

@font-face {
  font-family: "Urbanist";
  src: url("/assets/fonts/Urbanist-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ground: #0D121A;
  --tile: #1A1F27;
  --field: #22262D;
  --raised: #2A2E35;

  --text: #F1F3F8;
  --text-2: #8D95A0;
  --text-3: #66707D;

  --brand: #3D6BFF;
  --brand-hover: #5580FF;
  --brand-text: #6C98FF;
  --done: #38C357;
  --done-tint: rgba(56, 195, 87, 0.12);
  --gold: #F8C655;

  --r-tile: 24px;
  --r-box: 12px;

  --gutter: clamp(16px, 4vw, 32px);
  --measure: 1040px;

  --display: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --reading: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.55 var(--reading);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--brand-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--measure));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--ground);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

/* Header and footer */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.wordmark:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-nav a {
  padding-block: 6px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(56px, 10vw, 112px);
  padding-block: 28px 36px;
  color: var(--text-2);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-footer a {
  padding-block: 6px;
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Type helpers */

.meta {
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
}

.lede {
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.45;
}

.section-title {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

/* Actions */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: 600 1.0625rem/1.2 var(--reading);
  text-align: center;
}

.button:hover {
  background: var(--brand-hover);
  text-decoration: none;
}

.text-action {
  font-weight: 600;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

/* Hero */

.hero {
  padding-block: clamp(40px, 9vw, 104px) clamp(40px, 7vw, 80px);
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero .meta {
  margin-bottom: 18px;
}

.hero .lede {
  margin-top: 22px;
}

.hero .actions {
  margin-top: 32px;
}

.app-icon {
  display: block;
  border-radius: 22.5%;
}

.hero .app-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
}

/* Tiles */

.stack {
  display: grid;
  gap: 10px;
}

.section + .section {
  margin-top: clamp(40px, 7vw, 72px);
}

.section > .section-title {
  margin-bottom: 16px;
}

.tile {
  padding: 24px;
  border-radius: var(--r-tile);
  background: var(--tile);
}

.tile h2,
.tile h3 {
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.tile p {
  margin-top: 8px;
  color: var(--text-2);
}

.tile .actions {
  margin-top: 22px;
}

/* The project tile on the studio page */

.project {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 28px;
  align-items: start;
  padding: clamp(24px, 4vw, 40px);
}

.project .app-icon {
  width: clamp(72px, 12vw, 120px);
  height: clamp(72px, 12vw, 120px);
}

.project h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

.project p {
  max-width: 36em;
  margin-top: 12px;
  font-size: 1.0625rem;
}

@media (max-width: 560px) {
  .project {
    grid-template-columns: 1fr;
  }
}

/* Feature tiles on the Puffy page */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 12px;
}

.feature-text {
  padding: 18px 12px 12px;
}

.feature-text p {
  font-size: 1rem;
}

/*
  Vignettes: small drawings of the app, built from the same tokens.
  They are pictures (role="img"), so their sizes are fixed in pixels
  and do not grow with the reader's text size; the words beside them do.
*/

.vignette {
  display: grid;
  align-content: center;
  min-height: 212px;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--r-box);
  background: var(--ground);
  font-size: 15px;
  line-height: 1.3;
}

.v-caps {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.v-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Plan */

.v-plan {
  display: grid;
  gap: 8px;
}

.v-plan-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tile);
}

.v-plan-row .v-day {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.v-plan-row .v-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
}

.v-plan-row .v-info {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

/* Set table */

.v-sets {
  display: grid;
  gap: 4px;
}

.v-set {
  display: grid;
  grid-template-columns: 34px 1fr 58px 46px 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
}

.v-set > :nth-child(3),
.v-set > :nth-child(4) {
  text-align: center;
}

.v-set--head {
  padding-block: 0 2px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.v-set.is-done {
  background: var(--done-tint);
}

.v-chip {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  background: var(--field);
  font-size: 14px;
  font-weight: 600;
}

.v-chip--warm {
  background: rgba(248, 198, 85, 0.16);
  color: var(--gold);
}

.v-set.is-done .v-chip:not(.v-chip--warm) {
  background: none;
}

.v-prev {
  color: var(--text-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.v-set .v-num {
  font-size: 20px;
}

.v-box {
  display: block;
  padding: 3px 0;
  border-radius: 8px;
  background: var(--field);
  color: var(--text-3);
}

.v-tick {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 8px;
  background: var(--field);
}

.v-tick svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-3);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v-tick.is-on {
  background: var(--done);
}

.v-tick.is-on svg {
  stroke: #fff;
}

.v-rest {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 2px;
  color: var(--brand-text);
  font-size: 14px;
}

.v-rest i {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--brand) 62%, var(--field) 62%);
}

/* Crew */

.v-crew {
  display: grid;
  gap: 14px;
}

.v-crew-head {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.v-member {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
}

.v-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--field);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.v-member .v-name {
  font-weight: 500;
}

.v-member .v-sub {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

.v-member .v-sub.is-live {
  color: var(--brand-text);
}

.v-member .v-num {
  font-size: 20px;
  text-align: right;
}

.v-member .v-num.is-met {
  color: var(--done);
}

/* Puff growth */

.v-puff {
  display: grid;
  gap: 14px;
}

.v-puff-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.01em;
}

.v-puff-state {
  color: var(--done);
  font-size: 14px;
  font-weight: 500;
}

.v-puff-growth {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}

.v-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--field);
}

.v-bar i {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: 3px;
  background: var(--text);
}

/* Week strip */

.v-week {
  display: grid;
  gap: 16px;
}

.v-week-line {
  color: var(--done);
  font-weight: 500;
}

.v-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.v-days span {
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 999px;
  background: var(--field);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.v-days .is-done {
  background: var(--done);
  color: #fff;
}

.v-days .is-today {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--text);
  color: var(--text);
}

.v-days .is-ahead {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--raised);
}

/* Stat blocks */

.v-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.v-stat .v-num {
  display: block;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.v-stat .v-num small {
  font-size: 17px;
  font-weight: 600;
}

.v-stat .v-up {
  display: block;
  margin-top: 6px;
  color: var(--done);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* Closing call on the Puffy page */

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(24px, 4vw, 40px);
}

.closing h2 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.closing p {
  margin-top: 8px;
}

/* Reading pages: support and the policies */

.page-head {
  padding-block: clamp(32px, 7vw, 72px) clamp(24px, 4vw, 40px);
}

.page-head h1 {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  letter-spacing: -0.025em;
}

.page-head .meta {
  margin-top: 14px;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.8em;
  font-family: var(--reading);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 0.9em;
  color: #C9CED8;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.notice {
  max-width: 42rem;
  padding: 20px 24px;
  border-radius: var(--r-tile);
  background: rgba(248, 198, 85, 0.1);
  color: var(--gold);
  font-weight: 500;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .columns {
    grid-template-columns: 1fr;
  }
}

.big-link {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.25rem, 4.6vw, 1.75rem);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
