/* The home page. Builds on styles.css (palette, type, header, buttons).
   The drawings are plain boxes: no pictures to load, and they follow the
   reader's light or dark setting like everything else. */

:root {
  --flag: #ffd34d;
  --packet: #dc3f2f;
  --packet-deep: #b92f22;
  --gold: #ffe9a8;
  --shadow: 0 24px 60px -28px rgba(8, 60, 44, 0.45);
  --frame: #16231f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --frame: #33473f;
  }
}

.home {
  max-width: 1120px;
}

/* Icons: one outline family, as in the apps. */
.ico {
  display: inline-flex;
  flex: none;
  width: 18px;
  height: 18px;
}
.ico svg,
.tile svg,
.ask em svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico.big {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--primary);
}

/* ---------- Hero ---------- */
.home .hero {
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  padding: 48px 0 88px;
}
.home h1 {
  font-size: clamp(36px, 5.6vw, 62px);
  text-wrap: balance;
}
.home .lead {
  text-wrap: pretty;
}
.button.quiet {
  background: var(--tint);
  color: var(--primary);
}
.button.quiet:hover {
  background: var(--bubble-out);
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  border-radius: 44px;
  background:
    radial-gradient(120% 90% at 85% 8%, rgba(255, 211, 77, 0.38), transparent 55%),
    radial-gradient(110% 80% at 8% 96%, rgba(8, 127, 91, 0.22), transparent 60%),
    var(--tint);
  overflow: hidden;
}

/* The phone: a frame, a chat, a bar to type in. */
.phone {
  display: flex;
  flex-direction: column;
  width: min(300px, 78%);
  aspect-ratio: 9 / 17.6;
  padding: 10px;
  border-radius: 40px;
  background: var(--frame);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}
.phone > * {
  background: var(--ground);
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  border-radius: 30px 30px 0 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
}
.phone-top .ico {
  width: 14px;
  height: 14px;
  margin-inline-start: -4px;
  color: var(--primary);
}
.msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 12px;
  overflow: hidden;
}
.m {
  max-width: 78%;
  margin: 0;
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.35;
}
.m.in {
  align-self: flex-start;
  border-end-start-radius: 6px;
  background: var(--surface);
}
.m.out {
  align-self: flex-end;
  border-end-end-radius: 6px;
  background: var(--bubble-out);
}
.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}
.voice .ico svg {
  fill: currentColor;
  stroke: none;
}
.voice small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wave {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 22px;
}
.wave i {
  width: 3px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.75;
}
.wave i:nth-child(4n + 1) { height: 35%; }
.wave i:nth-child(4n + 2) { height: 90%; }
.wave i:nth-child(4n + 3) { height: 55%; }
.wave i:nth-child(4n + 4) { height: 70%; }
.wave i:nth-child(n + 8) { opacity: 0.3; }

/* A payment made in the chat, and a red packet. Used in the phone and again below. */
.pay {
  position: relative;
  display: grid;
  gap: 1px;
  min-width: 150px;
  padding: 11px 14px;
  border-radius: 18px;
  background: var(--money);
  color: var(--money-ink);
}
.m.pay {
  background: var(--money);
}
.pay small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}
.pay b {
  font-size: 22px;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.pay .ico {
  position: absolute;
  inset-inline-end: 12px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
}
.packet {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--packet), var(--packet-deep));
  color: #fff;
}
.m.packet {
  background: linear-gradient(160deg, var(--packet), var(--packet-deep));
}
.packet span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 18px;
}
.packet b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 14px;
  border-radius: 0 0 30px 30px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.phone-bar span {
  flex: 1;
  height: 34px;
  border-radius: 17px;
  background: var(--ground);
}
.phone-bar .ico:last-child {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
}

