/* WeStreak website, westreakapp.com
   One stylesheet, no frameworks. Colours come from the app's lib/tokens.json. */

:root {
  color-scheme: light dark;
  --background: #FFFFFF;
  --surface: #F4F6FA;
  --text: #1B1F2A;
  --text-muted: #4F5666;
  --outline: #767D8C;
  --primary: #21379F;
  --primary-pressed: #182B80;
  --on-primary: #FFFFFF;
  --link: #21379F;
  --you: #DD5302;
  --you-text: #B04103;
  --you-tint: #FFF1EA;
  --partner: #21379F;
  --together-tint: #EEF1FB;
  --gold: #FEC653;
  --focus: #21379F;
  --focus-halo: #FFFFFF;
  --shadow: 0 1px 2px rgba(27, 31, 42, 0.06), 0 8px 24px rgba(27, 31, 42, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111318;
    --surface: #1D2028;
    --text: #F5F7FB;
    --text-muted: #B6BCC8;
    --outline: #7E8696;
    --primary: #4C6DDA;
    --primary-pressed: #4663D2;
    --on-primary: #FFFFFF;
    --link: #7F9FF8;
    --you: #FF9064;
    --you-text: #FF9064;
    --you-tint: #2A1D17;
    --partner: #4C6DDA;
    --together-tint: #1A2036;
    --gold: #FEC653;
    --focus: #7F9FF8;
    --focus-halo: #111318;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

/* Fonts: hosted here, nothing loaded from Google at run time. */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-variable.woff2") format("woff2-variations"),
       url("/fonts/Nunito-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: 0.6em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); font-weight: 800; margin-top: 0; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}
a:hover { text-decoration-thickness: 0.16em; }

/* Visible keyboard focus on every link and button */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--focus-halo);
  border-radius: 6px;
}

ol, ul { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.5em; }
li::marker { font-weight: 600; color: var(--text-muted); }

strong, b { font-weight: 600; }

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

.tbc {
  font-style: italic;
  color: var(--text-muted);
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.prose {
  max-width: 44rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1rem;
  min-height: 48px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus, .skip-link:focus-visible { top: 1rem; }

/* ---------- header ---------- */

.site-header {
  padding: 1rem 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] {
  background: var(--surface);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- main ---------- */

main {
  padding: 1.5rem 0 4rem;
}
main > .wrap > * + * { margin-top: 1rem; }

section { margin-top: 3.5rem; }
section:first-child { margin-top: 0; }
section h2 { margin-bottom: 0.75rem; }
section h3 { margin-top: 1.75rem; }

.page-title {
  margin-top: 1.5rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- hero (home) ---------- */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-top: 1.5rem;
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; padding-top: 2.5rem; }
}
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.25rem; color: var(--text); }

.coming-soon {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.coming-soon li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 1.5px solid var(--outline);
  border-radius: 999px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
}

/* The decorative habit grid: a week for two people, built in HTML and CSS. */
.grid-card {
  background: var(--surface);
  border-radius: 24px;
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
  max-width: 30rem;
  margin: 0 auto;
}
.grid-card .week {
  display: grid;
  grid-template-columns: auto repeat(7, 1fr);
  gap: 0.4rem;
  align-items: center;
}
.grid-card .who {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.grid-card .who.you { background: var(--you); }
.grid-card .who.partner { background: var(--partner); }
.grid-card .day {
  aspect-ratio: 1 / 1;
  border-radius: 28%;
  display: grid;
  place-items: center;
  background: var(--background);
  border: 1.5px solid var(--outline);
  position: relative;
}
.grid-card .day.done.you { background: var(--you); border-color: var(--you); }
.grid-card .day.done.partner { background: var(--partner); border-color: var(--partner); }
.grid-card .day svg { width: 55%; height: 55%; display: block; }
.grid-card .day.done svg { color: #FFFFFF; }
.grid-card .day.missed { background: var(--surface); border-style: dashed; }
.grid-card .labels {
  display: grid;
  grid-template-columns: auto repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}
.grid-card .labels span:first-child { width: 1.9rem; margin-right: 0.3rem; }
.grid-card .streak {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  background: var(--together-tint);
  border-radius: 999px;
  width: fit-content;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}
.grid-card .streak svg { width: 1.5rem; height: 1.5rem; color: var(--you); }
.grid-card .streak .n { color: var(--text); }
.grid-card .streak .lbl { font-family: "Inter", sans-serif; font-weight: 500; font-size: 0.95rem; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .grid-card .day.done { animation: pop 0.5s ease-out both; }
  .grid-card .day.done:nth-child(3) { animation-delay: 0.05s; }
  .grid-card .day.done:nth-child(4) { animation-delay: 0.1s; }
  .grid-card .day.done:nth-child(5) { animation-delay: 0.15s; }
  .grid-card .day.done:nth-child(6) { animation-delay: 0.2s; }
  .grid-card .day.done:nth-child(7) { animation-delay: 0.25s; }
  .grid-card .day.done:nth-child(8) { animation-delay: 0.3s; }
  .grid-card .day.done:nth-child(9) { animation-delay: 0.35s; }
  @keyframes pop {
    from { transform: scale(0.85); opacity: 0.4; }
    to { transform: scale(1); opacity: 1; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid-card .day.done { animation: none; }
}

/* ---------- waiting list (home) ---------- */

.hero-cta { margin-top: 1.25rem; }

.waiting-list {
  background: var(--together-tint);
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}
.waiting-list .lede { max-width: 40rem; }
.waitlist-form { max-width: 36rem; margin-top: 1.25rem; }
.waitlist-form .field { display: grid; gap: 0.35rem; }
.waitlist-form label { font-weight: 600; }
.waitlist-form input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  font: inherit;
  color: var(--text);
  background: var(--background);
  border: 1.5px solid var(--outline);
  border-radius: 12px;
}
.waitlist-form .consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  margin-top: 1rem;
}
.waitlist-form .consent label { font-weight: 500; padding-top: 0.6rem; }
/* The tick box: a 48 by 48 pixel target that draws a 28 pixel box in its middle. The tick is drawn in CSS, no image. */
.waitlist-form input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 48px;
  height: 48px;
  border: 10px solid transparent;
  border-radius: 16px;
  background-clip: padding-box;
  background-color: var(--background);
  box-shadow: inset 0 0 0 2px var(--outline);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.waitlist-form input[type="checkbox"]:checked {
  background-color: var(--primary);
  box-shadow: inset 0 0 0 2px var(--primary);
}
.waitlist-form input[type="checkbox"]::after {
  content: "";
  width: 7px;
  height: 14px;
  border: solid var(--on-primary);
  border-width: 0 3px 3px 0;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0;
}
.waitlist-form input[type="checkbox"]:checked::after { opacity: 1; }
.waitlist-form .button { margin-top: 1rem; width: 100%; }
@media (min-width: 40rem) { .waitlist-form .button { width: auto; } }
.waitlist-form .button:disabled { opacity: 0.7; cursor: default; }
.waitlist-form .status.error { color: var(--you-text); }
.waiting-list .powered { margin-top: 1rem; color: var(--text-muted); font-size: 0.95rem; }
.waiting-list .powered a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.25rem; }

/* ---------- cards and lists on the home page ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.steps h3 { margin: 0 0 0.25rem; font-size: 1.15rem; }

.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 40rem) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 64rem) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.features li {
  margin: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem;
  border-top: 4px solid var(--partner);
}
.features li:nth-child(odd) { border-top-color: var(--you); }
.features h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.features p { color: var(--text); }

.callout {
  background: var(--together-tint);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 48rem;
}

.plans {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 48rem) {
  .plans { grid-template-columns: 1fr 1fr; }
}
.plans li {
  margin: 0;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
}
.plans li.premium { border: 2px solid var(--primary); }
.plans h3 { margin: 0 0 0.5rem; font-size: 1.4rem; }

.faq h3 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
}
.faq h3 + p { margin-bottom: 0; }

/* ---------- text pages ---------- */

.toc {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  max-width: 44rem;
}
.toc h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.toc ol { margin: 0; columns: 2; column-gap: 2rem; }
@media (max-width: 40rem) { .toc ol { columns: 1; } }
.toc li { margin-bottom: 0.35rem; break-inside: avoid; }
.toc a { display: inline-block; padding: 0.2rem 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--primary-pressed); }
.button:active { transform: scale(0.98); }

.status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-weight: 500;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--surface);
  padding: 2.5rem 0 3rem;
  margin-top: 2rem;
}
.site-footer .wrap > * + * { margin-top: 1rem; }
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}
.site-footer li { margin: 0; }
.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  margin-left: -0.5rem;
}
.site-footer p { margin: 0; }
.site-footer p a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  margin-left: -0.5rem;
}
.site-footer .small { color: var(--text-muted); font-size: 0.95rem; }
