/* Homepage: "A page a day" (documents/concepts/website/paper-page.md). */

.home {
  --paper: #f8f3e7;          /* the app's PagePaper colour */
  --paper-edge: #f1e9d8;
  --ivory: #fbf7ee;
  --cream: #f1e9d8;
  --stone: #d9ceba;
  --ink-page: #29211c;
  --ink-forest: #1f5c38;
  --sage: #5b8a60;
  --forest: #062d1f;
  --forest-2: #1f4f38;
  --text: #102217;
  --text-2: #516252;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hand: "Noteworthy", "Bradley Hand", "Segoe Print", cursive;
  background: var(--ivory);
  color: var(--text);
}

.home h1,
.home h2,
.home h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.home .lede {
  color: var(--text-2);
}

.home .eyebrow {
  color: var(--sage);
}

/* Buttons */

.home .button {
  background: var(--forest);
  color: #fffdf6;
}

.home .button:hover {
  background: var(--forest-2);
}

.store-pill {
  cursor: default;
}

.home .store-pill:hover {
  background: var(--forest);
}

.button--outline {
  background: transparent !important;
  color: var(--forest) !important;
  box-shadow: inset 0 0 0 1.5px var(--forest);
}

.button--outline:hover {
  background: rgba(6, 45, 31, 0.06) !important;
}

.home .store-pill--light,
.home .store-pill--light:hover {
  background: #fffdf6;
  color: var(--forest);
}

.button--outline-light {
  background: transparent !important;
  color: #fffdf6 !important;
  box-shadow: inset 0 0 0 1.5px rgba(255, 253, 246, 0.7);
}

.text-link {
  color: var(--forest-2);
  font-weight: 700;
  text-underline-offset: 4px;
}

/* Paper pages */

.paper {
  position: relative;
  background: var(--paper);
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0 0 1px rgba(16, 34, 23, 0.06),
    0 24px 48px -24px rgba(32, 39, 31, 0.28);
  color: var(--ink-page);
  padding: clamp(24px, 4vw, 44px);
}

.paper__date {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  color: var(--ink-page);
}

.paper__prompt {
  margin: 6px 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(41, 33, 28, 0.1);
  font-family: var(--serif);
  font-style: italic;
  color: rgba(41, 33, 28, 0.45);
  font-size: 1.05rem;
}

.paper__text {
  margin: 0;
  max-width: none;
  color: inherit;
  font-size: 1.05rem;
  line-height: 1.75;
}

.font-mono .paper__text {
  font-family: var(--mono);
  font-size: 0.98rem;
}

.font-hand .paper__text {
  font-family: var(--hand);
  font-size: 1.12rem;
  font-weight: 300;
}

.font-serif .paper__text {
  font-family: var(--serif);
}

.ink-forest .paper__text {
  color: var(--ink-forest);
}

.paper__ink {
  position: absolute;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper__ink--leaf {
  width: 110px;
  left: clamp(18px, 4vw, 40px);
  bottom: 18px;
  stroke: rgba(41, 33, 28, 0.55);
}

.paper__ink--sprig {
  width: 96px;
  right: 22px;
  bottom: 18px;
  stroke: #33854d; /* Pencil "Leaf" */
}

.ring-clock {
  position: absolute;
  top: clamp(18px, 3vw, 30px);
  right: clamp(18px, 3vw, 30px);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--forest-2);
}

.ring-clock svg {
  position: absolute;
  inset: 0;
  fill: none;
  stroke: var(--sage);
  stroke-width: 2.5;
}

/* Hero */

.home-hero {
  padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(168, 201, 154, 0.22), transparent 60%),
    var(--ivory);
}

.home-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.home-hero h1 {
  margin: 0 0 20px;
  text-wrap: balance;
  font-size: clamp(2.4rem, 4.8vw, 3.9rem);
  line-height: 1.04;
}

.home-hero h1 span {
  display: block;
}

.home-hero .lede {
  max-width: 34rem;
  margin-bottom: 28px;
}

.home-hero__stage {
  position: relative;
  padding: 0 clamp(40px, 9vw, 120px) 32px 0;
}

.paper--hero {
  min-height: 330px;
  padding-bottom: 110px;
  transform: rotate(-0.6deg);
}

