/*
 * Inner pages (guides, support, privacy, delete account, about, vets): the homepage's look.
 * Load after styles.css, put class="page" on <body>, and add this to <head> so the reveal can start hidden:
 *   <script>document.documentElement.classList.add('js')</script>
 * Tokens (--plum, --cream, --paper, --coral-field, --coral-text, --plum-60, --hairline) live in styles.css.
 *
 * BUILDING BLOCKS
 *  Colour fields (full-bleed, straight edges)
 *    .band                       a section: padding 72/96/112. Add one colour class:
 *                                .field-cream  .field-paper  .field-plum  .field-coral
 *                                (plum and coral turn text, tag, buttons and store badge white)
 *    .photo-field                a field with a photo behind its text: put a <picture class="field-photo">
 *                                first inside it (guide heads, guide index heads, the closing field)
 *    .band-inner                 the 1240px container inside a band (20px / 24px gutters)
 *    .band-narrow                add to .band-inner for a 720px text column inside a band
 *    Alternate fields so no two neighbours share a colour (cream / paper / plum).
 *  Page head (first section of a page; the only one that holds the h1)
 *    <section class="page-head page-head-reading"> white, with a hairline (support, privacy, delete account)
 *    <section class="page-head page-head-reading photo-field"> guide article, with the photo
 *    <section class="page-head field-plum"> about (+ .page-head-slim for privacy-style pages)
 *      <div class="band-inner">
 *        <p class="tag">Eyebrow</p>
 *        <h1 class="page-title">Headline <span class="g">gradient part</span></h1>   (+ .is-long for long titles)
 *        <p class="page-sub">Lead</p>
 *      </div>
 *    </section>
 *  Section headline          <h2 class="section-title">, 36 / 48 / 60px, optional <span class="g">
 *  Body column               .prose  (720px, plum 17/1.65 text, h2 26px, h3 20px, links underlined)
 *                            inside it: .callout (tinted tile; also .guide-summary, and the dark .guide-note),
 *                            .table-wrap (also .guide-table; scrolls inside itself on phones)
 *  Cards                     <div class="cards"> with .card (also .guide-card): white, radius 24, soft shadow.
 *                            Inside: .card-label (small uppercase line), .card-title, plain <p>.
 *                            .cards is one column on phones, 2 on tablet, 3 on desktop (.cards-2 keeps it at 2)
 *  Buttons (styles.css)      .btn (plum pill) and .btn-secondary (outline); white on plum/coral fields
 *  Closing field             <section class="band closing-field field-coral" data-cta="page-closing">
 *                              <div class="band-inner"><h2 class="closing-title">..</h2>
 *                              <p class="closing-sub">..</p> <store-badge></store-badge>
 *                              <p class="closing-note">..</p></div></section>   (with .photo-field + hero photo)
 *  Download box in guides    <guide-cta> (components.js), styled here
 *  Reveal                    add data-reveal to anything that should fade and rise (needs html.js and reveal.js)
 */

/* ---------- fields ---------- */

.band {
  padding: 56px 0 64px;
  color: var(--plum);
}
.field-cream {
  background: var(--cream);
}
.field-paper {
  background: var(--paper);
}
.field-plum {
  background: var(--plum);
  color: #fff;
}
.field-coral {
  background: var(--coral-field);
  color: #fff;
}
.band-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.band-narrow {
  max-width: 760px;
}

/* ---------- page head ---------- */

.page-head {
  padding: 56px 0 64px;
}
.page-head-slim {
  padding: 56px 0 56px;
}
/* head content lines up with the 720px reading column below */
.page-head-reading .band-inner {
  max-width: 720px;
}
.page-title,
.section-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.page-title {
  max-width: 1000px;
  font-size: 40px;
}
.page-title.is-long {
  font-size: 34px;
  line-height: 1.02;
}
.section-title {
  font-size: 36px;
}
.page-sub {
  max-width: 640px;
  margin: 20px 0 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}
