/*
 * Dipper The Dog -- site styles
 * ---------------------------------------------------------------------------
 * Palette and type sampled from the GoDaddy Websites+Marketing site this
 * replaces, so the rebuild reads as the same site:
 *
 *   accent  #ffdc58   primary buttons, wordmark, announcement bar
 *   ink     #191817   button label / body text
 *   heading #1b1b1b   Cabin 700
 *   muted   #595959   eyebrow + supporting copy (Lato, uppercase, tracked)
 *
 * One stylesheet for all ten pages. No build step: every page is a plain
 * static file, so this is the only place shared presentation lives.
 */

:root {
  --accent:   #ffdc58;
  --accent-d: #f2c92e;
  --ink:      #191817;
  --heading:  #1b1b1b;
  --muted:    #595959;
  --rule:     #e6e6e6;
  --bg:       #ffffff;
  --bg-soft:  #faf9f7;

  --sans: Lato, arial, helvetica, sans-serif;
  --display: Cabin, arial, helvetica, sans-serif;

  --wrap: 1080px;
  --wrap-narrow: 760px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }

/* Visible only to screen readers, and to keyboard users when focused. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- announce */

.announce {
  background: var(--accent);
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}
.announce a {
  display: block;
  padding: 10px 20px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.announce a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------- nav */

.site-nav { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-nav .wrap { display: flex; align-items: center; justify-content: center; }

.nav-toggle {
  display: none;
  margin: 0; padding: 14px 8px;
  background: none; border: 0; cursor: pointer;
  font: 700 14px/1 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink);
}

.nav-list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 28px;
  margin: 0; padding: 14px 0; list-style: none;
}
.nav-list a {
  display: block;
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { border-bottom-color: var(--accent); }
.nav-list a[aria-current="page"] { color: var(--accent-d); border-bottom-color: var(--accent); }

/* --------------------------------------------------------------- masthead */

.masthead { text-align: center; padding: 40px 24px 28px; }
.masthead img { margin: 0 auto; width: 458px; max-width: 90%; }
.masthead .tagline {
  font-family: var(--sans);
  margin: 14px 0 0;
  font-size: 15px; font-weight: 400;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .5em;
}

.page-title { font-size: 40px; text-align: center; margin: 8px 0 32px; }
.section-title { font-size: 32px; }
.sub-title { font-size: 22px; }

p { margin: 0 0 1.2em; }

.lead { font-size: 20px; }
.center { text-align: center; }

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

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font: 700 14px/1 var(--sans);
  letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 32px;
  border: 2px solid var(--accent);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn-outline { background: transparent; border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.btn-row {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: center; margin: 28px 0;
}

/* ------------------------------------------------------------------- hero */

.hero { padding: 8px 0 48px; text-align: center; }
.hero .lead { max-width: 560px; margin-inline: auto; }
.hero-art { width: 420px; max-width: 100%; margin: 32px auto 0; }

/* ------------------------------------------------------------ book layout */

/* Books index: one card per title. */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px 40px;
  margin: 0 0 56px;
}
.book-card { text-align: center; }
.book-card img { margin: 0 auto 20px; width: 100%; max-width: 300px; }
.book-card h2 { font-size: 22px; }
.book-card p { font-size: 16px; text-align: left; }

/* Book detail: cover beside the description. */
.book-detail {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.book-detail .cover { position: sticky; top: 24px; }
.book-detail .cover img { width: 100%; }
.book-detail .cover .btn { margin-top: 20px; width: 100%; text-align: center; }

.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 14px;
  margin-bottom: 16px;
}

/* Product details table. */
.details { border-top: 1px solid var(--rule); padding-top: 24px; }
.details dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 24px;
  margin: 0;
  font-size: 15px;
}
.details dt { font-weight: 700; color: var(--muted); }
.details dd { margin: 0; }

/* --------------------------------------------------------------- profiles */

.profile { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; margin-bottom: 56px; }
.profile img { width: 100%; border-radius: 50%; }
.profile h2 { font-size: 26px; }

.figure-center { max-width: 420px; margin: 0 auto 32px; }
.figure-center img { width: 100%; }

/* ------------------------------------------------------------ reader list */

.reader-list { background: var(--bg-soft); border-top: 1px solid var(--rule); padding: 56px 0; text-align: center; }
.reader-list h2 { font-size: 28px; text-transform: uppercase; letter-spacing: .04em; }
.reader-list p { color: var(--muted); }

.signup {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; align-items: stretch;
  max-width: 520px; margin: 24px auto 0;
}
.signup input[type="email"] {
  flex: 1 1 260px;
  font: 400 16px/1.4 var(--sans);
  padding: 14px 16px;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}
.signup input:focus-visible, .field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent-d); outline-offset: 1px;
}

/* ------------------------------------------------------------------ forms */

.field { margin-bottom: 20px; text-align: left; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font: 400 16px/1.5 var(--sans);
  padding: 12px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}
.field textarea { min-height: 150px; resize: vertical; }
.field-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.field-check input { width: auto; margin-top: 5px; }

/* Bot trap: never shown, never focusable. A real person leaves it empty. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 16px; font-size: 15px; font-weight: 700; min-height: 1.5em; }
.form-status[data-state="ok"]    { color: #1c6b34; }
.form-status[data-state="error"] { color: #a3271b; }

.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* ----------------------------------------------------------------- prose */

.prose h2 { font-size: 26px; margin-top: 40px; }
.prose h3 { font-size: 19px; margin-top: 32px; }
.prose { font-size: 16px; }
.prose a { color: #14608a; }

.affiliate-note {
  border-top: 1px solid var(--rule);
  margin-top: 48px; padding-top: 20px;
  font-size: 14px; color: var(--muted); text-align: center;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 .6em; }
.social { display: flex; gap: 20px; justify-content: center; margin: 0 0 20px; padding: 0; list-style: none; }
.social a { display: block; line-height: 0; padding: 4px; }
.social svg { width: 24px; height: 24px; fill: var(--muted); }
.social a:hover svg { fill: var(--ink); }

/* --------------------------------------------------------- cookie banner */

.cookie {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  background: #fff; border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  padding: 20px 0;
}
.cookie[hidden] { display: none; }
.cookie .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.cookie h2 { font-size: 18px; margin: 0 0 4px; }
.cookie p { margin: 0; font-size: 14px; color: var(--muted); max-width: 620px; }
.cookie .btn-row { margin: 0; flex-wrap: nowrap; }
.cookie .btn { padding: 11px 22px; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 860px) {
  .book-detail, .profile, .contact-cols { grid-template-columns: 1fr; gap: 32px; }
  .book-detail .cover { position: static; max-width: 320px; margin-inline: auto; }
  .profile img { max-width: 240px; margin-inline: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .page-title { font-size: 30px; }
  .section-title { font-size: 25px; }
  .masthead { padding: 28px 20px 20px; }

  .site-nav .wrap { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .nav-toggle { display: block; align-self: flex-start; }
  .nav-list {
    display: none;
    flex-direction: column; align-items: stretch;
    gap: 0; padding: 0 0 12px;
  }
  .nav-list.is-open { display: flex; }
  .nav-list a { padding: 11px 0; border-bottom: 1px solid var(--rule); }
  .nav-list a:hover { border-bottom-color: var(--rule); }

  .details dl { grid-template-columns: 1fr; gap: 2px; }
  .details dt { margin-top: 10px; }

  .cookie .wrap { flex-direction: column; align-items: flex-start; }
  .cookie .btn-row { width: 100%; }
  .cookie .btn { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
