/* sweetweek.app static page. Colors come only from tokens.css (generated from
   packages/ui/src/brand/palette.json); no inline styles (the CSP allows 'self' only). */

/* Brand fonts (docs/BRAND.md, Type): Latin-subset variable woff2 files, self-hosted under the
   SIL Open Font License 1.1 (licence texts next to them in /assets/fonts/). */
@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/figtree-latin-var.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-grotesque-latin-var.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

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

body {
  margin: 0;
  background: var(--sw-bg);
  color: var(--sw-fg);
  font-family: 'Figtree', ui-sans-serif, system-ui, sans-serif;
  /* 18 px: Figtree sets smaller and lighter than the system font it replaces. */
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: 'Bricolage Grotesque', 'Figtree', ui-sans-serif, system-ui, sans-serif;
  text-wrap: balance;
}

p,
.lead {
  text-wrap: pretty;
}

/* Keyboard users can jump past the header; off-screen until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  background: var(--sw-surface);
  color: var(--sw-brand-text);
  border: 2px solid var(--sw-focus);
  border-radius: 10px;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  padding-top: 2rem;
}

.header img {
  display: block;
  height: 2.5rem;
  width: auto;
}

h1,
h2 {
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 2.5rem 0 1rem;
}

h2 {
  font-size: 1.625rem;
  margin: 3rem 0 0.75rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--sw-fg-2);
}

.promise {
  font-weight: 600;
  margin-top: 0.75rem;
}

.steps {
  padding-left: 1.25rem;
}

.steps li,
.plain li {
  margin-bottom: 0.6rem;
}

.plain {
  padding-left: 1.25rem;
}

.note {
  background: var(--sw-brand-tint);
  border-radius: 18px;
  padding: 0.25rem 1.5rem 1rem;
  margin-top: 2.5rem;
}

a {
  color: var(--sw-brand-text);
}

a:focus-visible {
  outline: 2px solid var(--sw-focus);
  outline-offset: 2px;
}

.footer {
  margin-top: 3rem;
  padding-bottom: 2rem;
  color: var(--sw-muted);
  font-size: 0.9375rem;
}

/* The rule spans the text column, not .wrap's padding. */
.footer::before {
  content: '';
  display: block;
  border-top: 1px solid var(--sw-line);
}

/* Legal texts (/privacy, /terms), generated by pnpm legal:build (ARCHITECTURE.md §8.8). */
.header a {
  display: inline-block;
}

.legal h1 {
  margin-top: 1rem;
}

.legal h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem;
}

.legal ul,
.legal ol {
  padding-left: 1.5rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--sw-line-strong);
  color: var(--sw-muted);
}

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9375em;
}

.draft {
  margin-top: 2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sw-attention);
  border-radius: 12px;
  background: var(--sw-attention-tint);
  font-weight: 600;
}

.meta {
  color: var(--sw-muted);
  font-size: 0.9375rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.table-wrap:focus-visible {
  outline: 2px solid var(--sw-focus);
  outline-offset: 2px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.legal th {
  border-bottom: 1px solid var(--sw-line-strong);
  padding: 0.5rem;
  font-weight: 600;
  vertical-align: bottom;
}

.legal td {
  border-bottom: 1px solid var(--sw-line);
  padding: 0.5rem;
  vertical-align: top;
}

/* Site navigation, guides and FAQ. Every link outside running text is a 44 px tap target. */
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.nav ul,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The links' side padding is tap area; pull it back so the words line up with the text. */
.nav ul {
  margin: 0 -0.5rem;
}

.nav a,
.footer-links a,
.crumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  border-radius: 10px;
}

.nav a {
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-links {
  margin: 0.75rem 0 0 -0.5rem;
}

.crumb {
  margin: 1.5rem 0 0 -0.5rem;
}

.crumb a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--sw-muted);
}

.crumb a:hover {
  color: var(--sw-fg);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.guide h1,
.page h1 {
  margin-top: 0.5rem;
}

.page h1 {
  margin-top: 2rem;
}

.guide h3,
.page h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 1.75rem 0 0.5rem;
}

