/* Grandma Picton Stories. Colours and fonts carried over from the 2020
   WordPress/Astra site so it looks the same; everything here is static. */

@font-face { font-family: 'Amethysta'; font-weight: 400; font-display: swap; src: url('../fonts/amethysta-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-weight: 400; font-display: swap; src: url('../fonts/lato-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-weight: 700; font-display: swap; src: url('../fonts/lato-700.woff2') format('woff2'); }

:root {
  --pink: #f14e78;
  --pink-deep: #f23766;
  --magenta: #d831a6;
  --text: #54595f;
  --text-strong: #32373c;
  --blush: #fff7fa;        /* the old site's rgba(255,132,179,0.05) on white */
  --blush-edge: #f6dbe5;
  --cover-pink: #f2d6de;
  --white: #ffffff;
  --radius: 14px;
  --gutter: 16px;
  --max: 1080px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 1.0625rem/1.7 'Lato', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { color: var(--text-strong); line-height: 1.25; margin: 0 0 0.6em; }
h1, h2 { font-family: 'Amethysta', Georgia, serif; font-weight: 400; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

a { color: var(--pink-deep); text-underline-offset: 3px; }
a:hover { color: var(--magenta); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 10; }
.skip-link:focus { left: 8px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ── Header ── */

.site-header { background: var(--white); border-bottom: 1px solid var(--blush-edge); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-strong); }
.brand img { width: 44px; height: 55px; }
.brand span { font-family: 'Amethysta', Georgia, serif; font-size: 1.2rem; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--pink-deep); }

/* Home page: header sits transparent over the hero photo (as on the old
   site), so the meadow runs full bleed to the top of the screen. */
.site-header.overlay {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0));
  border-bottom: 0;
}
.site-header.overlay .brand,
.site-header.overlay .site-nav a { color: var(--white); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.site-header.overlay .site-nav a:hover { color: #ffd1e0; }
.site-header.overlay .brand img { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.45)); }

/* ── Hero: meadow photo with the old site's 20% dark overlay ── */

.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  /* extra top padding clears the overlaid header (taller when it wraps on phones) */
  padding: calc(clamp(72px, 14vw, 150px) + 70px) 0 clamp(72px, 14vw, 150px);
  background: #6b6f4a url('../img/meadow-960.webp') center / cover no-repeat;
}
@media (min-width: 961px) { .hero { background-image: url('../img/meadow-1920.webp'); } }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); }
.hero .wrap { position: relative; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: 0.3em; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.3rem); font-style: italic; max-width: 36em; margin: 0 auto 1.8em; text-shadow: 0 1px 8px rgba(0,0,0,0.45); }

.button {
  display: inline-block;
  background: var(--magenta);
  color: var(--white);
  padding: 14px 34px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s;
}
.button:hover { background: var(--text); color: var(--white); }
.button.secondary { background: transparent; color: var(--magenta); box-shadow: inset 0 0 0 2px var(--magenta); }
.button.secondary:hover { background: var(--magenta); color: var(--white); }

/* ── Sections ── */

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section.blush { background: var(--blush); border-block: 1px solid var(--blush-edge); }
.section-title { text-align: center; margin-bottom: 1.4em; }
.section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin: 14px auto 0;
  background: var(--pink);
  border-radius: 3px;
}

/* Author */
.author { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.author img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(84, 89, 95, 0.18); }
@media (max-width: 720px) {
  .author { grid-template-columns: 1fr; }
  .author img { max-width: 260px; margin-inline: auto; }
}

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(24px, 4vw, 40px); }
.book {
  background: var(--white);
  border: 1px solid var(--blush-edge);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
}
.book img { border-radius: 6px; box-shadow: 0 6px 18px rgba(84, 89, 95, 0.2); }
.kicker { color: var(--pink-deep); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
.book h3 { margin-bottom: 0.4em; }
.book h3 a { color: inherit; text-decoration: none; }
.book h3 a:hover { color: var(--pink-deep); }
.book .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.book .button { padding: 11px 24px; }
@media (max-width: 460px) {
  .book { grid-template-columns: 1fr; }
  .book img { max-width: 170px; }
}

.price { font-weight: 700; color: var(--text-strong); }
.note { font-size: 0.9rem; color: #7a7e83; }

/* The Fae */
.fae { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; text-align: center; }
.fae figure { margin: 0; }
.fae img { width: 180px; height: 180px; margin: 0 auto 16px; border-radius: 50%; box-shadow: 0 0 0 6px var(--white), 0 0 0 8px var(--blush-edge); }
.fae figcaption { font-style: italic; }

/* Dedication */
.dedication { text-align: center; max-width: 40em; margin-inline: auto; }
.dedication .heart { color: var(--pink); font-size: 1.6rem; display: block; margin-bottom: 8px; }

/* Grandchildren photo behind the dedication, darkened like the old site's
   44% overlay so the white text stays readable. */
.section.grandchildren {
  position: relative;
  color: var(--white);
  padding: clamp(110px, 18vw, 200px) 0;
  background: #5a4632 url('../img/grandchildren-720.webp') center 30% / cover no-repeat;
}
@media (min-width: 721px) { .section.grandchildren { background-image: url('../img/grandchildren-1080.webp'); } }
.section.grandchildren::before { content: ''; position: absolute; inset: 0; background: rgba(38, 38, 38, 0.44); }
.section.grandchildren .wrap { position: relative; }
.section.grandchildren h2 { color: var(--white); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
.section.grandchildren p { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55); font-size: 1.1rem; }
.section.grandchildren .heart { color: #ffd1e0; }

/* Book page */
.book-page { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.book-page .cover img { border-radius: 8px; box-shadow: 0 14px 36px rgba(84, 89, 95, 0.22); }
.book-page .buy { margin: 1.6em 0 0.6em; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.book-page .price { font-size: 1.5rem; }
@media (max-width: 760px) {
  .book-page { grid-template-columns: 1fr; }
  .book-page .cover img { max-width: 300px; margin-inline: auto; }
}
.breadcrumb { font-size: 0.9rem; margin-bottom: 1.2em; }
.book-page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.book-page h2 { font-size: 1.4rem; margin-top: 1.8em; }
.excerpt { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--pink); font-style: italic; }
.read-on { margin-top: 1.8em; }

/* Plain text pages */
.prose { max-width: 42em; margin-inline: auto; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }

/* ── Footer ── */

.site-footer { background: var(--text-strong); color: #d9dbde; padding: 36px 0; font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--white); }
.lost { width: 180px; height: 180px; margin: 0 auto 16px; border-radius: 50%; }
.button.disabled { background: #e7e3e5; color: #7a7e83; cursor: default; }
.button.disabled:hover { background: #e7e3e5; color: #7a7e83; }