/* People. Two soft colours each, split on the diagonal, as in the apps. */
.av {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #1f2d2a;
  font-size: 13px;
  font-weight: 700;
}
.a1 { background: linear-gradient(135deg, #bfebd3 50%, #ffe9a8 50%); }
.a2 { background: linear-gradient(135deg, #a9e3f0 50%, #d8f5e7 50%); }
.a3 { background: linear-gradient(135deg, #ffd7c2 50%, #fff1b8 50%); }
.a4 { background: linear-gradient(135deg, #cfe0ff 50%, #bfebd3 50%); }
.a5 { background: linear-gradient(135deg, #ffe1ec 50%, #d8f5e7 50%); }
.a6 { background: linear-gradient(135deg, #e3dbff 50%, #ffe9a8 50%); }

/* ---------- Features ---------- */
.home h2 {
  max-width: 20em;
  text-wrap: balance;
}
.features {
  display: grid;
  gap: 20px;
}
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 28px;
  border-radius: 32px;
  background: var(--surface);
}
.feature:nth-child(even) .feature-text {
  order: 2;
}
.feature h3 {
  margin-bottom: 10px;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.4px;
}
.feature p {
  font-size: 17px;
  text-wrap: pretty;
}
.art {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 230px;
  padding: 24px;
  border-radius: 24px;
  background: var(--tint);
}

/* Chat: rows of conversations. The grey bars stand for names and messages. */
.list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--surface);
}
.list p,
.ask p {
  flex: 1;
  display: grid;
  gap: 7px;
  margin: 0;
}
.list p b,
.list p i,
.ask p b,
.ask p i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}
.list p b,
.ask p b {
  width: 42%;
  background: var(--muted);
  opacity: 0.55;
}
.list p i,
.ask p i {
  width: 78%;
}
.list em {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 11px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

/* Voice: six seats; a ring around whoever is speaking. */
.room {
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 22px 30px;
}
.room .av {
  width: 58px;
  height: 58px;
  font-size: 18px;
  opacity: 0.6;
}
.room .av.on {
  opacity: 1;
  box-shadow: 0 0 0 4px var(--tint), 0 0 0 7px var(--primary);
}

/* Wallet: an address, a balance, the networks. */
.wallet {
  justify-items: start;
}
.wallet small {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}
.wallet b {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.wallet p,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
}
.wallet span {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

/* Money in chats. */
.money {
  justify-items: start;
}
.money .pay,
.money .packet {
  min-width: 210px;
}
.money .packet {
  justify-self: end;
  margin-top: -4px;
}

/* web3: where you are, and what is being asked of you. */
.web3 .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}
.web3 .bar .ico {
  width: 14px;
  height: 14px;
  color: var(--primary);
}
.ask {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface);
  color: var(--primary);
}
.ask em {
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
}

/* ---------- Security ---------- */
.band.tinted {
  padding: 64px 32px;
}
.band.tinted article {
  display: grid;
  gap: 4px;
  align-content: start;
}
.band.tinted .ico.big {
  margin-bottom: 10px;
  background: var(--ground);
}

/* ---------- Getting it ---------- */
.band-lead {
  max-width: 38em;
  margin: -12px 0 28px;
  color: var(--muted);
  text-wrap: pretty;
}
.get {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 24px;
  border: 1.5px solid transparent;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
a.tile:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.tile .ico.big {
  margin-bottom: 12px;
}
.tile b {
  font-size: 18px;
}
.tile span {
  color: var(--muted);
  font-size: 14px;
}
.tile.off {
  background: transparent;
  border-color: var(--line);
  border-style: dashed;
}
.tile.off .ico.big {
  background: var(--ground);
  color: var(--muted);
}

/* ---------- Languages ---------- */
.langs {
  padding-top: 8px;
}
.chips a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.chips a:hover {
  background: var(--tint);
}
.chips a.more {
  background: var(--tint);
  color: var(--primary);
}

/* ---------- Footer ---------- */
footer {
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1120px;
}
footer .brand {
  font-size: 19px;
}
footer nav a {
  font-size: 14px;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .home .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0 56px;
  }
  .stage {
    min-height: 500px;
    border-radius: 32px;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    border-radius: 26px;
  }
  .feature:nth-child(even) .feature-text {
    order: 0;
  }
  .art {
    min-height: 190px;
    padding: 18px;
  }
  .get {
    grid-template-columns: 1fr;
  }
  .band.tinted {
    padding: 44px 20px;
  }
  .home .grid {
    grid-template-columns: 1fr;
  }
}

/* A little life, for those who have not asked for stillness. */
@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: settle 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .msgs > * {
    animation: arrive 0.5s ease-out both;
  }
  .msgs > :nth-child(1) { animation-delay: 0.35s; }
  .msgs > :nth-child(2) { animation-delay: 0.6s; }
  .msgs > :nth-child(3) { animation-delay: 0.85s; }
  .msgs > :nth-child(4) { animation-delay: 1.15s; }
  .msgs > :nth-child(5) { animation-delay: 1.45s; }
  @keyframes settle {
    from { opacity: 0; transform: rotate(-7deg) translateY(28px); }
  }
  @keyframes arrive {
    from { opacity: 0; transform: translateY(10px); }
  }
}