.paper--hero .paper__date,
.paper--hero .paper__prompt {
  padding-right: 72px;
}

.home-hero__plant {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(130px, 17vw, 210px);
  filter: drop-shadow(0 18px 18px rgba(32, 39, 31, 0.16));
  transform-origin: 50% 90%;
}

@media (prefers-reduced-motion: no-preference) {
  .home-hero__plant {
    animation: sway 7s ease-in-out infinite;
  }

  .home-hero__copy,
  .home-hero__stage {
    animation: fade-in 700ms ease-out both;
  }

  .home-hero__stage {
    animation-delay: 120ms;
  }
}

@keyframes sway {
  0%, 100% { transform: rotate(-0.8deg); }
  50% { transform: rotate(0.8deg); }
}

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

.trust-line {
  border-block: 1px solid var(--stone);
  background: var(--paper);
}

.trust-line p {
  margin: 0;
  max-width: none;
  padding: 16px 0;
  text-align: center;
  font-weight: 700;
  color: var(--text-2);
  font-size: 0.95rem;
}

.trust-line span {
  margin: 0 10px;
  color: var(--stone);
}

/* Sections */

.home-section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.home-section--cream {
  background: var(--cream);
}

.home-heading {
  max-width: 44rem;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.home-heading h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.1;
}

.home-heading .lede {
  margin-inline: auto;
}

.home-heading--left {
  margin: 0;
  text-align: left;
}

/* The page, with margin notes */

.annotated {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.margin-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 30px;
}

.margin-notes li {
  position: relative;
  padding-left: 22px;
  border-left: 2px solid var(--stone);
}

.margin-notes strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.margin-notes span {
  color: var(--text-2);
  line-height: 1.55;
}

.paper--feature {
  padding-bottom: 96px;
  transform: rotate(0.4deg);
}

.paper__photo {
  float: right;
  width: min(46%, 260px);
  margin: 4px 0 12px 22px;
  border: 6px solid #fffdf6;
  border-radius: 2px;
  box-shadow: 0 8px 18px -10px rgba(32, 39, 31, 0.4);
  transform: rotate(1.2deg);
}

.session-notes {
  list-style: none;
  margin: clamp(40px, 6vw, 64px) auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  color: var(--text-2);
  line-height: 1.55;
}

.session-notes strong {
  color: var(--text);
}

/* Growth strip */

.growth-strip {
  background: var(--cream);
  border-block: 1px solid var(--stone);
  padding: clamp(48px, 6vw, 72px) 0 clamp(36px, 5vw, 56px);
}

.growth-strip__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: end;
}

.growth-strip h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.12;
}

.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.stages li {
  text-align: center;
}

.stages img {
  width: 100%;
  max-width: 150px;
  margin: 0 auto 8px;
}

.stages span {
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-2);
}

/* Shelf */

.shelf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  align-items: end;
}

.shelf__label {
  margin: 16px 0 0;
  max-width: none;
  text-align: center;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.45;
}

.shelf__label strong {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.shelf__note {
  max-width: 40rem;
  margin: clamp(32px, 4vw, 48px) auto 0;
  text-align: center;
  color: var(--text-2);
}

.book,
.pile {
  position: relative;
  aspect-ratio: 3 / 4;
}

.book {
  overflow: hidden;
  border-radius: 4px 8px 8px 4px;
  box-shadow:
    inset 14px 0 0 rgba(0, 0, 0, 0.07),
    inset 15px 0 0 rgba(255, 255, 255, 0.18),
    0 20px 30px -18px rgba(32, 39, 31, 0.45);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 3px);
}

