/* Same system as story.css and videos.css: centered column, Fraunces headings, serif body, light and dark themes. */
:root {
  --bg: #f6f4f1;
  --fg: #1d1b19;
  --muted: #5e5852;
  --line: #d9d3cb;
  --accent: #8f2d2d;
  --display: "Fraunces", Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161412;
    --fg: #ece7e1;
    --muted: #a39b92;
    --line: #38332e;
    --accent: #e08a84;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #161412;
  --fg: #ece7e1;
  --muted: #a39b92;
  --line: #38332e;
  --accent: #e08a84;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
  overflow-x: clip; /* the card slides sideways; never widen the page */
}

h1, h2 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }

/* Contact card: the original colour-cycling animation, kept as is (2 runs, 2 s each).
   The card keeps dark text because its background cycles through yellow, red, pink and green. */
.card {
  position: relative;
  width: min(320px, 100%);
  min-height: 140px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: red;
  color: #1d1b19;
  animation-name: example;
  animation-duration: 2s;
  animation-iteration-count: 2;
  animation-direction: alternate-reverse;
}

@keyframes example {
  0%   { background-color: yellow; left: 0;     top: 0; }
  25%  { background-color: red;    left: 200px; top: 0; }
  50%  { background-color: pink;   left: 200px; top: 200px; }
  75%  { background-color: green;  left: 0;     top: 200px; }
  100% { background-color: yellow; left: 0;     top: 0; }
}

.email { margin: 0; font-family: var(--display); font-size: 1.15rem; overflow-wrap: anywhere; }
.email a { color: inherit; font-weight: 600; }

.copy-btn {
  padding: 0.35rem 0.9rem;
  border: 1px solid #1d1b19;
  border-radius: 3px;
  background: transparent;
  color: #1d1b19;
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
}

.copy-btn:hover { background: rgba(255, 255, 255, 0.45); }
.copy-btn:focus-visible,
.email a:focus-visible { outline: 2px solid #1d1b19; outline-offset: 2px; }

.status { margin: 0; min-height: 1.2em; font-family: var(--mono); font-size: 0.75rem; }

.thanks {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
}

.logo { max-width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; background-color: yellow; }
}

@media print {
  .noprint { display: none; }
}