.guide ol,
.guide ul,
.page ul,
.page ol {
  padding-left: 1.5rem;
}

.guide li,
.page li {
  margin-bottom: 0.5rem;
}

.example {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 14px;
  padding: 0.25rem 1.25rem;
  margin: 1.5rem 0;
}

.example-label {
  color: var(--sw-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0;
}

.guide code,
.page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9375em;
  overflow-wrap: anywhere;
}

/* Guide cards: the title is the one link, stretched over the whole card so the card is
   the tap target and each guide is in the tab order once. "Read the guide" is a visual cue,
   not a second link. */
.cards {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  /* An odd last card takes the full row instead of sitting beside an empty cell. */
  .cards li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.cards li {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.25rem 1.25rem 0.5rem;
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 16px;
}

.cards .card-title {
  margin: 0;
  color: var(--sw-fg);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.cards .card-text {
  flex: 1;
  margin: 0.4rem 0 0;
  color: var(--sw-fg-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

.card-title a:focus-visible {
  outline: none;
}

.card-title a:focus-visible::after {
  outline: 2px solid var(--sw-focus);
  outline-offset: 2px;
}

.cards li:hover .card-title a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.card-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.25rem;
  color: var(--sw-brand-text);
  font-weight: 600;
  font-size: 0.9375rem;
}

.card-more::after {
  content: '\2192';
  margin-left: 0.35rem;
  transition: transform 0.15s ease;
}

.cards li:hover .card-more::after {
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .card-more::after {
    transition: none;
  }
}

.all-link {
  margin: 1rem 0 0;
}

.all-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.all-link a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Text only screen readers hear. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.more {
  list-style: none;
  padding-left: 0;
}

.guide .more li,
.page .more li {
  margin: 0;
}

/* A thin rule between related-guide links, so a two-line link doesn't run into the next. */
.guide .more li + li,
.page .more li + li {
  border-top: 1px solid var(--sw-line);
}

.more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}

.more a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Link lists sit flush with the text (beats the .guide ul / .page ul indent). */
.page .cards,
.page .more,
.guide .more {
  padding-left: 0;
}

.page .cards li {
  margin: 0;
}

/* The logo link is a 44 px tap target too. */
.header > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Landing page: the hero waitlist button and the "Built by security people" band. */
.hero {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--sw-line);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--sw-brand);
  color: var(--sw-on-brand);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--sw-brand-hover);
}

.band {
  margin-top: 2.5rem;
  padding: 0.25rem 1.5rem 1.25rem;
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 18px;
}

.band h2 {
  margin-top: 1.5rem;
}

.proof {
  display: grid;
  list-style: none;
  margin: 1.25rem 0 0.25rem;
  padding: 0;
}

@media (min-width: 40rem) {
  .proof {
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
  }
}

.proof li {
  padding: 1rem 0;
  border-top: 1px solid var(--sw-line);
}