.page-meta {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.65;
}
.band .tag,
.page-head .tag {
  margin: 0 0 14px;
  line-height: 1.4;
}
.page-head .tag + .page-title {
  margin-top: 2px;
}

@media (min-width: 900px) {
  .band-inner {
    padding: 0 24px;
  }
  .band {
    padding: 80px 0 88px;
  }
  .page-head {
    padding: 80px 0 88px;
  }
  .page-head-slim {
    padding: 64px 0 64px;
  }
  .page-title {
    font-size: 56px;
  }
  .page-title.is-long {
    font-size: 44px;
  }
  .section-title {
    font-size: 48px;
  }
  .page-sub {
    font-size: 20px;
  }
}
@media (min-width: 1280px) {
  .band {
    padding: 96px 0 104px;
  }
  .page-head {
    padding: 96px 0 104px;
  }
  .page-head-slim {
    padding: 80px 0 80px;
  }
  .page-title {
    font-size: 68px;
  }
  .page-title.is-long {
    font-size: 54px;
  }
  .section-title {
    font-size: 60px;
  }
}

/* plain head (support, privacy, delete account): white, a hairline under it */
.page-head-reading:not(.photo-field),
.page-head-slim {
  padding: 56px 0 0;
}
.page-head-reading:not(.photo-field) .band-inner {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}
.page-head-reading:not(.photo-field) .page-sub {
  font-weight: 500;
  opacity: 0.8;
}
@media (min-width: 900px) {
  .page-head-reading:not(.photo-field) .page-title {
    font-size: 64px;
  }
}

/* ---------- photo fields: a picture behind the text, like a homepage section ---------- */

.photo-field {
  position: relative;
  overflow: hidden;
  background: #f3d2b3;
}
.photo-field > .band-inner {
  position: relative;
  z-index: 1;
}
.field-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
/* phones: the photo is a tall strip anchored to the bottom edge; --photo-drop pushes it down */
.field-photo img {
  position: absolute;
  left: 0;
  bottom: var(--photo-drop, 0);
  width: 100%;
  height: auto;
  max-width: none;
}

/* head of a guide article and of a guide index: text on top, the cat rises from the bottom edge */
.page-head.photo-field {
  --photo-drop: -46vw;
  padding: 40px 0 74vw;
}
.page-head.photo-field .page-title {
  max-width: 15em;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.page-head.photo-field .page-sub {
  max-width: 34em;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.85;
}
.page-head.photo-field .page-meta {
  opacity: 0.6;
}
.page-head.photo-field .tag {
  background: rgba(42, 18, 38, 0.08);
}
@media (min-width: 900px) {
  .field-photo img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
  }
  .page-head.photo-field {
    display: flex;
    align-items: center;
    min-height: 440px;
    padding: 0;
  }
  .page-head-reading.photo-field {
    min-height: 520px;
  }
  .page-head.photo-field .band-inner {
    width: 100%;
    max-width: 1240px;
  }
  .page-head.photo-field .band-inner > * {
    max-width: 600px;
  }
  .page-head.photo-field .page-title {
    font-size: 60px;
  }
  .page-head.photo-field .page-sub {
    font-size: 20px;
  }
}
@media (min-width: 1280px) {
  .page-head.photo-field .band-inner {
    max-width: 1320px;
  }
}

/* ---------- body column ---------- */

.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 72px;
  color: var(--plum);
  font-size: 18px;
  line-height: 1.7;
}
.prose h2 {
  margin: 48px 0 14px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.prose h3 {
  margin: 28px 0 8px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose li {
  color: var(--plum);
  font-size: 18px;
  line-height: 1.7;
}
.prose p {
  margin: 0 0 18px;
}
.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}
.prose li {
  margin-bottom: 10px;
}
.prose li::marker {
  font-weight: 800;
  color: var(--plum);
}
.prose strong {
  font-weight: 700;
}
.prose a:not(.store-badge):not(.btn) {
  color: var(--plum);
  text-decoration: underline;
  text-decoration-color: #ee5275;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .prose {
    padding: 64px 24px 96px;
  }
  .prose h2 {
    margin-top: 56px;
    font-size: 34px;
    line-height: 40px;
  }
}