.book--sage { background-color: #8fa983; }
.book--oat { background-color: #d8ccb4; }
.book--lavender { background-color: #b7a2c4; }

.book__flower {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 52%;
  transform: translateX(-46%) rotate(-6deg);
  filter: saturate(0.85) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.12));
}

.book__flower--tilt {
  transform: translateX(-52%) rotate(5deg);
}

.book__tape {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 34%;
  height: 7%;
  transform: translateX(-46%) rotate(-8deg);
  background: rgba(250, 244, 226, 0.78);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.book__name {
  position: absolute;
  left: 50%;
  top: 7%;
  transform: translateX(-46%);
  padding: 4px 14px;
  background: #fbf7ee;
  border-radius: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.pile__sheet {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(16, 34, 23, 0.07), 0 10px 20px -14px rgba(32, 39, 31, 0.4);
}

.pile__sheet:nth-child(1) { transform: rotate(-3deg) translate(-4px, 4px); }
.pile__sheet:nth-child(2) { transform: rotate(2deg) translate(3px, 2px); }

.pile__top {
  padding: 16px;
  overflow: hidden;
}

.pile__top .paper__date {
  font-size: 1rem;
}

.pile__top .paper__prompt {
  font-size: 0.8rem;
  margin: 2px 0 10px;
  padding-bottom: 8px;
}

.pile__top .paper__text {
  font-size: 0.82rem;
  line-height: 1.6;
}

.pile__plant {
  position: absolute;
  right: -10%;
  bottom: -4%;
  width: 46%;
  filter: drop-shadow(0 10px 10px rgba(32, 39, 31, 0.18));
}

/* Read-back */

.readback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.readback__notes {
  display: grid;
  gap: 22px;
}

.slip {
  margin: 0;
  padding: 24px 28px;
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(16, 34, 23, 0.06), 0 16px 30px -22px rgba(32, 39, 31, 0.5);
  transform: rotate(-0.6deg);
}

.slip--offset {
  margin-left: clamp(0px, 6vw, 64px);
  transform: rotate(0.8deg);
}

.slip figcaption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 8px;
}

.slip blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-style: italic;
  color: var(--ink-page);
}

/* iPad */

.ipad {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.ipad__shot {
  width: 100%;
  max-width: 620px;
  justify-self: end;
  border-radius: 22px;
  border: 10px solid #1b1e1c;
  box-shadow: 0 30px 60px -30px rgba(32, 39, 31, 0.5);
}

/* Privacy note */

.pinned-note {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 52px);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(16, 34, 23, 0.06), 0 24px 40px -26px rgba(32, 39, 31, 0.5);
  transform: rotate(-0.5deg);
}

.pinned-note__pin {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f3d77f, #b58a25 70%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.25);
}

.pinned-note h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3.6vw, 2.6rem);
}

.pinned-note__big {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.pinned-note p {
  max-width: none;
  color: var(--text-2);
  line-height: 1.65;
}

/* Pricing */

.ledger {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}

.ledger__col {
  padding: 32px clamp(20px, 4vw, 44px);
}

.ledger__col + .ledger__col {
  border-left: 1px solid var(--stone);
}

.ledger h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.ledger__price {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--forest-2);
}

.ledger__price span {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-2);
}

.ledger p {
  color: var(--text-2);
  line-height: 1.6;
}

.ledger__note {
  font-size: 0.85rem;
  font-style: italic;
}

/* Closing */

.closing {
  background: var(--forest);
  color: #fffdf6;
  padding: clamp(56px, 8vw, 96px) 0;
  overflow: hidden;
}

.closing__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}

.closing__plant {
  width: clamp(110px, 14vw, 170px);
}

.closing h2 {
  margin: 0 0 10px;
  color: #fffdf6;
  font-size: clamp(2rem, 4vw, 3rem);
}

.closing .lede {
  color: rgba(255, 253, 246, 0.8);
  margin-bottom: 24px;
}

/* Small screens */

@media (max-width: 900px) {
  .home-hero__inner,
  .annotated,
  .growth-strip__inner,
  .readback,
  .ipad {
    grid-template-columns: 1fr;
  }

  .home-hero__stage {
    padding-right: 72px;
  }

  .session-notes {
    grid-template-columns: 1fr;
    max-width: 34rem;
  }

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

  .ipad__shot {
    justify-self: center;
  }

  .margin-notes {
    order: 2;
  }
}

@media (max-width: 560px) {
  .home-hero__stage {
    padding-right: 48px;
  }

  .paper--hero {
    min-height: 0;
    padding-bottom: 96px;
  }

  .paper__photo {
    float: none;
    width: 100%;
    margin: 0 0 16px;
  }

  .stages {
    gap: 4px;
  }

  .ledger {
    grid-template-columns: 1fr;
  }

  .ledger__col + .ledger__col {
    border-left: 0;
    border-top: 1px solid var(--stone);
  }

  .closing__inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .closing__plant {
    width: 96px;
  }

  .trust-line span {
    margin: 0 6px;
  }
}
