/*
 * Softly website.
 * Alternating night and paper bands; colours come from the app (src/global.css):
 * night is the "Quiet Night" background, blush is the app accent.
 * One deliberate look, so there is no dark-mode variant.
 */

:root {
  --night: #12161e;
  --night-2: #1d232e;
  --night-line: #2b3240;
  --paper: #fbf8f5;
  --white: #ffffff;
  --ink: #14181f;
  --grey: #7c828d;
  --body: #4f5663;
  --line: #e7dfd9;
  --blush: #ecafa8;
  --blush-soft: #f5e5dc;
  --link: #9e4c45;
  --on-night: #f6f2ee;
  --on-night-muted: #9aa0ab;

  --display: 'Archivo', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  text-wrap: balance;
}

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

.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--white);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 10;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 24px;
}

.display {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.sub {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 500;
  color: var(--grey);
  line-height: 1.4;
  text-wrap: balance;
}

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  color: inherit;
  opacity: 0.72;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  opacity: 1;
}

.site-nav .pill {
  opacity: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.on-night .pill {
  background: var(--white);
  color: var(--ink);
}

.doc-header {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

/* ---------- Night bands ---------- */

.on-night {
  background: var(--night);
  color: var(--on-night);
}

.on-night .sub {
  color: var(--on-night-muted);
}

.on-night a:not(.pill):not(.brand) {
  color: var(--on-night);
}

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

.hero {
  text-align: center;
  padding-block: 56px 0;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5rem);
  max-width: 15ch;
  margin-inline: auto;
}

.hero h1 em {
  font-style: normal;
  color: var(--blush);
}

.hero .sub {
  max-width: 36rem;
  margin: 22px auto 30px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 16px;
  border-radius: 16px;
  text-align: left;
  line-height: 1.2;
  background: var(--white);
  color: var(--ink);
  border: 1px solid transparent;
}

.store.ghost {
  background: transparent;
  color: var(--on-night);
  border-color: var(--night-line);
}

.store svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.store small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.store strong {
  font-size: 1.0625rem;
  font-weight: 600;
}

/* Phone with the Daily feed, plus a reminder and a widget floating beside it. */
.stage {
  position: relative;
  width: min(100%, 44rem);
  margin: 56px auto 0;
  height: 520px;
}

.phone {
  position: absolute;
  left: 50%;
  top: 0;
  width: 290px;
  height: 600px;
  margin-left: -145px;
  border-radius: 48px;
  border: 10px solid #07090d;
  box-shadow: 0 0 0 1px var(--night-line), 0 40px 80px -20px rgb(0 0 0 / 0.6);
  background: #d9b9ae url('morning-water.jpg') center / cover;
  overflow: hidden;
}

.phone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(20 24 31 / 0.05) 30%, rgb(20 24 31 / 0.45));
}

.phone .island {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 86px;
  height: 24px;
  margin-left: -43px;
  border-radius: 12px;
  background: #07090d;
}

.phone .screen {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 58px 24px 110px;
  color: #fffdfc;
  text-align: left;
}

.phone .topic {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.phone blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.3;
  text-shadow: 0 1px 12px rgb(20 24 31 / 0.35);
}

.phone .progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(255 253 252 / 0.4);
}

.dots i.on {
  background: #fffdfc;
}

.float {
  position: absolute;
  text-align: left;
  border-radius: 22px;
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.55);
}

.notification {
  left: 0;
  top: 96px;
  width: 250px;
  padding: 12px 14px;
  background: rgb(246 242 238 / 0.94);
  color: var(--ink);
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.notification img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--paper);
}

.notification .head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}

.notification .head span {
  font-weight: 400;
  color: var(--grey);
}

.widget {
  right: 0;
  top: 250px;
  width: 172px;
  height: 172px;
  padding: 16px;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.widget .label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

.widget p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.3;
}

/* ---------- Paper sections ---------- */

.section {
  padding-block: 112px;
}

.section + .section {
  padding-top: 0;
}

.center-head {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 56px;
}

.center-head h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
}

.center-head .sub {
  margin: 16px 0 0;
}

.left-head {
  max-width: 44rem;
  margin-bottom: 48px;
}

.left-head h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
}

.left-head .sub {
  margin: 14px 0 0;
}

.steps-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.steps-grid li {
  counter-increment: step;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px 22px 26px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.steps-grid li::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blush-soft);
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.steps-grid h3,
.topic-card h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.steps-grid p {
  margin: 0;
  color: var(--body);
  font-size: 0.9375rem;
}

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

