/*
 * quetzalquote.com: home, support and legal pages.
 * Colors, type and spacing are system 00 tokens (src/theme/tokens.generated.ts; a test checks
 * every color here is one of them). Accent = the app's `accent`, used for the header rule, the
 * support button and the step numbers only. Links are textPrimary and underlined (s09-web).
 * Sizes in rem so the browser's text size scales everything; nothing has a fixed height.
 */
@font-face {
  font-family: 'Source Sans 3';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/SourceSans3-400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/SourceSans3-600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/SourceSans3-700Bold.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #f3f1ec;
  --surface: #ffffff;
  --tp: #161a18;
  --ts: #434b47;
  --divider: #dad7cf;
  --focus: #1c4fd6;
  --accent: #0a5a48;
  --accent-pressed: #063f32;
  --accent-soft: #ddefe8;
  --on-accent: #ffffff;
  --card-border: transparent;
  --sh-raised: 0 1px 3px 0 #161a1824;
  --pad: 1rem;
  --fast: 120ms cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101312;
    --surface: #181c1b;
    --tp: #f3f5f4;
    --ts: #bcc4c0;
    --divider: #2e3532;
    --focus: #9bb8ff;
    --accent: #57c9a6;
    --accent-pressed: #86dcc0;
    --accent-soft: #123a30;
    --on-accent: #06130f;
    --card-border: #2e3532;
    --sh-raised: none;
  }
}
@media (min-width: 768px) {
  :root {
    --pad: 1.5rem;
  }
}
@media (min-width: 1024px) {
  :root {
    --pad: 2rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--tp);
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  font-size: 1.125rem; /* body 18/24 */
  line-height: 1.5rem;
  overflow-wrap: break-word;
}
main {
  flex: 1;
}
.wrap {
  width: 100%;
  max-width: 45rem; /* size.contentMaxWeb 720 */
  margin: 0 auto;
  padding: 0 var(--pad);
}

a {
  color: var(--tp);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  z-index: 1;
}
.skip:focus {
  top: 0.5rem;
}

/* Header: 4 pt accent rule, symbol + name, one-line nav that wraps under the brand on phones. */
header.site {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.625rem;
}
.brand img {
  width: 2rem;
  height: 2rem;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-weight: 600;
  font-size: 1rem; /* label 16/20 */
  line-height: 1.25rem;
}
nav a {
  display: inline-block;
  padding: 0.75rem 0; /* 44 px tap target */
  text-decoration: none;
}
nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* Type scale: display 34/40, title 26/32, heading 20/26, caption 14/18. */
h1 {
  font-size: 2.125rem;
  line-height: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025rem;
  margin: 2.5rem 0 1rem;
  text-wrap: balance;
}
h2 {
  font-size: 1.625rem;
  line-height: 2rem;
  font-weight: 700;
  letter-spacing: -0.0125rem;
  margin: 2.5rem 0 0.75rem;
  text-wrap: balance;
}
h3,
h4 {
  font-size: 1.25rem;
  line-height: 1.625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}
p,
ul,
ol,
blockquote {
  margin: 0 0 1rem;
}
ul,
ol {
  padding-left: 1.5rem;
}
li + li {
  margin-top: 0.5rem;
}
strong {
  font-weight: 600;
}
hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 2rem 0;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* Home */
.hero {
  display: grid;
  gap: 0;
  padding: 2rem 0 0.5rem;
}
.hero h1 {
  margin-top: 1rem;
}
.hero .mark {
  order: -1;
}
.hero .mark img {
  width: 3.5rem;
  height: 3.5rem;
}
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1fr auto;
    column-gap: 2rem;
    align-items: center;
  }
  .hero .mark {
    order: 0;
  }
  .hero .mark img {
    width: 10rem;
    height: 10rem;
  }
}
.hero p:last-child {
  color: var(--ts);
}
.steps ol {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1.25rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 1rem;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--tp);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}
.steps li span {
  color: var(--ts);
}
.contact {
  margin: 2.5rem 0;
}

/* Support */
.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  min-height: 3rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--fast), transform var(--fast);
}
.button:hover {
  background: var(--accent-pressed);
}
.button:active {
  transform: translateY(1px);
}
.company {
  margin-top: 2.5rem;
  color: var(--ts);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Legal */
.doc {
  padding-bottom: 2rem;
}
.toc {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  box-shadow: var(--sh-raised);
}
.toc summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.25rem 0;
}
.toc ol {
  margin: 0.75rem 0 0.25rem;
}
.legal h2 {
  scroll-margin-top: 1rem;
}
blockquote {
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: 0.75rem;
}
blockquote p {
  margin: 0;
}
.table {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
  line-height: 1.375rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--divider);
}
th {
  font-weight: 600;
}
tbody tr:last-child td {
  border-bottom: 0;
}

footer.site {
  border-top: 1px solid var(--divider);
  color: var(--ts);
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 1.25rem 0 calc(1.25rem + env(safe-area-inset-bottom));
}
footer.site p {
  margin: 0 0 0.5rem;
}
footer.site a {
  color: var(--ts);
  display: inline-block;
  padding: 0.5rem 0;
  margin-right: 1rem;
}

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