/*
 * Clock School site stylesheet
 * Shared rendering layer for static pages in `site/`
 * Licence: MIT
 */

@import url('assets/tokens.css');

:root {
  --focus-ring: 2px solid var(--sea);
  --focus-offset: 2px;
  --section-top: 3.5rem;
  --section-rule-width: 1.5rem;
  --section-rule-gap: 1.2rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
}

a {
  color: var(--sea);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--ink);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.skip-to-content {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--warm-white);
  color: var(--sea);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-to-content:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  border-bottom: 1px solid var(--grid);
  background: var(--warm-white);
  padding: 0.75rem var(--gutter);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar a {
  color: var(--sea);
  text-decoration: none;
}

.topbar a:hover {
  color: var(--ink);
}

.endorsement {
  border-bottom: 1px solid var(--grid);
  background: var(--parchment);
  padding: 0.45rem var(--gutter);
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.hero {
  padding: 6rem var(--gutter) 2.5rem;
}

.hero-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.hero-inner::before {
  content: "";
  display: block;
  width: var(--section-rule-width);
  height: 1px;
  margin-bottom: var(--section-rule-gap);
  background: var(--grid);
}

.page-label,
.tier-label,
.table-label,
.footer-status {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-label,
.tier-label,
.table-label {
  color: var(--sea);
}

.page-label {
  margin-bottom: 0.55rem;
}

.hero h1 {
  max-width: 24rem;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 1.16;
  font-weight: 400;
}

.subtitle {
  max-width: 30rem;
  margin-top: 1rem;
  font-size: 1.15rem;
  line-height: 1.55;
}

.epigraph {
  margin-bottom: 1.25rem;
  color: var(--stone);
  font-size: 1.35rem;
  line-height: 1.55;
}

.hero-cta {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero-cta::after {
  content: " ->";
}

.content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem var(--gutter) 4.5rem;
}

.content > * + * {
  margin-top: 0.85rem;
}

.content > h2,
.content > h3,
.content > ul,
.content > ol,
.content > table,
.content > div,
.content > blockquote {
  margin-top: var(--section-top);
}

.content > h2 + *,
.content > h3 + * {
  margin-top: 0.8rem;
}

h2 {
  color: var(--sea);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

h2::before {
  content: "";
  display: block;
  width: var(--section-rule-width);
  height: 1px;
  margin-bottom: var(--section-rule-gap);
  background: var(--grid);
}

h3 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
}

p,
li,
td {
  max-width: 80ch;
}

ul,
ol {
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.4rem;
}

.principle {
  border-left: 3px solid var(--sea);
  background: var(--warm-white);
  padding: 1rem 1rem 1rem 1.15rem;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--grid);
  margin-top: 1.2rem;
}

.tier-card {
  display: block;
  background: var(--warm-white);
  color: var(--ink);
  padding: 1.25rem;
  text-decoration: none;
}

.tier-card:hover {
  background: var(--parchment);
}

.tier-card h3 {
  margin-top: 0.4rem;
}

.tier-card p {
  margin-top: 0.75rem;
  color: var(--ink);
}

.tier-access {
  margin-top: 0.9rem;
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-list {
  list-style: none;
  padding-left: 0;
  border-top: 1px solid var(--grid);
}

.status-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--grid);
  padding: 0.8rem 0;
}

.status-badge {
  min-width: 6.5rem;
  color: var(--stone);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-published,
.status-active {
  color: var(--sea);
}

.status-planned {
  color: var(--stone);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

thead th {
  padding: 0 0 0.55rem;
  border-bottom: 1px solid var(--grid);
  color: var(--sea);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

tbody td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--grid);
  vertical-align: top;
}

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

footer {
  border-top: 1px solid var(--grid);
  background: var(--warm-white);
  color: var(--stone);
  padding: 1.5rem var(--gutter) 2rem;
}

.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.footer-inner > * + * {
  margin-top: 0.65rem;
}

.footer-title {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-maxim {
  color: var(--stone);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-links a {
  text-decoration: none;
}

.footer-licence {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 4rem;
  }

  .content {
    padding-bottom: 3rem;
  }

  .status-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .status-badge {
    min-width: auto;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media print {
  .topbar,
  .hero-cta {
    display: none;
  }

  body,
  .tier-card,
  footer {
    background: white !important;
  }
}
