/* =====================================================================
   Paul Bucks — paulbucks.com
   Rebuilt stylesheet — matched to the live site
   Type: Instrument Serif (display) + Newsreader (text)
   ===================================================================== */

/* ----------------------------- Tokens ------------------------------- */
:root {
  --paper:      #f1f1ef;   /* light warm grey — alternating sections */
  --white:      #ffffff;
  --ink:        #0c0b0a;   /* near-black text */
  --ink-soft:   #4f4e4a;   /* muted text */
  --ink-faint:  #87857f;   /* very muted / notes */
  --card:       #eceae4;   /* contact form card */
  --line:       #0c0b0a;   /* button + input borders */
  --line-soft:  #c9c7c0;

  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --text:    'Newsreader', Georgia, 'Times New Roman', serif;

  --wrap:        1140px;
  --wrap-text:   720px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;       /* ~17px */
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--ink);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* --------------------------- Utilities ------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  position: relative;
  padding: 116px 0;
}
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }

.center { text-align: center; }

.eyebrow {
  font-family: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1.4em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  z-index: 2000;
}
.skip-link:focus { left: 0; }

/* ------------------------- Display sizes ---------------------------- */
.display-xl {            /* hero headline */
  font-size: clamp(2.7rem, 6vw, 3.85rem);
  line-height: 1.04;
}
.display-lg {            /* large serif statements */
  font-size: clamp(1.8rem, 3.6vw, 2.45rem);
  line-height: 1.16;
}
.display-md {            /* section headings */
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.16;
}

/* --------------------------- Buttons -------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--text);
  font-size: 1.02rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 15px 30px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover {
  background: var(--ink);
  color: var(--white);
}
.btn-lg { padding: 18px 38px; font-size: 1.08rem; }
.btn-sm { padding: 11px 22px; font-size: 0.96rem; }

.text-link {
  display: inline-block;
  font-size: 1rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.2s var(--ease);
}
.text-link:hover { opacity: 0.6; }

/* --------------------------- Header --------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease),
              padding 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: var(--white);
  box-shadow: 0 1px 14px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-logo {
  height: 50px;
  width: auto;
  transition: height 0.3s var(--ease);
}
.is-scrolled .brand-logo { height: 42px; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-family: var(--text);
  font-size: 1.02rem;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.nav-link:hover,
.nav-link.is-active { border-color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  padding: 9px;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--line-soft);
  padding: 8px 40px 22px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  font-family: var(--text);
  font-size: 1.1rem;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:last-child { border-bottom: none; }

/* --------------------------- Curved waves --------------------------- */
.wave {
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;
  height: 72px;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
}
.wave svg { width: 100%; height: 100%; display: block; }
.wave--white path { fill: var(--white); }
.wave--paper path { fill: var(--paper); }

/* ----------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 150px 0 120px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/hero-beach.jpg');
  background-size: cover;
  background-position: center 58%;
  background-color: #cdd6d4;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.12) 100%);
}
.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 1020px;
  padding: 0 28px;
}
.hero-title {
  color: var(--ink);
  margin-bottom: 0.32em;
}
.hero-sub {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 auto 1.5em;
  max-width: 640px;
}
.hero-actions { margin-top: 0.4em; }
.hero-note { margin-top: 1.4em; }
.hero-note .text-link { font-family: var(--display); font-size: 1.18rem; }

/* ----------------------- Message / Key ------------------------------ */
.message-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.message-figure { text-align: center; }
.message-figure img {
  max-width: 300px;
  width: 100%;
  margin: 0 auto;
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.22));
}
.message-text .display-md { margin-bottom: 0.7em; }
.message-text p {
  color: var(--ink-soft);
  margin-bottom: 1em;
}

/* ----------------------------- Books -------------------------------- */
.books-heading {
  max-width: 760px;
  margin: 0 auto 56px;
}
.carousel { position: relative; }
.carousel-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.carousel-track::-webkit-scrollbar { display: none; }

