/* ==========================================================================
   Natasha Logan site styles
   Layout: shared header and footer, 1100px content column.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */
:root {
  --paper: #F2F3EE;
  --panel: #E6E8E0;
  --ink: #1D2624;
  --muted: #5B6662;
  --line: #CDD2C8;
  --accent: #6E2C4B;
  --accent-ink: #FFFFFF;
  --display: "Gloock", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131917; --panel: #1C2421; --ink: #E7E9E3; --muted: #9BA59F;
    --line: #2E3834; --accent: #DE93B3; --accent-ink: #1A1014; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131917; --panel: #1C2421; --ink: #E7E9E3; --muted: #9BA59F;
  --line: #2E3834; --accent: #DE93B3; --accent-ink: #1A1014; color-scheme: dark;
}

/* Base -------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-inline: 20px; }

/* Header ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 18px; }
.wordmark { font-family: var(--display); font-size: 1.5rem; text-decoration: none; letter-spacing: 0.01em; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Type -------------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; max-width: 62ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 600; color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.page-intro { margin-bottom: 48px; }

/* Buttons and links ------------------------------------------------------- */
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 3px; }
.btn:hover { filter: brightness(1.08); }
.link { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.link:hover { color: var(--accent); }

.page { padding-block: 56px 80px; }

/* Image placeholders (swap for <img> when real photos arrive) -------------- */
.ph { aspect-ratio: 4 / 3; max-width: 100%; background: var(--p1); color: var(--p2); display: grid; place-items: center; position: relative; overflow: hidden; }
.ph::after { content: ""; position: absolute; inset: auto -15% -40% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--p2); opacity: 0.16; }
.ph span { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; opacity: 0.8; position: relative; }
.ph img, .feature img, .entry img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 4rem; color: var(--muted); object-fit: cover; border-radius: 3px; }
.portrait-cap { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* Book cover placeholder --------------------------------------------------- */
.cover {
  aspect-ratio: 2 / 3; max-width: 100%; border-radius: 2px 6px 6px 2px; padding: 12% 10%;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c1); color: var(--c2);
  box-shadow: inset 6px 0 0 rgba(0,0,0,0.18), 0 14px 30px -18px rgba(0,0,0,0.55);
  position: relative; overflow: hidden;
}
.cover::after { content: ""; position: absolute; inset: auto -20% -30% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: var(--c2); opacity: 0.14; }
.cover .t { font-family: var(--display); font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.1; position: relative; }
.cover .a { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; position: relative; }

/* Home: hero -------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 8vw, 5.6rem); }
.hero-actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.hero-portrait { width: min(360px, 100%); justify-self: end; }
.hero-portrait .portrait { object-position: right; }

/* Home: feature cards ----------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 64px; }
.feature { display: flex; flex-direction: column; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; min-width: 0; transition: transform .2s ease, border-color .2s ease; }
.feature:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.feature img.feature-cover { object-fit: contain; padding: 16px; background: var(--line); }
.feature-body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.feature-body p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.more { font-weight: 600; font-size: 0.9rem; color: var(--accent); margin-top: 6px; }
.more::after { content: " \2192"; }

/* Home: social links ------------------------------------------------------ */
.band { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
.socials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.social { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 4px 12px; padding: 20px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; min-width: 0; transition: border-color .2s ease, background-color .2s ease; }
.social:hover { border-color: var(--accent); background: var(--panel); }
.social:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.social-name { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.social-desc { grid-column: 1; font-size: 0.88rem; color: var(--muted); }
.social-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 1.3rem; color: var(--accent); transition: transform .2s ease; }
.social:hover .social-arrow { transform: translate(3px, -3px); }

/* About ------------------------------------------------------------------- */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.about .portrait { object-position: right; }
blockquote { margin: 8px 0; padding-left: 20px; border-left: 2px solid var(--accent); font-family: var(--display); font-size: 1.4rem; line-height: 1.3; max-width: 30ch; }

/* Content pages: books ---------------------------------------------------- */
.collection-intro { margin-bottom: 40px; }
.collection-intro .why { gap: 10px; }
.collection-intro .why p { max-width: none; }
.collection-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 24px; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 40px; }
.book { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.book .cover-link { display: block; text-decoration: none; transition: transform .2s ease; }
.book .cover-link:hover { transform: translateY(-4px); }
.book .cover-link img { aspect-ratio: 2 / 3; width: 100%; object-fit: cover; border-radius: 2px; box-shadow: 0 14px 30px -18px rgba(0,0,0,0.55); }
.book .meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }
.book p { color: var(--muted); font-size: 0.97rem; }
.book .link { align-self: flex-start; margin-top: auto; }

/* Content pages: skoolie ---------------------------------------------------- */
.page-intro .h1-sub { font-family: var(--body); font-weight: 500; font-size: clamp(1.3rem, 3vw, 1.8rem); color: var(--muted); margin-top: -8px; }
.page-intro .rule { width: 100%; border: none; border-top: 2px solid var(--accent); margin: 8px 0 0; }
.skoolie-story { margin-top: 40px; margin-bottom: 56px; }
.skoolie-story p { max-width: none; }
.story-meta { font-family: var(--body); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.03em; }
.section-heading { font-family: var(--body); font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 24px; }
.photo-grid { display: grid; gap: 32px; }
.photo-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
.photo { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; }
.photo img { width: 100%; border-radius: 3px; }
.photo figcaption { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--muted); }

/* Content pages: family --------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.family-section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.family-section .section-sub { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: -16px 0 24px; }
.family-pair { margin-top: 0; }
.family-pair img { height: clamp(300px, 42vw, 520px); width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.family-note { margin-top: 32px; }
.family-note p { max-width: none; }

/* Content pages: cycling -------------------------------------------------- */
/* Logo and cards stay white in both themes to match the logo's white ground */
.brand-logo { width: 180px; margin: 0 auto; border-radius: 3px; }
.photo-grid--cards { gap: 48px 64px; margin-top: 48px; }
.photo-card { background: #FFFFFF; border: 1px solid var(--line); padding: 14px 20px 18px; }
.photo-card figcaption { color: #1D2624; }
.photo-card img { height: clamp(300px, 42vw, 520px); width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; border-radius: 0; }

/* Content pages: entries (skoolie, cycling) ------------------------------- */
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.entry { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.entry .ph, .entry img { border-radius: 3px; }
.entry p { color: var(--muted); font-size: 0.97rem; }
.entry .meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em; }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 820px) {
  .hero, .band, .about, .split { grid-template-columns: 1fr; gap: 36px; }
  .hero-portrait { justify-self: start; width: min(280px, 100%); }
  .about .portrait-wrap { max-width: 280px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .features, .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .photo-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .socials { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .nav { gap: 8px 18px; }
  .features, .entry-grid, .photo-grid--3, .photo-grid--2 { grid-template-columns: 1fr; }
}

/* Motion ------------------------------------------------------------------ */
/* Page load: header, main, then footer fade in */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.site-header, main, .site-footer { animation: pageIn .9s ease both; }
main { animation-delay: .15s; }
.site-footer { animation-delay: .3s; }

/* Scroll reveal: js/main.js adds .reveal, and .pending only to items below the fold */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.reveal.pending { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  .site-header, main, .site-footer { animation: none; }
  * { transition: none !important; }
  .reveal.pending { opacity: 1; transform: none; }
}
