/**
 * Text pages: the legal pages (impressum, terms, privacy) and the message pages (404, the page
 * after a payment, the order status page). Titles in the display serif, reading text in the plain
 * sans at 16px, wordmark at the top. Linked after base.css.
 */

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-wrap: break-word;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.15;
}

p,
li {
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--muted);
}

p strong,
li strong {
  color: var(--text);
}

a {
  color: var(--text);
  text-underline-offset: 3px;
}

/* The order number: a small line, never a heading */
.order-number {
  font-size: var(--fs-sm);
  margin-top: 28px;
}

.serial {
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  user-select: all;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

/* ---------- Legal pages: header, one reading column, footer ---------- */

.page-header,
.page-main,
.page-footer {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 16px;
  flex-shrink: 0;
}

.page-header .wordmark {
  transition: opacity 0.15s ease;
}

.page-header .wordmark:hover {
  opacity: 0.75;
}

.page-main {
  flex: 1;
  padding-top: 20px;
  padding-bottom: 64px;
}

.back-link {
  display: inline-block;
  font-family: var(--font-serif-text);
  font-size: var(--fs-note);
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--text);
}

.page-main h1 {
  margin-bottom: 20px;
}

.section-lead {
  color: var(--text);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.section-lead .aside {
  color: var(--muted);
}

.page-main h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.25;
  margin: 40px 0 12px;
}

.page-main h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 24px 0 8px;
}

.page-main p {
  margin-bottom: 16px;
}

.page-main ul {
  margin: 0 0 18px 22px;
}

.page-main li {
  margin-bottom: 6px;
}

.page-main li.spaced {
  margin-top: 10px;
}

/* The summary box at the top of the terms and the privacy page */
.overview-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 36px;
}

.page-main .overview-box h2 {
  font-size: var(--fs-lg);
  margin: 0 0 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 24px;
}

.overview-item {
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--muted);
}

.overview-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.meta-date {
  font-size: var(--fs-sm);
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.page-footer {
  display: flex;
  justify-content: center;
  padding-top: 20px;
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-serif-text);
  font-size: var(--fs-note);
  flex-shrink: 0;
}

/* ---------- Message pages: one narrow column ---------- */

.message {
  width: 100%;
  max-width: 508px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* On the page after a payment: the invitation to make a film of the ordered design */
.share-invite {
  margin: 28px 0;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.share-invite h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}

.share-invite .btn {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

/* 404 and the page after a payment sit in the middle of the screen */
.message.centered {
  margin: auto;
  text-align: center;
}

.message .wordmark {
  display: inline-block;
  margin-bottom: 28px;
}

.message h1 {
  margin-bottom: 12px;
}

.message p {
  margin-bottom: 20px;
}

.message .support {
  display: block;
  margin: -8px 0 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* The order status page */
.render {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--highlight);
  margin-bottom: 20px;
}

.message .product {
  color: var(--text);
  margin-bottom: 2px;
}

.steps {
  list-style: none;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.steps li + li {
  border-top: 1px solid var(--border);
}

.steps li::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--muted);
}

.steps li.done::before {
  background: var(--muted);
}

.steps li.current {
  color: var(--text);
  font-weight: 600;
}

.steps li.current::before {
  background: var(--text);
  border-color: var(--text);
}

@media (max-width: 600px) {
  .page-header {
    padding-top: 16px;
  }
  .overview-box {
    padding: 20px;
  }
}
