/* Homepage: a sketchbook page in blue ballpoint on porcelain paper. Anything
   flat is drawn by hand; anything real is glossy and 3D. Tokens, type, the
   index tabs and buttons come from base.css. */

.home {
  --onset: #e2773f;
  --ghar: #b8704f;
  --tiptip: #22c77f;
  --lanes: #8fa2c0;
  --incoming: #ff8a1f;
  --project-l: #6f9373;
  --pencil: #7b7f88;
}
.home main {
  overflow-x: clip;
}

/* Onset leads with a useful screen, framed in the same pen and paper. */
.onset-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 80px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 136px 24px 80px;
  scroll-margin-top: 80px;
}
.onset-intro {
  display: grid;
  justify-items: start;
  gap: 24px;
}
.product-label {
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-label img {
  border-radius: 14px;
  box-shadow: 0 10px 20px -12px #15171c80;
}
.product-label > div {
  display: grid;
  gap: 1px;
}
.product-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.product-kind, .product-facts, .preview-caption {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.onset-hero h1, .apps-intro h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 3.75vw, 3.375rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-wrap: balance;
}
.hero-sub {
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-demo {
  justify-self: center;
  width: min(280px, 100%);
}
.onset-hero .chapter-phone { width: 100%; }
.onset-hero h1 mark { white-space: nowrap; }
.onset-home mark.ink > svg { color: var(--pen); }
.onset-hero .chapter-note {
  right: 0;
}
.preview-caption {
  position: relative;
  z-index: 1;
  margin: 28px -12px 0;
  text-align: center;
  line-height: 1.45;
}
.onset-features, .onset-notes {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 24px;
  scroll-margin-top: 64px;
}
.section-heading {
  display: grid;
  gap: 16px;
}
.section-heading .note, .onset-notes .note {
  transform: rotate(-2deg);
}
.section-heading h2, .onset-download h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.feature-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 44px 0 28px;
}
.feature-notes article {
  border-top: 1.5px solid var(--pen-line);
  padding-top: 20px;
}
.feature-number { display: block; }
.feature-notes h3 {
  margin: 18px 0 8px;
  font-size: 1.2rem;
  line-height: 1.3;
}
.feature-notes p, .onset-notes article > p:not(.note) {
  color: var(--ink-soft);
  max-width: 34rem;
}
.onset-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
}
.onset-notes article {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 20px;
  scroll-margin-top: 90px;
}
.onset-notes h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.onset-download {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 88px 24px 100px;
  text-align: center;
}
.onset-download > p:last-child {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.apps-intro {
  display: grid;
  justify-items: start;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 88px 24px 8px;
}
.apps-intro > .note { margin-top: 4px; }
.apps-intro > p:not(.note) {
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}
.apps-page #next { padding-top: 48px; }
.app-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.app-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--porcelain);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.app-index a:hover { text-decoration: underline; text-underline-offset: 4px; }
.legacy-target { display: none; }
.legacy-target:target {
  display: block;
  max-width: 36rem;
  margin: 32px auto;
  padding: 20px;
  border: 1px dashed var(--pen);
  scroll-margin-top: 90px;
}

@media (max-width: 900px) {
  .onset-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 76px;
    padding-top: 96px;
    padding-bottom: 40px;
  }
  .onset-intro { max-width: 38rem; }
  .onset-hero .chapter-phone { margin-top: 0; }
  .feature-notes { gap: 24px; }
  .onset-notes { gap: 40px; }
}
@media (max-width: 640px) {
  .onset-hero, .onset-features, .onset-notes, .apps-intro {
    padding-inline: 16px;
  }
  .onset-hero h1 { font-size: clamp(1.75rem, 8.2vw, 3.3rem); }
  .onset-intro { gap: 22px; }
  .hero-actions { gap: 10px; }
  .hero-demo { width: min(270px, 76vw); }
  .feature-notes, .onset-notes { grid-template-columns: minmax(0, 1fr); }
  .onset-features, .onset-notes { padding-block: 48px; }
  .feature-notes { gap: 28px; margin-top: 32px; }
  .onset-notes { gap: 64px; }
  .onset-download { padding-block: 64px; }
  .onset-home .teaser-art { order: 0; }
  .onset-home .calc-teaser { margin-top: 0; gap: 24px; }
}

