/* Treaty website. One stylesheet for every page.
   The palette mirrors lib/app/theme.dart so the site and the app read as the
   same product: parchment and ink, the parent's amber and the teen's teal at
   matched weight, and violet for what is mutual. No web fonts, no trackers. */
:root {
  /* The same night palette as the landing page (landing.css), so every page
     reads as one site. */
  --bg: #0b0e12;
  --surface: #141a21;
  --surface-2: #1a2129;
  --ink: #f4efe6;
  --body: #c9ccd2;
  --muted: #8e959f;
  --line: #ffffff17;
  --amber: #f4b842;
  --teal: #3ad8c2;
  --violet: #c0a2f5;
  --link: #3ad8c2;
  --seal: linear-gradient(100deg, #98621c 0%, #0c7c68 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --radius: 20px;
  --measure: 68ch;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(50rem 30rem at 0% -10%, #f4b84210, transparent 60%),
    radial-gradient(50rem 30rem at 100% 0%, #3ad8c20e, transparent 60%),
    var(--bg);
  color: var(--body);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible,
button:focus-visible,
[role="tab"]:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

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

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

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

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

/* Header and footer --------------------------------------------------- */
header.site {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

nav.site a,
footer.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
}

nav.site a:first-child,
footer.site a:first-child {
  margin-left: 0;
}

nav.site a:hover,
footer.site a:hover {
  color: var(--ink);
}

footer.site {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  margin-top: 72px;
  color: var(--muted);
  font-size: 15px;
}

footer.site a {
  margin-left: 0;
  margin-right: 20px;
}

/* Shared pieces --------------------------------------------------------- */
.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  margin: 0 0 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  border: 0;
  background: var(--seal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px #ffffff26;
}

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

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52px;
  padding: 6px 20px;
  border-radius: 14px;
  border: 1px solid #ffffff26;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
}

.store small {
  font-weight: 500;
  opacity: 0.75;
  font-size: 13px;
}

.store[aria-disabled="true"] {
  pointer-events: none;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.callout {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 14px 18px;
  margin: 18px 0;
}

.callout p {
  margin: 0;
}

/* Documents (legal, support, join) ------------------------------------- */
main.doc {
  padding-top: 48px;
}

main.doc .wrap {
  max-width: calc(var(--measure) + 40px);
}

main.doc h1 {
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 740;
  letter-spacing: -0.045em;
  margin: 0 0 14px;
}

main.doc h2 {
  font-size: 24px;
  margin: 44px 0 10px;
  scroll-margin-top: 20px;
}

main.doc h3 {
  font-size: 19px;
  margin: 28px 0 8px;
}

main.doc .updated {
  color: var(--muted);
  font-size: 15px;
}

main.doc li {
  margin: 6px 0;
}

main.doc code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 6px;
}

main.doc strong {
  color: var(--ink);
}

.table {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  line-height: 1.5;
}

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

th {
  color: var(--ink);
  background: var(--surface-2);
}

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

/* The invite page ------------------------------------------------------ */
.code-box {
  text-align: center;
  margin: 28px 0;
}

.code {
  font: 700 clamp(30px, 9vw, 44px) / 1.2 ui-monospace, Menlo, Consolas,
    monospace;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin: 6px 0 18px;
  user-select: all;
}

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

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding-block: 80px 40px;
  }
}

.hero h1 {
  font-size: clamp(40px, 7.4vw, 72px);
  font-weight: 850;
  letter-spacing: -0.032em;
  line-height: 1.02;
  margin: 0 0 22px;
}

.hero .lede {
  font-size: clamp(18px, 2.2vw, 21px);
  max-width: 36ch;
  margin: 0 0 30px;
}

.hero .note {
  color: var(--muted);
  font-size: 15px;
  margin: 14px 0 0;
}

.phone {
  width: min(300px, 78vw);
  margin-inline: auto;
  border-radius: 46px;
  padding: 10px;
  /* A phone is dark in either theme; a cream bezel reads as a mistake. */
  background: #0c0f13;
  box-shadow: var(--shadow), 0 30px 60px rgba(12, 15, 19, 0.18);
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 37px;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  background: var(--surface-2);
}

section.band {
  padding-block: 64px;
}

section.band h2 {
  font-size: clamp(30px, 4.6vw, 44px);
  margin: 0 0 14px;
  max-width: 20ch;
}

section.band .intro {
  max-width: 58ch;
  margin: 0 0 32px;
}

.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}

.steps-grid .card h3 {
  font-size: 20px;
  margin: 10px 0 8px;
}

.steps-grid .card p {
  margin: 0;
}

.steps-grid .card::before {
  counter-increment: step;
  content: "0" counter(step);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--violet);
}

.sides {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.sides .card {
  border-top: 5px solid var(--line);
}

.sides .card.parent {
  border-top-color: var(--amber);
}

.sides .card.teen {
  border-top-color: var(--teal);
}

.sides .card.mutual {
  border-top-color: var(--violet);
}

.sides h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.sides ul {
  margin: 0;
  padding-left: 20px;
}

.sides li {
  margin: 6px 0;
}

/* Tour: tabs beside a phone. Without JavaScript the first step shows. */
.tour {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 860px) {
  .tour {
    grid-template-columns: 1fr 1fr;
  }
}

.tour [role="tablist"] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tour [role="tab"] {
  text-align: left;
  font: inherit;
  color: var(--body);
  background: transparent;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
}

.tour [role="tab"] strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.tour [role="tab"][aria-selected="true"] {
  background: var(--surface);
}

.tour [role="tabpanel"][hidden] {
  display: none;
}

details {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 4px 20px;
  margin: 12px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 14px 0;
}

details p {
  margin: 0 0 16px;
}

.faq details,
.faq h2 {
  max-width: 760px;
}
