/* Kin's website. One stylesheet, no scripts. The look follows the app:
   near-black page, slightly lighter surfaces, one warm accent used sparingly,
   rounded headings, large corners, full-pill buttons. */

:root {
  --bg: #0e0e11;
  --surface: #17171c;
  --raised: #1f1f26;
  --text: #f6f5f8;
  --text-2: #b4b2bf;
  --text-3: #8f8d9c;
  --accent-a: #ff8a5b;
  --accent-b: #ff4d8d;
  --accent: #ff6b74;
  --ink: #1a0b10;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --radius: 24px;
  --radius-sm: 16px;
  --page: 1120px;
  --gutter: 20px;
  --rounded: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--rounded);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(14, 14, 17, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
}

.brand svg {
  width: 32px;
  height: 32px;
}

.links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.links a:hover,
.links a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Buttons and small pieces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 12px 28px;
  border-radius: 999px;
  font-family: var(--rounded);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  box-shadow: 0 8px 26px rgba(255, 77, 141, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn-glass {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  font-family: var(--rounded);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero {
  position: relative;
  padding: 56px 0 48px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 620px;
  background:
    radial-gradient(520px 380px at 78% 30%, rgba(255, 77, 141, 0.28), transparent 70%),
    radial-gradient(460px 340px at 62% 12%, rgba(255, 138, 91, 0.22), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 40px;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 4.9vw, 60px);
}

/* The headline always breaks at the comma: one thought per line. The
   padding keeps the tails of the letters inside the painted area. */
.hero h1 .gradient-text {
  display: block;
  padding-bottom: 0.08em;
}

.lede {
  margin-top: 18px;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 20px);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.fine {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 14px;
}

/* Three portraits fanned out like cards held in a hand, as in the app. */
.fan {
  position: relative;
  height: clamp(320px, 36vw, 440px);
}

.fan img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: var(--radius);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), inset 0 0 0 1px var(--hairline-strong);
}

.fan .left {
  width: 39%;
  transform: translate(-128%, -44%) rotate(-9deg);
}

.fan .right {
  width: 39%;
  transform: translate(28%, -44%) rotate(9deg);
}

.fan .middle {
  transform: translate(-50%, -50%);
}

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

.section {
  padding: 72px 0;
  scroll-margin-top: 24px;
}

.section-head {
  max-width: 40em;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
}

.section-head p {
  margin-top: 12px;
  color: var(--text-2);
}

/* ---------- Characters ---------- */

.people {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.person {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  aspect-ratio: 3 / 4.4;
}

.person img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
}

.person .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 56px 14px 14px;
  background: linear-gradient(to bottom, rgba(14, 14, 17, 0), rgba(14, 14, 17, 0.82) 46%, rgba(14, 14, 17, 0.96));
}

.person h3 {
  font-size: 20px;
}

.person .age {
  margin-left: 4px;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
}

.person p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.card .icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: 21px;
}

.card p {
  margin-top: 8px;
  color: var(--text-2);
}

/* ---------- Screens ---------- */

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.screen {
  margin: 0;
}

.screen img {
  width: 100%;
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--hairline-strong), 0 0 0 7px #121216;
}

.screen figcaption {
  margin-top: 20px;
  text-align: center;
}

.screen strong {
  display: block;
  font-family: var(--rounded);
  font-size: 18px;
}

.screen span {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 15px;
}

/* ---------- Safe and transparent ---------- */

.safe {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  padding: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 138, 91, 0.1), rgba(255, 77, 141, 0.07)), var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.safe h2 {
  font-size: clamp(26px, 3.2vw, 36px);
}

.safe > div > p {
  margin-top: 12px;
  color: var(--text-2);
}

.safe .btn {
  margin-top: 22px;
  min-height: 48px;
  padding: 10px 22px;
  font-size: 16px;
}

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

.ticks li {
  position: relative;
  padding-left: 34px;
  color: var(--text-2);
}

.ticks li strong {
  color: var(--text);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.2 11.4l3.1 3.1 6.5-6.9' fill='none' stroke='%231a0b10' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat,
    linear-gradient(135deg, var(--accent-a), var(--accent-b));
}

.closing {
  padding: 24px 0 88px;
  text-align: center;
}

.closing p {
  max-width: 30em;
  margin: 0 auto;
  color: var(--text-2);
  font-size: 19px;
}