/* ——— Chapters: from sketch to screen ——— */
.chapters {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2vh 24px;
}
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: 9vh 0;
}
.chapter:nth-of-type(even) .chapter-copy {
  order: 2;
}
.chapter-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.chapter-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 10px 20px -12px #15171c80;
}
.chapter-status {
  color: var(--ink-soft);
}
.chapter-title {
  margin: -4px 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.chapter-lede,
.studio-note {
  max-width: 28ch;
  font-weight: 500;
  font-size: clamp(1.3rem, 0.95rem + 1.1vw, 1.85rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.chapter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.chapter-tags li {
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.chapter-fine {
  max-width: 34rem;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 10px;
}
.text-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--ink-soft);
  text-underline-offset: 4px;
}
.text-link:hover {
  text-decoration-color: var(--ink);
}
.chapter:nth-of-type(even) .chapter-note {
  right: auto;
  left: -18%;
  transform: rotate(-5deg);
}

.waitlist {
  display: grid;
  gap: 8px;
  width: min(100%, 26rem);
  margin-top: 14px;
}
.waitlist label {
  font-weight: 600;
  font-size: 0.9375rem;
}
.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.waitlist-row > .waitlist-submit {
  flex: 0 0 auto;
}
.waitlist-row[hidden] {
  display: none;
}
.waitlist-row input {
  flex: 1 1 11rem;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--porcelain);
  box-shadow: inset 0 0 0 1px var(--line);
}
.waitlist-submit {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--porcelain);
  font-weight: 600;
  cursor: pointer;
  transition-property: color, background-color, border-color, transform;
  transition-duration: var(--motion-feedback);
  transition-timing-function: var(--ease);
}
.waitlist-submit:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--button-hover);
}
@media (prefers-reduced-motion: no-preference) {
  .waitlist-submit:active:not(:disabled):not([aria-disabled="true"]) {
    transform: scale(var(--press-scale));
    transition-duration: var(--motion-feedback), var(--motion-feedback),
      var(--motion-feedback), var(--motion-press);
  }
}
.waitlist-status:empty {
  display: none;
}
.waitlist-status {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.waitlist[data-state="invalid"] .waitlist-status,
.waitlist[data-state="error"] .waitlist-status {
  color: var(--error);
}
.waitlist-privacy {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

/* ——— Almost there and In the sketchbook: one card per app ——— */
.shelf-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10vh 24px 2vh;
}
.shelf-head {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}
.shelf-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.shelf-head p {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}
.shelf {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
}
.shelf-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.shelf-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mini {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
  background: var(--porcelain);
  box-shadow:
    inset 0 1px 0 var(--card-highlight),
    0 0 0 1px #15171c10,
    0 18px 30px -24px #15171c66;
  scroll-margin-top: 72px;
}
/* Still in the sketchbook: pencilled on the page, not yet a finished card. */
.mini.is-sketch {
  background: transparent;
  box-shadow: none;
  outline: 1.5px dashed var(--pen-line);
  outline-offset: -1.5px;
}
.mini-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mini-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 8px 16px -10px #15171c80;
}
.mini h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.mini-status {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.mini-lede {
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.mini-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
.mini .waitlist {
  margin-top: 0;
}
.peek {
  align-self: stretch;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.peek summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--pen);
  font-family: var(--sans);
  font-size: 1.7rem;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}
.peek summary::-webkit-details-marker {
  display: none;
}
.peek summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--motion-disclosure) var(--ease);
}
.peek[open] summary::after {
  margin-top: 4px;
  transform: rotate(225deg);
}
.peek .chapter-phone {
  width: min(250px, 72%);
  margin: 64px auto 12px;
}
.peek .chapter-note,
.chapter:nth-of-type(even) .peek .chapter-note {
  right: -12%;
  left: auto;
  font-size: 1.5rem;
  transform: rotate(5deg);
}

/* ——— Calculator teaser ——— */
.calc-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  max-width: 1180px;
  margin: 6vh auto 0;
  padding: 40px 24px;
}
.teaser-copy {
  display: grid;
  justify-items: start;
  gap: 18px;
}
.teaser-copy h2,
.studio h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.teaser-copy p {
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}
.teaser-art {
  position: relative;
}
.teaser-art img {
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .teaser-art img {
    transition: transform var(--motion-disclosure) var(--ease);
  }
  .teaser-art:hover img {
    transform: rotate(-2deg) scale(1.01);
  }
}
.teaser-note {
  position: absolute;
  top: 6%;
  left: 2%;
  font-size: 2rem;
  transform: rotate(-8deg);
}

/* ——— Studio ——— */
.studio {
  display: grid;
  justify-items: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  padding: 14vh 24px 8vh;
  text-align: center;
}
.studio-note {
  max-width: 30ch;
}
.studio-contact {
  color: var(--ink-soft);
  font-size: 1.0625rem;
}
.studio-contact a {
  color: var(--ink);
  text-underline-offset: 4px;
}


/* ——— Smaller screens ——— */
@media (max-width: 900px) {
  .chapter {
    grid-template-columns: minmax(0, 1fr);
    padding: 7vh 0 4vh;
  }
  .chapter:nth-of-type(even) .chapter-copy {
    order: 0;
  }
  .chapter-phone {
    margin-top: 64px;
  }
  .chapter-note,
  .chapter:nth-of-type(even) .chapter-note {
    right: -4%;
    left: auto;
    transform: rotate(5deg);
  }
  .calc-teaser {
    grid-template-columns: minmax(0, 1fr);
  }
  .shelf-3,
  .shelf-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .teaser-art {
    order: -1;
  }
}


@media (max-width: 560px) {
  .hero-sub {
    font-size: 1rem;
  }
  .chapters,
  .calc-teaser,
  .shelf-section,
  .studio {
    padding-inline: 16px;
  }
  .mini {
    padding: 18px;
  }
  .chapter-note {
    bottom: calc(100% + 14px);
  }
}
