/*
 * Pet Roaster — the whole site's styles.
 *
 * One stylesheet, no framework, no build step. Mobile-first: the base rules are
 * the phone layout and the media queries only ever widen things, because most
 * people who reach a privacy link are on a phone and should not pay to download
 * a desktop layout first.
 *
 * Structure mirrors the app itself — Electric Grape field, Bone cards, Plum Ink
 * text, 2px ink outlines and hard offset shadows, the same sticker idiom as the
 * logo art.
 */

:root {
  --grape: #6a33d6; /* Electric Grape — page field, as in the app */
  --ink: #1e1636; /* Plum Ink — text and every outline */
  --bone: #f6eedd; /* Bone — cards */
  --coral: #ff5a36; /* Roast Coral — accents ONLY, see note below */
  --gold: #f5b22b; /* Certified Gold — highlight */

  /*
   * The logo PNG has its background baked in and it is NOT --bone: it is a
   * warmer #fcf1e5. Sitting it on a Bone card would show a faint rectangle
   * where the two nearly-match, so the hero card is painted the logo's own
   * colour and the seam disappears. Sampled from the source, not guessed.
   */
  --logo-bone: #fcf1e5;

  --shadow: 4px 4px 0 var(--ink);
  --radius-card: 24px;
  --radius-panel: 16px;

  /*
   * Roast Coral on Bone is 2.7:1 and on Grape 2.2:1 — under the 4.5:1 floor for
   * body text either way. It is therefore used only for rules, borders and
   * large display type, never for anything you have to actually read at size.
   * Bone on Grape is 5.95:1 and Ink on Bone is ~17:1, so all real text is one
   * of those two pairs.
   */
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grape);
  color: var(--bone);
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Long-form legal text is easier to scan ragged-right on a narrow screen. */
  text-wrap: pretty;
}

/* Keyboard users get to skip the header on every page. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bone);
  color: var(--ink);
  padding: 0.75rem 1rem;
  font-weight: 800;
  border-radius: 0 0 var(--radius-panel) 0;
  z-index: 10;
}
.skip:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 0;
}

/* ---- header ---------------------------------------------------------- */

.site-header {
  padding-top: 0.5rem;
}

/* The hero: logo on its own field so the baked background has nothing to
   clash with. Only the landing page uses this. */
.hero {
  background: var(--logo-bone);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1rem;
  text-align: center;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sub-pages get the small mark as a link home, not the full hero. */
.mark {
  display: inline-block;
  background: var(--logo-bone);
  border: 2px solid var(--ink);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow);
  padding: 0.5rem 0.6rem;
  line-height: 0;
}
.mark img {
  display: block;
  width: 190px;
  max-width: 100%;
  height: auto;
}
.mark:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.tagline {
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--bone);
}

/* ---- type ------------------------------------------------------------ */

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 900;
}

h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-top: 2rem;
}

/* Sub-headings inside a section — the support page's individual questions.
   Ink rather than Grape so the h2 above them still reads as the level up. */
h3 {
  font-size: 1.0625rem;
  font-weight: 900;
  margin-top: 1.5rem;
}

/* Card interiors are Ink on Bone; headings inside them pick up the accent. */
.card h2 {
  color: var(--grape);
}
.card h2:first-child,
.card h1:first-child {
  margin-top: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.card a {
  color: var(--grape);
  font-weight: 700;
}
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Small all-caps label, the app's idiom. Ink not Coral — see the contrast note. */
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--grape);
  margin-bottom: 0.35rem;
}

.updated {
  font-size: 0.875rem;
  font-weight: 700;
  opacity: 0.85;
}

/* ---- cards ----------------------------------------------------------- */

.card {
  background: var(--bone);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.card ul,
.card ol {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}
.card li {
  margin-bottom: 0.5rem;
}

/* A short highlighted aside — the one place Coral earns its keep as a rule. */
.note {
  border-left: 4px solid var(--coral);
  padding-left: 0.9rem;
  margin: 1.25rem 0;
}

/* Certified Gold on Plum Ink is 9.2:1 — safe, and it pops. */
.badge {
  display: inline-block;
  background: var(--ink);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

/* ---- buttons --------------------------------------------------------- */

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: block;
  text-align: center;
  background: var(--bone);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
  /* 48px min target — thumbs, not cursors. */
  padding: 0.85rem 1.25rem;
  min-height: 48px;
}
.btn--accent {
  background: var(--coral);
  /* Ink on Coral is 5.8:1, so this one is safe as a filled button. */
  color: var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---- footer ---------------------------------------------------------- */

.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 2px solid rgba(246, 238, 221, 0.35);
  font-size: 0.9375rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 0.75rem;
}
.site-footer a {
  font-weight: 800;
}
.site-footer p {
  margin: 0;
  opacity: 0.85;
}

/* ---- wider screens --------------------------------------------------- */

@media (min-width: 44rem) {
  body {
    font-size: 1.125rem;
  }
  .wrap {
    padding: 2rem 1.5rem 0;
  }
  h1 {
    font-size: 2.5rem;
  }
  .hero {
    padding: 1.5rem;
  }
  .card {
    padding: 2rem;
  }
  .tagline {
    font-size: 1.5rem;
  }
  /* Side by side once there is room; stacked full-width below. */
  .actions {
    flex-direction: row;
  }
  .actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:active {
    transform: none;
  }
}
