/* Existential Intelligence, LLC — company site.
   Colors and type follow platform/design-system/src/styles.css.
   No gradients, no web fonts, no scripts. */
:root {
  --paper: #fbf6ef;
  --ink: #2e2622;
  --soft: #6f6057;
  --rose: #c9756b;
  --rose-text: #a3524a;
  --sage: #8fa68e;
  --sand: #eadbc8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

h2.label {
  font-family: var(--sans);
}

main {
  flex: 1;
}

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

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Small caps, the wordmark's voice. */
.open dt,
.shots span,
summary,
.label,
.nav a,
.foot nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

/* The map's dot: a color on a paper ring. */
.dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--sand);
}

.dot--sage {
  background: var(--sage);
}

/* Home */
.home {
  padding: 96px 0 72px;
}

.home h1 {
  margin: 0 0 72px;
}

.home h1 img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
}

.label,
summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.say {
  margin: 20px 0 0;
  max-width: 26em;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}

.how {
  margin: 12px 0 0;
  max-width: 34em;
  color: var(--soft);
}

/* Screenshots: three phones in a row; a sideways swipe when they don't fit. */
.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  border-radius: 22px;
}

/* Two exports on one tile the size of a phone screen, one over the other. */
.pair {
  position: relative;
  aspect-ratio: 750 / 1624;
  background: var(--sand);
  border: 1px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
}

.shots .pair img {
  position: absolute;
  width: 68%;
  border-radius: 6px;
}

.pair img:first-child {
  top: 7%;
  left: 8%;
}

.pair img:last-child {
  bottom: 7%;
  right: 8%;
}

.shots span {
  display: block;
  margin-top: 12px;
}

/* One export at full size. */
.card {
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  gap: 40px;
  align-items: start;
  margin: 72px 0 0;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
  border-radius: 6px;
}

.card--phone {
  grid-template-columns: minmax(0, 320px) 1fr;
}

.card--phone img {
  border-radius: 22px;
}

.card figcaption {
  padding-top: 8px;
}

/* Rows that open on a click. */
.rows {
  margin-top: 72px;
  border-top: 1px solid var(--ink);
}

details {
  border-bottom: 1px solid var(--sand);
}

details:last-child {
  border-bottom-color: var(--ink);
}

summary {
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}

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

summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
}

details[open] summary::after {
  content: "\2212";
}

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

summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.open {
  padding: 0 0 32px 20px;
}

.open .say {
  margin-top: 0;
}

.open .say a {
  color: var(--ink);
  text-decoration-color: var(--rose);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.open dl {
  margin: 20px 0 0;
  max-width: 34em;
}

.open dl div {
  display: grid;
  grid-template-columns: 13em 1fr;
  gap: 2px 24px;
  padding: 12px 0;
  border-top: 1px solid var(--sand);
}

.open dd {
  margin: 0;
}

/* Footer */
.foot {
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--soft);
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.foot p {
  margin: 0;
}

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

.foot nav a {
  text-decoration: none;
}

.foot nav a:hover,
.nav a:hover {
  color: var(--ink);
}

/* Terms and privacy */
.top {
  border-bottom: 1px solid var(--sand);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.top img {
  display: block;
  height: 36px;
  width: auto;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  text-decoration: none;
  padding: 12px 0;
}

.prose {
  padding: 64px 0 72px;
}

.prose .wrap {
  max-width: 720px;
}

.prose h1 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.15;
}

.prose h2 {
  margin: 40px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
}

.prose p,
.prose li {
  margin: 12px 0 0;
}

.prose ul {
  margin: 0;
  padding-left: 20px;
}

.prose .date {
  color: var(--soft);
  font-size: 15px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .home {
    padding: 56px 0 48px;
  }

  .home h1 {
    margin-bottom: 48px;
  }

  .say {
    font-size: 21px;
  }

  .shots {
    grid-template-columns: repeat(4, 72%);
    gap: 14px;
    margin-right: -16px;
    padding-right: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .shots li {
    scroll-snap-align: start;
  }

  .card,
  .card--phone {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 48px;
  }

  .rows {
    margin-top: 48px;
  }

  .open {
    padding-left: 0;
  }

  .open dl div {
    grid-template-columns: 1fr;
  }
}