/* callouts: a tinted tile; the summary is a set of tiles, the note a dark block */
.callout,
.guide-summary li {
  border-radius: 20px;
  background: #fff4ea;
}
.callout {
  margin: 0 0 28px;
  padding: 20px 22px;
}
.callout > :last-child {
  margin-bottom: 0;
}

.guide-summary {
  margin: 0 0 28px;
}
.guide-summary p:first-child {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--plum-60);
}
.guide-summary ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: summary;
}
.guide-summary li {
  margin: 0;
  padding: 20px 22px;
  counter-increment: summary;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}
.guide-summary li::before {
  content: counter(summary);
  display: block;
  margin-bottom: 10px;
  background: var(--coral-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}
@media (min-width: 900px) {
  .guide-summary ol {
    grid-template-columns: 1fr 1fr;
  }
}

.guide-note {
  margin: 28px 0;
  padding: 26px 28px;
  border-radius: 24px;
  background: var(--plum);
}
.prose .guide-note,
.prose .guide-note :is(p, li, a) {
  color: #fff;
  font-size: 19px;
  line-height: 1.5;
}
.guide-note > :last-child {
  margin-bottom: 0;
}
.guide-note strong {
  background: var(--coral-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* tables: no card, hairline rows; they scroll inside their own wrapper, the page never scrolls sideways */
.table-wrap,
.guide-table {
  max-width: 100%;
  margin: 0 0 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table,
.guide-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}
.table-wrap th,
.table-wrap td,
.guide-table th,
.guide-table td {
  padding: 14px 16px 14px 0;
  text-align: left;
  border-bottom: 1px solid var(--hairline);
}
.table-wrap th,
.guide-table th {
  padding-top: 0;
  border-bottom: 2px solid var(--plum);
  color: var(--plum-60);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.table-wrap td:last-child,
.guide-table td:last-child {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table-wrap:focus-visible,
.guide-table:focus-visible {
  outline: 3px solid #8b5cf6;
  outline-offset: 2px;
}

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

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.card,
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(42, 18, 38, 0.08);
  color: var(--plum);
  text-decoration: none;
}
.card-label,
.guide-card .eyebrow {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--plum-60);
}
.card-title,
.card h2,
.card h3,
.guide-card h2,
.guide-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.card p,
.guide-card p:not(.eyebrow) {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}
@media (min-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1280px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards.cards-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- closing field: the homepage hero photo, text on top ---------- */

.closing-field.photo-field {
  --photo-drop: 0px;
  padding: 64px 0 100vw;
  background: #e9655a;
}
.closing-title {
  margin: 0;
  max-width: 780px;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}
.closing-sub {
  margin: 16px 0 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}
.closing-field store-badge {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}
.closing-note {
  margin: 16px 0 0;
  font-size: 13.5px;
  font-weight: 700;
}
@media (min-width: 900px) {
  .closing-field.photo-field {
    display: flex;
    align-items: center;
    min-height: 640px;
    padding: 0;
  }
  .closing-field .band-inner {
    width: 100%;
  }
  .closing-title {
    font-size: 76px;
  }
  .closing-sub {
    font-size: 24px;
  }
}

/* ---------- reveal: fade and rise, only when JS runs ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--page-ease), transform 0.6s var(--page-ease);
}
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Tablet (900–1279px): the photo takes a larger share of the head, so keep the text clear of the cat. */
@media (min-width: 900px) and (max-width: 1279px) {
  .page-head.photo-field .band-inner > * {
    max-width: 46%;
  }
  .page-head.photo-field .page-title {
    font-size: 44px;
  }
}
