/* about.html: the "Learn more" page. Structure follows superlogical.com/rex:
   a full-height masthead of three cards, a nav that drops in once you scroll,
   then a column of cards 6px apart, a closing call to action, and the bar.
   Loaded after styles.css, which holds the colours, type and the bar. */

.product {
  --gap: 6px;
  --inset: 65px;
  --pane-radius: 14px;
  --card-h: calc(100svh - 2 * var(--gap));
  --soft: color-mix(in oklab, var(--ink) 58%, var(--bg));
  --statement: clamp(1.6rem, 1.05rem + 1.7vw, 2.5rem);
}

/* On body, not html: a font size on html would change what a rem is. */
.product body {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.product main {
  padding: var(--gap) var(--gap) 0;
}

.product main > * {
  margin-bottom: var(--gap);
}

.pane {
  position: relative;
  isolation: isolate;
  min-width: 0;
  border-radius: var(--pane-radius);
  background: var(--panel);
  overflow: clip;
}

.pane-dark {
  background: #07080a;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  white-space: nowrap;
  transition: opacity 0.15s, background-color 0.15s;
}

.btn:hover {
  opacity: 0.82;
}

.btn.large {
  padding: 0.8rem 1.4rem;
  font-size: var(--text-base);
}

.btn.secondary {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.btn.secondary:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}

/* ---------- placeholder art ---------- */

/* Stands in for a screenshot, film or render. */
.ph {
  display: grid;
  place-items: center;
  min-height: 12rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 16%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px,
    color-mix(in srgb, var(--bg) 70%, transparent);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
  text-align: center;
}

.ph-window {
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.45);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(6px);
}

.icon {
  display: block;
  width: 3rem;
  height: 3rem;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- nav: hidden over the masthead, drops in once you scroll ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem calc(var(--gap) + var(--inset));
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9375rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s 0.3s;
}

.site-nav.shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.brand svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--ink);
}

.site-nav .links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav .links a:not(.btn):hover {
  color: var(--soft);
}

.arrow {
  margin-left: 0.2em;
  font-size: 0.8em;
}

/* ---------- masthead ---------- */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr) minmax(0, 0.62fr);
  gap: var(--gap);
  min-height: max(36rem, var(--card-h));
}

.pitch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 4rem var(--inset) var(--inset);
  --display: clamp(1.9rem, 0.7rem + 1.6vw, 3.5rem);
}

.pitch .mark {
  position: static;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 15px;
}

.pitch h1 {
  max-width: 12.5em;
  margin: calc(var(--display) * 0.85) 0 0;
  font-size: var(--display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.pitch h1 span {
  display: block;
  color: var(--soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: calc(var(--display) * 0.75);
}

.platforms {
  display: flex;
  gap: 1.1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  width: 1.25rem;
  height: 1.25rem;
  border: 1.5px solid var(--ink-soft);
  border-radius: 5px;
}

.hero-art {
  display: grid;
  place-items: center;
  padding: 3rem 0 3rem 10%;
}

.hero-art .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px 0 0 12px;
  border-right: 0;
}

.hero-phone {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.hero-phone .ph {
  width: min(68%, 17rem);
  aspect-ratio: 9 / 19;
  border-radius: 2.25rem;
}

/* ---------- copy blocks: a white sentence that runs on in grey ---------- */

.lead {
  max-width: 30em;
  color: var(--soft);
  text-wrap: pretty;
}

.lead h2 {
  display: inline;
  margin: 0;
  font: inherit;
  color: var(--ink);
}

.lead p {
  display: inline;
  margin: 0;
}

.lead p.coda {
  display: block;
  margin-top: 1.1rem;
}

.lead.stacked h2,
.lead.stacked p {
  display: block;
}

.lead.stacked p {
  margin-top: 1.1rem;
}

.lead a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  max-width: 36rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--soft);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.005em;
}

.parts .icon {
  margin-bottom: 1.5rem;
}

.parts h3 {
  margin: 0;
  font: inherit;
  color: var(--ink);
}

.parts p {
  margin: 0.25rem 0 0;
}

/* ---------- intro card: copy over a wide film ---------- */

.intro {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: var(--card-h);
}

.intro-text {
  padding: var(--inset) var(--inset) clamp(3rem, 6vw, 5rem);
}

.intro-film {
  display: grid;
  min-height: clamp(24rem, 60vw, 34rem);
  padding: 0 var(--inset) var(--inset);
}

/* ---------- rows of two cards ---------- */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap);
}

.story-art {
  display: grid;
  min-height: var(--card-h);
  padding: var(--inset);
}

.story-copy {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--inset);
}

.fine {
  align-self: end;
  max-width: 30rem;
  margin: 3rem 0 0;
  color: color-mix(in oklab, var(--ink) 50%, var(--bg));
  font-size: 13px;
  line-height: 22px;
  letter-spacing: -0.003em;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px 0 6px;
  border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  border-radius: 999px;
  color: var(--ink);
  line-height: 1;
  vertical-align: 1px;
  transition: border-color 0.15s, background-color 0.15s;
}

