/* Weighstone website. Same palette as the app: warm cream ground, ink text,
   orange pebbles, indigo for actions. Light only, like the app (for now). */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/SpaceGrotesk-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #f6f3ec;
  --surface: #ffffff;
  --panel: #ffeedd;
  --ink: #1b1a33;
  --muted: #5e5c72;
  --hairline: #e7e2d6;
  --primary: #4f46e5;
  --primary-deep: #3730a3;
  --primary-soft: #ecebfd;
  --streak: #e8590c;
  --streak-deep: #c2410c;
  --goal: #0f7b6c;
  --goal-soft: #d7f5ec;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 20px;
}

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

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

/* A warm peach wash at the top of every page that fades into the cream. */
body {
  margin: 0;
  background-color: var(--ground);
  background-image: linear-gradient(180deg, #ffe4cc 0%, var(--panel) 28%, var(--ground) 100%);
  background-repeat: no-repeat;
  background-size: 100% 820px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--primary-deep);
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 720px;
}

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

.brand {
  display: inline-flex;
  line-height: 0;
}

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

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

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 999px;
}

.nav a:hover,
.nav a[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Landing */
.hero {
  padding: 40px 0 56px;
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(40px, 9vw, 64px);
}

.hero .lede {
  margin: 16px 0 0;
  font-size: clamp(18px, 3.4vw, 21px);
  color: var(--muted);
  max-width: 34em;
}

/* The 7-day streak strip, the app's signature. */
.streak {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 400px;
  box-shadow: 0 1px 0 var(--hairline);
}

.streak-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.streak-head strong {
  font-size: 16px;
}

.streak-head span {
  font-size: 13px;
  color: var(--muted);
}

.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.days li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot.logged {
  background: var(--streak);
  color: #fff;
}

.dot.today {
  border: 2px dashed var(--streak-deep);
  color: var(--streak-deep);
}

.dot.paused {
  background: var(--primary-soft);
  color: var(--primary);
}

.private {
  margin: 40px 0 56px;
  padding: 28px;
  border-radius: 24px;
  background: var(--goal-soft);
  color: #0b5f54;
}

.private h2 {
  font-size: clamp(24px, 4.6vw, 30px);
  color: #0b5f54;
}

.private p {
  margin: 10px 0 0;
  max-width: 40em;
}

.private a {
  color: #0b5f54;
  font-weight: 600;
}

/* Text pages */
.page-title {
  padding: 28px 0 32px;
}

.page-title h1 {
  font-size: clamp(32px, 7vw, 44px);
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.prose {
  padding-top: 36px;
  padding-bottom: 56px;
}

.prose h2 {
  font-size: 24px;
  margin: 40px 0 10px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 19px;
  margin: 28px 0 6px;
}

.prose p,
.prose ul {
  margin: 0 0 14px;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 6px;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 40px;
}

.summary p:last-child {
  margin-bottom: 0;
}

details {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  margin-bottom: 10px;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  font-weight: 600;
  position: relative;
}

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

summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
}

details[open] summary::after {
  content: '−';
}

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

details > div p:last-child {
  margin-bottom: 0;
}

.contact {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 36px;
}

.contact h2 {
  margin-top: 0;
}

footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 0 40px;
  font-size: 15px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a {
  color: var(--muted);
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.3fr 1fr;
    padding: 56px 0 72px;
  }

  .private {
    padding: 36px 40px;
  }
}

@media (max-width: 380px) {
  .brand img {
    height: 26px;
  }

  .nav a {
    padding: 8px 8px;
  }
}

.nowrap {
  white-space: nowrap;
}