.closing .cta {
  justify-content: center;
}

/* ---------- Footer ---------- */

.foot {
  border-top: 1px solid var(--hairline);
  padding: 36px 0 48px;
  color: var(--text-3);
  font-size: 14px;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 999px;
}

.foot a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.foot .about {
  max-width: 30em;
}

.foot .about p + p {
  margin-top: 8px;
}

/* ---------- Policy and help pages ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--gutter) 88px;
}

.doc h1 {
  font-size: clamp(34px, 5vw, 48px);
}

.doc .updated {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 15px;
}

.doc .intro {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 19px;
}

.doc h2 {
  margin-top: 44px;
  font-size: 26px;
  scroll-margin-top: 84px;
}

.doc h3 {
  margin-top: 26px;
  font-size: 19px;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 14px;
  color: var(--text-2);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 8px;
}

.doc strong {
  color: var(--text);
  font-weight: 600;
}

.doc a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.box {
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.box h2,
.box h3 {
  margin-top: 0;
  font-size: 19px;
}

.box.warm {
  background: linear-gradient(135deg, rgba(255, 138, 91, 0.12), rgba(255, 77, 141, 0.08)), var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.toc {
  columns: 2;
  column-gap: 28px;
  list-style: none;
  padding-left: 0;
}

.toc li {
  break-inside: avoid;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  position: relative;
  padding-left: 40px;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
  color: var(--text);
  font-family: var(--rounded);
  font-size: 14px;
  font-weight: 700;
}

details {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  position: relative;
  color: var(--text);
  font-weight: 600;
}

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

summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-family: var(--rounded);
  font-size: 24px;
  line-height: 1;
}

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

details > div {
  padding: 0 20px 20px;
}

details > div > :first-child {
  margin-top: 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact .btn {
  min-height: 48px;
  padding: 10px 22px;
  font-size: 16px;
  text-decoration: none;
}

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px var(--gutter);
}

.notfound p {
  margin-top: 12px;
  color: var(--text-2);
}

.notfound .cta {
  justify-content: center;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 980px) {
  .people {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero {
    padding: 36px 0 48px;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fan {
    order: -1;
    width: 92%;
    max-width: 420px;
    margin: 0 auto;
    height: clamp(270px, 74vw, 420px);
  }

  .hero::before {
    background:
      radial-gradient(360px 300px at 50% 26%, rgba(255, 77, 141, 0.28), transparent 70%),
      radial-gradient(320px 260px at 40% 12%, rgba(255, 138, 91, 0.22), transparent 70%);
  }

  .section {
    padding: 52px 0;
  }

  .features,
  .safe {
    grid-template-columns: 1fr;
  }

  .safe {
    padding: 26px;
  }

  .screens {
    display: flex;
    gap: 18px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter) 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  }

  .screen {
    flex: 0 0 min(72%, 300px);
    scroll-snap-align: center;
  }

  .toc {
    columns: 1;
  }
}

@media (max-width: 620px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  :root {
    --gutter: 16px;
  }

  /* The logo is the way home here, so the bar keeps the four pages. */
  .links .optional {
    display: none;
  }

  .bar .wrap {
    gap: 8px;
    min-height: 56px;
  }

  .brand {
    gap: 8px;
    font-size: 20px;
  }

  .brand svg {
    width: 28px;
    height: 28px;
  }

  .links {
    gap: 0;
  }

  .links a {
    padding: 0 7px;
    font-size: 14px;
  }

  .foot nav {
    width: 100%;
  }

  .foot ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }

  .foot a {
    padding: 0;
  }

  /* Sized so that "Someone to talk to," always fits on one line. */
  .hero h1 {
    font-size: clamp(28px, calc(10.4vw - 4px), 44px);
  }

  .cta .btn {
    width: 100%;
    padding: 12px 16px;
  }

  .contact .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  /* The mark alone on the narrowest phones; the link still reads "Kin, home". */
  .brand span {
    display: none;
  }

  .person .caption {
    padding: 48px 10px 12px;
  }

  .person h3 {
    font-size: 18px;
  }

  .person p {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .bar,
  .foot,
  .hero::before {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .doc p,
  .doc ul,
  .doc ol,
  .doc strong {
    color: #000;
  }
}