.pill-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.pill-link:hover {
  border-color: color-mix(in oklab, var(--ink) 45%, transparent);
  background: color-mix(in oklab, var(--ink) 4%, transparent);
}

.pair {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 2.5rem;
}

.pair-art {
  display: grid;
  min-height: 26rem;
  padding: var(--inset) var(--inset) 0;
}

.pair-copy {
  max-width: calc(46ch + 2 * var(--inset));
  padding: 0 var(--inset) var(--inset);
}

.picker {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.picker ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.picker li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

.picker li.on {
  background: var(--ink);
  color: var(--bg);
}

.picker .outline li {
  background: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent) inset;
}

/* ---------- the card you can drive: steps on the left, a window on the right ---------- */

.drive {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 12vw, 11rem) var(--inset);
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1.5px) 0 0 / 24px 24px,
    var(--panel);
  background-clip: padding-box;
}

.drive::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to right, var(--panel) 40%, transparent 75%);
}

.statement {
  max-width: 14em;
  margin: 0;
  font-size: var(--statement);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.steps {
  max-width: 28rem;
  margin: 2.5rem 0 0;
}

.steps details {
  color: var(--soft);
}

.steps details[open] {
  color: var(--ink);
}

.steps summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  cursor: pointer;
  list-style: none;
}

.steps summary::-webkit-details-marker {
  display: none;
}

.steps summary::before {
  content: "";
  flex: none;
  width: 0.4em;
  height: 0.4em;
  margin: 0 0.25em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}

.steps details[open] summary::before {
  transform: rotate(45deg) translate(-0.1em, -0.1em);
}

.steps summary:hover {
  color: var(--ink);
}

.steps pre {
  margin: 0.4rem 0 0.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
  overflow-x: auto;
}

.steps pre .prompt {
  color: var(--ink-soft);
}

.steps pre .hl {
  color: var(--accent);
}

.drive .after {
  max-width: 24em;
  margin: 2rem 0 0;
  color: var(--soft);
}

.drive .ph {
  min-height: clamp(20rem, 42vw, 36rem);
}

/* ---------- wide picture card with copy on top ---------- */

.wide {
  height: max(min((100vw - 2 * var(--gap)) * 10 / 16, var(--card-h)), 42rem);
  padding: clamp(3rem, 7vw, 6rem) var(--inset);
}

.wide .wallpaper {
  background:
    radial-gradient(45% 60% at 100% 35%, rgb(94 225 194 / 0.5), transparent 75%),
    radial-gradient(40% 50% at 70% 100%, rgb(26 136 112 / 0.7), transparent 75%),
    linear-gradient(100deg, #0d1114 35%, #0c2a25 100%);
}

/* ---------- grid of small features ---------- */

.features {
  padding: clamp(3rem, 6vw, 5.5rem) var(--inset);
}

.feature-grid {
  --across: 4;
  --col-gap: clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(3.5rem, 7vw, 6.5rem) var(--col-gap);
  max-width: 76rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  font-size: calc(var(--text-base) * 0.9);
  line-height: 1.3;
}

.feature-grid li {
  flex: 0 0 calc((100% - (var(--across) - 1) * var(--col-gap)) / var(--across));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-grid .icon {
  margin-bottom: 0.75rem;
}

.feature-grid p {
  max-width: 15em;
  margin: 0;
  color: color-mix(in oklab, var(--ink) 50%, var(--bg));
  text-wrap: balance;
}

/* ---------- closing call to action ---------- */

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(3rem, 7vw, 5.5rem) calc(var(--gap) + var(--inset));
}

.closing .mark {
  position: static;
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line) inset;
}

.closing h2 {
  flex: 1;
  margin: 0;
  font-size: var(--statement);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.closing .cta-row {
  margin: 0;
}

.product .bar {
  margin-top: clamp(1rem, 3vw, 2.5rem);
  padding: 0 calc(var(--gap) + var(--inset)) 2.5rem;
}

/* ---------- smaller screens ---------- */

@media (width < 64rem) {
  .product {
    --inset: 1.5rem;
  }

  .site-nav .links a:not(.btn) {
    display: none;
  }

  .masthead {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .pitch {
    min-height: 26rem;
    padding-top: 3rem;
  }

  .hero-art {
    min-height: 22rem;
  }

  .hero-phone {
    display: none;
  }

  .cards,
  .drive {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-art {
    min-height: calc(var(--card-h) / 2);
  }

  .intro {
    min-height: 0;
  }

  .wide {
    height: auto;
    min-height: 36rem;
  }

  .feature-grid {
    --across: 2;
  }
}

@media (width < 40rem) {
  .parts {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    --col-gap: 1rem;
    row-gap: 2.5rem;
    font-size: calc(var(--text-base) * 0.84);
  }

  .feature-grid .icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .picker {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- square-corner variant (?square) ---------- */

.square .pane,
.square .btn,
.square .ph,
.square .pill-link,
.square .picker li,
.square .platforms li,
.square .steps pre {
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .btn,
  .pill-link {
    transition: none;
  }
}