.book-card {
  flex: 0 0 auto;
  width: clamp(210px, 24vw, 290px);
  scroll-snap-align: center;
  display: block;
  transition: opacity 0.25s var(--ease);
}
.book-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 2560;
  object-fit: cover;
  background: var(--paper);
}
.book-card:hover { opacity: 0.86; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.1rem;
  z-index: 5;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.carousel-btn:hover { background: var(--ink); color: var(--white); }
.carousel-btn--prev { left: 14px; }
.carousel-btn--next { right: 14px; }
.carousel-btn svg { width: 20px; height: 20px; }

.books-footer {
  max-width: 800px;
  margin: 58px auto 0;
  text-align: center;
}
.books-blurb { margin-bottom: 1.5em; }

/* --------------------------- Newsletter ----------------------------- */
.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-sub {
  color: var(--ink-soft);
  margin: 0 auto 2.4em;
  max-width: 520px;
}

/* ----------------------------- Forms -------------------------------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.field { margin-bottom: 24px; text-align: left; }
.field label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 7px;
}
.field .req { color: var(--ink-faint); font-size: 0.85rem; }

/* boxed inputs (newsletter) */
.field input,
.field textarea {
  width: 100%;
  font-family: var(--text);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 13px 15px;
  transition: border-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--ink); }
.field input.is-invalid,
.field textarea.is-invalid { border-color: #b23b2a; }

/* underline inputs (contact) */
.form--underline .field input,
.form--underline .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-soft);
  padding: 9px 2px;
}
.form--underline .field input:focus,
.form--underline .field textarea:focus { border-bottom-color: var(--ink); }
.form--underline .field input.is-invalid,
.form--underline .field textarea.is-invalid { border-bottom-color: #b23b2a; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.form-note {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-top: 16px;
}
.form-status {
  font-size: 1rem;
  margin-top: 16px;
  min-height: 1.4em;
}
.form-status.is-success { color: #2f6d3f; }
.form-status.is-error { color: #b23b2a; }
.newsletter-form .btn { margin-top: 6px; }

/* -------------------------- About section --------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: start;
}
.about-grid .display-lg { margin: 0; }
.about-text p {
  color: var(--ink);
  margin-bottom: 1.1em;
  text-align: justify;
}

/* ---------------------------- CTA band ------------------------------ */
.cta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-grid .display-md { margin: 0; max-width: 620px; }

/* --------------------------- Contact page --------------------------- */
.contact-head {
  padding: 180px 0 36px;
  background: var(--white);
}
.contact-head .display-xl { margin-bottom: 0.3em; }
.contact-intro {
  color: var(--ink-soft);
  max-width: 380px;
  margin: 0;
}
.contact-body {
  background: var(--white);
  padding: 26px 0 120px;
  position: relative;
}
.contact-card {
  background: var(--card);
  border-radius: 10px;
  padding: 54px 60px;
  max-width: 880px;
}
.contact-card .form-inner { max-width: 560px; }
.contact-card .group-label {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ---------------------------- Footer -------------------------------- */
.site-footer {
  background: var(--paper);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.copyright {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.footer-links a:hover { color: var(--ink); }

/* --------------------------- Animations ----------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .carousel-track { scroll-behavior: auto; }
}

/* --------------------------- Responsive ----------------------------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .section { padding: 84px 0; }
  .message-grid { grid-template-columns: 1fr; gap: 30px; }
  .message-figure img { max-width: 210px; }
  .message-text { text-align: center; }
  .about-grid { grid-template-columns: 1fr; gap: 14px; }
  .cta-grid { flex-direction: column; align-items: flex-start; }
  .contact-card { padding: 40px 34px; }
}

@media (max-width: 600px) {
  body { font-size: 1.02rem; }
  .wrap { padding: 0 24px; }
  .section { padding: 66px 0; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .contact-head { padding: 138px 0 28px; }
  .contact-card { padding: 32px 22px; }
  .wave { height: 46px; }
  .carousel-btn { width: 44px; height: 44px; }
}
