/* Unicorn website. Lilac daylight for the page, the app's night sky for anything magic, gold for stardust. */

:root {
  --lilac: #f3eefa;
  --paper: #ffffff;
  --night: #1c1035;
  --night-2: #2d1656;
  --violet: #7430a4;
  --violet-deep: #561f7e;
  --gold: #f2c14e;
  --mint: #8fe3cc;
  --ink: #1c1035;
  --muted: #5f5674;
  --line: #e1d7ef;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --reading: "Newsreader", Georgia, serif;
  --gutter: 24px;
}

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

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

body {
  margin: 0;
  background: var(--lilac);
  color: var(--ink);
  font: 400 18px/1.55 var(--display);
  font-variation-settings: "opsz" 16;
}

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

a {
  color: var(--violet);
  text-underline-offset: 3px;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.caption {
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* Header ---------------------------------------------------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: auto;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.top nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}

.top nav a:hover {
  color: var(--violet);
}

.top nav .pill {
  background: var(--ink);
  color: var(--lilac);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
}

.top nav .pill:hover {
  background: var(--violet);
  color: #fff;
}

/* Hero -------------------------------------------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 96px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
}

.hero h1 {
  font-size: clamp(52px, 7.4vw, 108px);
  line-height: 0.92;
  font-weight: 750;
  font-variation-settings: "opsz" 96, "wdth" 78;
  letter-spacing: -0.035em;
}

.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 34em;
  margin: 28px 0 32px;
}

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 520px;
}

.signup input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  padding: 15px 18px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}

.signup input[type="email"]:focus {
  border-color: var(--violet);
  outline: none;
}

.signup button {
  font: inherit;
  font-weight: 650;
  font-size: 17px;
  padding: 15px 24px;
  border: 0;
  border-radius: 16px;
  background: var(--violet);
  color: #fff;
  cursor: pointer;
}

.signup button:hover {
  background: var(--violet-deep);
}

.signup button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.platforms {
  display: flex;
  gap: 18px;
  flex-basis: 100%;
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}

.platforms label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.platforms input {
  accent-color: var(--violet);
}

.form-note {
  flex-basis: 100%;
  min-height: 1.4em;
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.form-note.ok {
  color: var(--violet);
  font-weight: 600;
}

.form-note.error {
  color: #b42318;
}

/* The night sky: the one place the page gets magical */

.sky {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 34px 30px 26px;
  color: #fff;
  background:
    radial-gradient(1.4px 1.4px at 12% 18%, #fff 60%, transparent 61%),
    radial-gradient(1.2px 1.2px at 78% 12%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 64% 34%, rgba(255, 255, 255, 0.8) 60%, transparent 61%),
    radial-gradient(1.6px 1.6px at 90% 58%, #fff 60%, transparent 61%),
    radial-gradient(1px 1px at 30% 86%, rgba(255, 255, 255, 0.7) 60%, transparent 61%),
    radial-gradient(1.2px 1.2px at 8% 64%, rgba(255, 255, 255, 0.8) 60%, transparent 61%),
    radial-gradient(1px 1px at 48% 8%, rgba(255, 255, 255, 0.7) 60%, transparent 61%),
    radial-gradient(120% 80% at 100% 0%, #3d1d73 0%, transparent 60%),
    linear-gradient(170deg, var(--night) 0%, var(--night-2) 100%);
  min-height: 520px;
}

.sky .glyph {
  position: absolute;
  width: 150px;
  right: -18px;
  bottom: -14px;
  opacity: 0.12;
}

.sky-kicker {
  color: var(--gold);
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 6px;
}

.sky h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  font-weight: 700;
  font-variation-settings: "opsz" 48, "wdth" 85;
  letter-spacing: -0.02em;
}

.sky .why-note {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.66);
  margin: 10px 0 22px;
}

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

.hunches li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}

.hunches .emoji {
  font-size: 22px;
  line-height: 1.3;
}

.hunches .text {
  font-size: 17px;
  line-height: 1.4;
}

.hunches .because {
  grid-column: 2;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.sky-credits {
  margin: 16px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

@media (prefers-reduced-motion: no-preference) {
  .hunches li {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hunches li:nth-child(2) { animation-delay: 140ms; }
  .hunches li:nth-child(3) { animation-delay: 280ms; }
  .hunches li:nth-child(4) { animation-delay: 420ms; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Sections ---------------------------------------------------------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
}

.feature.flip .copy {
  order: 2;
}

.feature h2,
.section-title {
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 0.98;
  font-weight: 720;
  font-variation-settings: "opsz" 72, "wdth" 82;
  letter-spacing: -0.03em;
}

.feature p {
  color: var(--muted);
  font-size: 19px;
  max-width: 30em;
}

.commands {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 30em;
}

.commands li {
  font-size: 17px;
  color: var(--muted);
}

.commands code {
  font-family: var(--display);
  font-weight: 650;
  color: var(--violet);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1px 7px;
  margin-right: 6px;
}

/* Rewrite demo */

.phone {
  background: var(--paper);
  border-radius: 30px;
  padding: 22px;
  border: 1px solid var(--line);
}

.bubble {
  max-width: 88%;
  padding: 13px 16px;
  border-radius: 22px;
  font-size: 17px;
  line-height: 1.45;
}

.bubble.mine {
  margin-left: auto;
  background: #ece6f6;
  color: var(--muted);
  border-bottom-right-radius: 6px;
}

.bubble.fixed {
  margin-left: auto;
  margin-top: 12px;
  background: var(--violet);
  color: #fff;
  border-bottom-right-radius: 6px;
  min-height: 3.2em;
}

.tones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tones button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--lilac);
  color: var(--ink);
  cursor: pointer;
}

.tones button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Rings */

.rings-card {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 30px;
}

.rings {
  position: relative;
  width: clamp(120px, 15vw, 190px);
  aspect-ratio: 1;
  flex: none;
}

.ring {
  position: absolute;
  border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 15px));
}

.ring.a { inset: 0; background: conic-gradient(var(--violet) 0 78%, #ece6f6 78% 100%); }
.ring.b { inset: 20px; background: conic-gradient(var(--gold) 0 57%, #f7efd9 57% 100%); }
.ring.c { inset: 40px; background: conic-gradient(#2bb39a 0 64%, #dcf3ed 64% 100%); }

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

.legend li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  font-size: 16px;
  white-space: nowrap;
}

.legend li.caption {
  white-space: normal;
}

.legend b {
  color: var(--ink);
  font-size: 28px;
  font-weight: 720;
  font-variation-settings: "opsz" 48;
  min-width: 1.6em;
}

.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  align-self: center;
}

/* Blurred peek */

.peek {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px;
}

.peek h3 {
  font-size: 22px;
  font-weight: 700;
}

.peek ol {
  margin: 18px 0;
  padding-left: 1.4em;
  display: grid;
  gap: 12px;
  font-size: 18px;
}

.peek ol li::marker {
  color: var(--violet);
  font-weight: 700;
}

.peek .blur {
  filter: blur(6px);
  user-select: none;
}

.peek .unlock {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 15px;
}

/* Unicorn cards that grow */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  margin: 0;
  min-width: 0;
  border-radius: 24px;
  padding: 16px 14px;
  gap: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card.one { background: linear-gradient(140deg, #12c2e9, #7f53ac); }
.card.two { background: linear-gradient(140deg, #fc5c7d, #6a82fb); }
.card.three {
  background: linear-gradient(140deg, #8e2de2, #4a00e0);
  box-shadow: inset 0 0 0 4px var(--gold);
}

.card .num {
  font-size: 13px;
  opacity: 0.85;
  text-align: right;
}

.card svg {
  flex: none;
  width: 100%;
  height: auto;
}

.card .name {
  font-weight: 700;
  font-size: clamp(14px, 1.5vw, 17px);
  line-height: 1.15;
  font-variation-settings: "opsz" 24;
}

.card .level {
  font-size: 13px;
  opacity: 0.85;
}

/* Promises */

.promises {
  padding-top: 88px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
}

.promise-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 64px;
  margin-top: 44px;
}

.promise-list h3 {
  font-size: 24px;
  font-weight: 700;
  font-variation-settings: "opsz" 32;
  letter-spacing: -0.01em;
}

.promise-list p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 30em;
}

/* Blog list */

.reads {
  padding-top: 88px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
}

.read-list {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.read-list a {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.read-list .art {
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  font-size: 46px;
}

.read-list h3 {
  font-size: 23px;
  line-height: 1.15;
  font-weight: 700;
  font-variation-settings: "opsz" 32;
}

.read-list a:hover h3 {
  color: var(--violet);
}

.read-list p {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 16px;
}

.art.a { background: linear-gradient(160deg, var(--night), var(--night-2)); }
.art.b { background: #e5dcf5; }
.art.c { background: #fbefcc; }

/* Closing call to action */

.closer {
  margin: 0 var(--gutter) 24px;
  border-radius: 40px;
  background: linear-gradient(170deg, var(--night), var(--night-2));
  color: #fff;
  padding: 88px var(--gutter);
  text-align: center;
}

.closer h2 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 0.96;
  font-weight: 750;
  font-variation-settings: "opsz" 96, "wdth" 80;
  letter-spacing: -0.035em;
  max-width: 13em;
  margin: 0 auto;
}

.closer p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 19px;
  margin: 20px auto 30px;
  max-width: 30em;
}

.closer .signup {
  margin: 0 auto;
  justify-content: center;
}

.closer .platforms,
.closer .form-note {
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.closer .form-note.ok {
  color: var(--gold);
}

.closer .signup button {
  background: var(--gold);
  color: var(--night);
}

.closer .signup button:hover {
  background: #f6d27c;
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 15px;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a {
  color: var(--muted);
}

/* Articles ---------------------------------------------------------------------------------------------------------- */

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) 96px;
}

.article .meta {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 16px;
}

.article h1 {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1;
  font-weight: 740;
  font-variation-settings: "opsz" 72, "wdth" 82;
  letter-spacing: -0.03em;
}

.article .standfirst {
  font-family: var(--reading);
  font-size: 24px;
  line-height: 1.45;
  color: var(--muted);
  margin: 22px 0 40px;
}

.prose {
  font-family: var(--reading);
  font-size: 20px;
  line-height: 1.7;
  font-variation-settings: "opsz" 18;
}

.prose h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  font-variation-settings: "opsz" 36, "wdth" 88;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 22px;
}

.prose li {
  margin-bottom: 10px;
}

.prose blockquote {
  margin: 32px 0;
  padding: 22px 26px;
  border-radius: 22px;
  background: linear-gradient(170deg, var(--night), var(--night-2));
  color: #fff;
  font-size: 21px;
}

.prose blockquote p {
  margin: 0;
}

.prose blockquote small {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}

.prose code {
  font-family: var(--display);
  font-size: 0.9em;
  font-weight: 650;
  color: var(--violet);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 1px 6px;
}

.back {
  display: inline-block;
  margin-top: 24px;
  font-weight: 600;
}

/* Small screens ----------------------------------------------------------------------------------------------------- */

@media (max-width: 920px) {
  .hero,
  .feature {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .feature.flip .copy {
    order: 0;
  }
  .read-list {
    grid-template-columns: 1fr;
  }
  .sky {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }
  body {
    font-size: 17px;
  }
  .top nav a:not(.pill) {
    display: none;
  }
  .hero {
    padding-top: 16px;
    padding-bottom: 64px;
  }
  .lede {
    font-size: 19px;
  }
  .sky {
    padding: 26px 18px 20px;
    border-radius: 28px;
  }
  .rings-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .promise-list {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cards {
    gap: 8px;
  }
  .card {
    padding: 10px;
    border-radius: 16px;
  }
  .card .name {
    font-size: 13px;
  }
  .card .level,
  .card .num {
    font-size: 11px;
  }
  .feature,
  .promises,
  .reads {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .closer {
    border-radius: 28px;
    padding: 64px 20px;
    margin: 0 8px 16px;
  }
  .prose {
    font-size: 19px;
  }
}