.topic-card {
  border-radius: 24px;
  padding: 26px 24px;
  background: var(--night);
  color: var(--on-night);
  display: grid;
  gap: 6px;
  align-content: start;
}

.topic-card .what {
  color: var(--on-night-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.topic-card blockquote {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--night-line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1875rem;
  line-height: 1.4;
  color: var(--blush);
}

.wall {
  columns: 3 18rem;
  column-gap: 16px;
}

.wall figure {
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  border: 1px solid var(--line);
}

.wall blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.4;
}

.wall figcaption {
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  text-align: center;
  border-block: 1px solid var(--line);
  padding-block: 48px;
}

.stats strong {
  display: block;
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats span {
  display: block;
  margin-top: 10px;
  color: var(--grey);
  font-weight: 500;
}

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

.promises li {
  padding: 26px 24px;
  border-radius: 24px;
  background: var(--blush-soft);
}

.promises h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.promises p {
  margin: 0;
  color: var(--body);
}

/* ---------- Closing call to action and footer ---------- */

.cta {
  text-align: center;
  padding-block: 112px 88px;
}

.cta h2 {
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 4.75rem);
  color: var(--blush);
  max-width: 14ch;
  margin-inline: auto;
}

.cta .sub {
  max-width: 32rem;
  margin: 20px auto 32px;
}

.site-footer {
  font-size: 0.875rem;
}

.site-footer.on-night {
  border-top: 1px solid var(--night-line);
  color: var(--on-night-muted);
}

.site-footer.on-paper {
  border-top: 1px solid var(--line);
  color: var(--body);
  margin-top: 112px;
}

.site-footer .wrap {
  display: grid;
  gap: 18px;
  padding-block: 40px 56px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-weight: 500;
}

.site-footer.on-paper nav a {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  max-width: 62ch;
}

/* ---------- Documents (privacy, terms, support, deletion) ---------- */

.doc {
  max-width: 46rem;
  padding-block: 64px 0;
}

.doc h1 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem);
}

.doc .meta {
  color: var(--grey);
  font-size: 0.875rem;
  margin: 14px 0 0;
}

.doc h2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 52px 0 12px;
  scroll-margin-top: 16px;
}

.doc h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 28px 0 6px;
}

.doc p,
.doc li {
  max-width: 68ch;
  color: #2f3540;
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

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

.summary {
  margin-top: 32px;
  padding: 24px 26px;
  border-radius: 24px;
  background: var(--blush-soft);
}

.summary h2 {
  margin-top: 0;
}

.summary ul {
  margin: 0;
}

.toc {
  margin-top: 32px;
  font-size: 0.9375rem;
}

.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 8px 0 0;
}

.toc li {
  break-inside: avoid;
}

.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 38rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 600;
  background: var(--paper);
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  align-items: start;
}

.steps li + li {
  margin-top: 0;
}

.steps li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blush-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.contact-card {
  margin-top: 28px;
  padding: 24px 26px;
  border-radius: 24px;
  background: var(--night);
  color: var(--on-night-muted);
}

.contact-card p {
  margin: 0;
  color: inherit;
}

.contact-card p + p {
  margin-top: 10px;
}

.contact-card .email a {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.125rem, 0.9rem + 1vw, 1.5rem);
  color: var(--on-night);
  word-break: break-word;
}

.notice {
  margin-top: 28px;
  padding: 18px 22px;
  border-left: 3px solid var(--blush);
  background: var(--white);
  border-radius: 0 16px 16px 0;
}

.notice p {
  margin: 0;
}

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

details {
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
}

details:first-of-type {
  border-top: 1px solid var(--line);
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 10px 0 0;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-grid,
  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .section {
    padding-block: 80px;
  }

  .stage {
    height: 470px;
  }

  .phone {
    width: 250px;
    height: 520px;
    margin-left: -125px;
    border-radius: 42px;
  }

  .phone blockquote {
    font-size: 1.375rem;
  }

  .phone .screen {
    padding-bottom: 84px;
  }

  /* Drops in over the top of the phone, like a real banner. */
  .notification {
    width: 230px;
    top: 30px;
    left: 50%;
    margin-left: -115px;
  }

  .widget {
    display: none;
  }
}

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

  .site-nav .hide-sm {
    display: none;
  }

  .steps-grid,
  .topic-grid,
  .promises,
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc ol {
    columns: 1;
  }

}

@media (prefers-reduced-motion: no-preference) {
  .phone,
  .float {
    animation: rise 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .notification {
    animation-delay: 350ms;
  }

  .widget {
    animation-delay: 550ms;
  }

  @keyframes rise {
    from {
      transform: translateY(14px);
    }
    to {
      transform: none;
    }
  }
}