.proof h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.proof p {
  margin: 0.25rem 0 0;
  color: var(--sw-fg-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Footer links are navigation, not running text: muted, underlined only on hover. */
.footer-links a {
  color: var(--sw-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--sw-fg);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Landing page calls to action and small print. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin: 1.5rem 0 0;
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}

.link-quiet:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.fine {
  color: var(--sw-muted);
  font-size: 0.9375rem;
}

/* "Write to us" next to the waitlist button is a tap target too. */
.cta-row .fine a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.note .cta-row {
  margin: 1rem 0 0.75rem;
}

/* A sentence, not a lone link: keep the link underlined inside running text. */
p.all-link {
  margin-top: 2rem;
  color: var(--sw-fg-2);
}

p.all-link a {
  display: inline;
  min-height: 0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Landing page: "From one school email to your week", a made-up email beside what SweetWeek
   makes from it. Plain markup, not a screenshot: sharp at any size, light and dark. */
.demo h2 {
  margin-top: 2.5rem;
}

.demo-grid {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

@media (min-width: 40rem) {
  .demo-grid {
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 0.75rem;
  }
}

.demo-panel {
  margin: 0;
}

.demo-label {
  color: var(--sw-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.mail {
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  color: var(--sw-fg-2);
  font-size: 0.875rem;
  line-height: 1.5;
}

.mail p {
  margin: 0 0 0.6rem;
}

.mail .mail-from {
  color: var(--sw-fg);
  font-weight: 650;
  margin-bottom: 0;
}

.mail .mail-subject {
  color: var(--sw-fg);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--sw-line);
}

.mail mark {
  background: var(--sw-brand-tint);
  color: var(--sw-fg);
  border-radius: 4px;
  padding: 0 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.mail .mail-more {
  color: var(--sw-muted);
  font-style: italic;
  margin-bottom: 0;
}

.demo-arrow {
  margin: 0;
  text-align: center;
  color: var(--sw-brand-text);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* Stacked on a phone, the arrow points down. */
.demo-arrow span {
  display: inline-block;
  transform: rotate(90deg);
}

@media (min-width: 40rem) {
  .demo-arrow {
    padding-top: 6rem;
  }

  .demo-arrow span {
    transform: none;
  }
}

.week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.week li {
  display: grid;
  gap: 0.1rem;
  background: var(--sw-surface);
  border: 1px solid var(--sw-line);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
}

.week-type {
  justify-self: start;
  background: var(--sw-badge-pill);
  color: var(--sw-badge-pill-text);
  border: 1px solid var(--sw-badge-pill-line);
  border-radius: 999px;
  padding: 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.6;
}

.week-title {
  color: var(--sw-fg);
  font-weight: 650;
  line-height: 1.35;
}

.week-when {
  color: var(--sw-fg-2);
  font-size: 0.875rem;
}

.reminder {
  margin-top: 0.75rem;
  background: var(--sw-brand-tint);
  border-radius: 14px;
  padding: 0.6rem 0.9rem;
  font-size: 0.9375rem;
}

.reminder p {
  margin: 0;
  color: var(--sw-fg);
}

.reminder .reminder-when {
  color: var(--sw-brand-text);
  font-size: 0.8125rem;
  font-weight: 650;
}

/* The week side looks like the app: a panel with the week, who shares it and an "Example" tag. */
.app-frame {
  background: var(--sw-surface-2);
  border: 1px solid var(--sw-line);
  border-radius: 18px;
  padding: 0.75rem;
}

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  margin-bottom: 0.6rem;
}

.app-head p {
  margin: 0;
}

.app-week {
  color: var(--sw-fg);
  font-weight: 700;
}

.app-head .app-tag {
  margin-left: auto;
  order: 2;
  color: var(--sw-muted);
  border: 1px solid var(--sw-line-strong);
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.6;
}

.app-shared {
  order: 3;
  flex-basis: 100%;
  color: var(--sw-fg-2);
  font-size: 0.8125rem;
}

/* A child's dot is its calendar color (packages/core/src/children.ts, set with the SVG fill
   attribute as in the app); the whole family's is berry. The name always sits next to it. */
.dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  margin-right: 0.35rem;
  vertical-align: 0.05em;
}

.dot-family {
  fill: var(--sw-brand);
}

/* Looks like the app's button; not a control on this page. */
.week-action {
  justify-self: start;
  margin-top: 0.35rem;
  border: 1px solid var(--sw-line-strong);
  border-radius: 999px;
  padding: 0.1rem 0.75rem;
  color: var(--sw-fg);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* "We're opening to families in small groups." under each early-access button. */
.cta-note {
  margin: 0.5rem 0 0;
}

/* Sign in, for trial families: an outlined pill at the end of the nav (44 px tall, as every tap
   target; the site's buttons are pills too). */
.nav a.nav-pill {
  margin: 0 0.5rem 0 0.5rem;
  padding: 0 1rem;
  border: 1.5px solid var(--sw-brand-text);
  border-radius: 999px;
}

.nav a.nav-pill:hover {
  background: var(--sw-brand-tint);
  text-decoration: none;
}
