/* Shared masthead and reading typography. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source_sans_3_regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source_sans_3_semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("/fonts/fraunces_144pt_semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #fbffff;
  --gray-6: #d7d8df;
  --gray-11: #60626b;
  --gray-12: #1e1f24;
  --brand-3: #e2f3fe;
  --brand-7: #90c6e7;
  --brand-11: #2075a0;
  --brand-12: #1c3b4c;
  --warm-9: #e67e22;
  --foreground: var(--gray-12);
  --muted-foreground: var(--gray-11);
  --border: var(--gray-6);
  --primary: var(--brand-11);
  --primary-foreground: var(--background);
  --primary-hover: var(--brand-12);
  --ring: var(--brand-11);
  --space-small: 0.5rem;
  --space-content: 1rem;
  --space-section: 1.5rem;
  --space-page: 3rem;
  --text-body: 1.125rem;
  --text-section: 1.5rem;
  --text-title: 2rem;
  --text-brand: 3rem;
  --target-min: 2.75rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: var(--text-body);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.page {
  width: min(100% - 3rem, 45rem);
  margin-inline: auto;
}

header {
  padding-block: 2rem var(--space-section);
  border-bottom: 1px solid var(--border);
}

/* App header ratios, on the cropped mark. The same gap sits left of the P and before the word, and the tagline starts on the left edge. */
.brand {
  --lockup-gap: calc(8em / 30);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  font-size: var(--text-brand);
  color: var(--foreground);
  text-decoration: none;
}

.brand:hover {
  color: var(--foreground);
}

.brand img {
  grid-column: 2;
  grid-row: 1;
  display: block;
  width: auto;
  /* Height is the ink inside the old 36/30 tile (146 of 180), so the P stays the same size. */
  height: calc(36em / 30 * 146 / 180);
  margin-top: calc(2em / 30 + 36em / 30 * 17 / 180);
  margin-right: var(--lockup-gap);
}

.brand-lockup {
  display: grid;
  grid-template-columns: var(--lockup-gap) max-content max-content;
  align-items: start;
  column-gap: 0;
}

.brand-name {
  grid-column: 3;
  grid-row: 1;
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.25;
}

.brand-tagline {
  color: var(--muted-foreground);
  font-size: calc(12em / 30);
  line-height: calc(16 / 12);
}

main {
  max-width: 40rem;
  padding-block: 2.5rem var(--space-page);
}

h1,
h2 {
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  font-size: var(--text-title);
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-section);
}

/* Keep the single warm signature vertical beside the first line of the page title. */
h1::before {
  content: "";
  flex: 0 0 0.25rem;
  height: 0.85em;
  margin-block-start: 0.12em;
  border-radius: 0.25rem;
  background: var(--warm-9);
}

h2 {
  font-size: var(--text-section);
  margin: 2rem 0 var(--space-content);
}

.legal-document h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: var(--space-section) 0 var(--space-content);
}

.legal-notice {
  font-size: 1.25rem;
  line-height: 1.5;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.cards li,
.cards li + li {
  margin: 0;
}

.cards li {
  padding: 1.25rem 1.25rem 1.125rem;
  border: 1px solid var(--brand-7);
  border-radius: 0.75rem;
  background: var(--brand-3);
}

.cards h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  /* A one-line title still holds a second line so the card bodies start together. */
  min-height: 2lh;
}

.cards p {
  margin: 0;
}

.introduction {
  padding-block-end: 0;
}

.content-section {
  margin-block-start: 2.5rem;
}

.content-section h2 {
  margin-block-start: 0;
}

.introduction p:last-child,
.content-section p:last-child {
  margin-block-end: 0;
}

.invitation {
  padding-block-start: var(--space-section);
}

.preview {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.5;
  margin-block-end: 0;
}

p,
ul {
  margin: 0 0 var(--space-content);
}

.puppy {
  margin-block: 0.35rem 0.85rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

ul {
  padding-inline-start: var(--space-section);
}

li + li {
  margin-block-start: var(--space-small);
}

a {
  color: var(--brand-11);
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
  -webkit-text-decoration: none;
}

a:hover,
a:active {
  color: var(--brand-12);
}

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

.skip-link {
  position: absolute;
  left: var(--space-content);
  top: -10rem;
  padding: var(--space-small) var(--space-content);
  background: var(--background);
}

.skip-link:focus {
  top: var(--space-small);
}

.draft-note {
  color: var(--muted-foreground);
}

.app-link {
  display: inline-block;
  min-height: var(--target-min);
  padding: var(--space-small) var(--space-content);
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 0.625rem;
  text-decoration: none;
}

.app-link:hover {
  background: var(--primary-hover);
  color: var(--primary-foreground);
}

.app-link[hidden] {
  display: none;
}

footer {
  padding-block: var(--space-section) 2rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
}

footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 0.75rem;
}

.footer-sep {
  color: var(--muted-foreground);
  line-height: 1;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
}

.copyright {
  margin: 0.25rem 0 0;
  color: var(--foreground);
}

@media (min-width: 48rem) {
  :root {
    --text-brand: 3.5rem;
  }

  header {
    padding-block-start: var(--space-page);
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  main {
    padding-block-start: var(--space-page);
  }
}

@media print {
  .skip-link,
  .app-link {
    display: none;
  }

  .page {
    width: auto;
  }
}
