/* lff-website: styles
   Mirrors the existing Squarespace site (measured from Firefox screenshots of the live site):
   white page, light Garamond-style serif, logo banner left / nav right, gray footer with logo + links.
   The original uses Adobe's Garamond Premier Pro Display (licensed through Squarespace);
   Cormorant Garamond is the self-hosted stand-in. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/CormorantGaramond-italic.woff2") format("woff2");
}

:root {
  --white: #fff;
  --light: #dcdcdc; /* footer background, sampled from the live site */
  --dark: #1c1c1c;
  --black: #000;
  --font: "Cormorant Garamond", "Garamond", "EB Garamond", Georgia, serif;
  --edge: 4vw;                      /* header side padding */
  --content: min(68vw, 1300px);     /* main text column on the live site is ~68% of the window */
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-weight: 450;
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.6rem);
  line-height: 1.85;
  letter-spacing: -0.005em;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--dark); color: var(--white); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header { background: var(--white); }
.header-inner {
  padding: 1.65rem var(--edge) 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
}
.site-title img { width: clamp(250px, 31.6vw, 702px); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1.25rem, 2.1vw, 2.6rem); }
.site-nav a {
  text-decoration: none; font-size: 0.88em; padding: 0.1em 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* hamburger button: only shown on small screens */
.nav-toggle { display: none; background: none; border: 0; padding: 0; width: 44px; height: 44px; color: inherit; cursor: pointer; }
.bars { position: relative; display: block; width: 30px; height: 14px; margin-left: auto; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.2s, top 0.2s, bottom 0.2s; }
.bars::before { top: 0; }
.bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .bars::before { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { bottom: 6px; transform: rotate(-45deg); }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-weight: 400; letter-spacing: -0.025em; line-height: 1.2; margin: 0 0 0.7em; }
h3 { font-size: clamp(1.7rem, 1.15rem + 1.4vw, 2.6rem); line-height: 1.2; }
h4 { font-size: 1.5em; }
p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1.25em; padding-left: 1.25em; }
.prose li { margin-bottom: 0.6em; }
.prose li > p { margin: 0; }

/* The main column is the same width on every page, like the live site. */
.page, .hero-inner { width: var(--content); margin: 0 auto; }
.page { padding: 0.75rem 0 clamp(3rem, 6vw, 6rem); }

/* ---------- buttons (contact form) ---------- */
.button {
  display: inline-block; background: var(--dark); color: var(--white); text-decoration: none;
  padding: 0.7em 1.6em; font-family: inherit; font-size: 1em; font-weight: 500; border: 1px solid var(--dark);
  cursor: pointer; letter-spacing: 0.02em;
}
.button:hover { background: var(--black); }

/* ---------- home ---------- */
.hero { padding: 0.75rem 0 clamp(3rem, 6vw, 6rem); }
.hero-inner { display: flow-root; }
.hero-cover { float: left; width: 48.4%; margin: 0 2.4% 1rem 0; }
.hero-cover img { width: 100%; }
.hero .prose h3 { text-align: center; }

/* ---------- about the book ---------- */
.about-book > section { margin-top: 3.5rem; scroll-margin-top: 1rem; }
.jump { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1.5rem 0 1.25rem; font-size: 0.8em; }
.float-cover { float: right; width: 48%; margin: 0 0 1rem 1rem; }
.about-book .prose::after { content: ""; display: block; clear: both; }
.blurbs p { margin-bottom: 1.4em; }
.awards { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: 2rem 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.awards li { text-align: center; font-size: 0.95em; line-height: 1.3; }
.awards img { width: 100%; max-width: 190px; margin: 0 auto 0.75rem; }

/* ---------- purchase ---------- */
.suppliers { list-style: none; padding: 0; display: grid; gap: 0.75rem; max-width: 22rem; }
.suppliers a {
  display: block; padding: 0.7em 1.2em; border: 1px solid var(--dark); text-decoration: none; font-weight: 700; text-align: center;
}
.suppliers a:hover { background: var(--dark); color: var(--white); }

/* ---------- author ---------- */
.author-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.author-photo { margin: 0; }
.author-photo img { width: 100%; }

/* ---------- blogs: plain bulleted list, as on the live site ---------- */
.blog-index { width: min(82vw, 1500px); padding-top: clamp(3rem, 7vw, 7rem); padding-bottom: clamp(4rem, 10vw, 10rem); }
.post-list { margin: 0; padding-left: 1.4em; list-style: disc; }
.post-list li { margin-bottom: 1.1rem; line-height: 1.7; }
.post-list h3 { font-size: 1.3em; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.post-list p { margin: 0; }
.post h4 { font-style: italic; }
.back { margin-top: 3rem; }

/* ---------- contact ---------- */
.contact {
  width: auto; max-width: none; min-height: 70vh; display: grid; place-items: center;
  background-size: cover; background-position: center;
}
.contact-card { width: min(100%, 38rem); background: rgba(255, 255, 255, 0.9); padding: clamp(1.5rem, 4vw, 2.75rem); }
.contact form { display: grid; gap: 1.1rem; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.contact label { display: grid; gap: 0.3rem; font-size: 0.95em; }
.contact .hint { opacity: 0.7; font-size: 0.9em; }
.contact input, .contact textarea { font: inherit; padding: 0.55em 0.7em; border: 1px solid var(--dark); background: var(--white); border-radius: 0; width: 100%; }
.contact input:focus, .contact textarea:focus, .button:focus-visible, a:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
.contact .button { justify-self: start; }
.hp { position: absolute; left: -9999px; }

/* ---------- footer: gray bar, logo then links in one row ---------- */
.site-footer { background: var(--light); padding: 1rem 8vw clamp(3rem, 8vw, 8rem); }
.footer-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem clamp(1.5rem, 3.2vw, 3.5rem); }
.footer-logo img { width: clamp(220px, 22.4vw, 535px); }
.footer-nav { display: flex; flex: 1 1 20rem; flex-wrap: wrap; gap: 0.5rem clamp(1rem, 1.8vw, 2.25rem); }
.footer-nav a { text-decoration: none; font-size: 0.88em; }
.footer-nav a:hover { text-decoration: underline; }

/* ---------- small screens ---------- */
@media (max-width: 800px) {
  :root { --content: 84vw; --edge: 6vw; }
  .blog-index { width: 88vw; }
  .header-inner { flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 0.75rem; }
  .site-title img { width: clamp(200px, 68vw, 420px); }
  .js .nav-toggle { display: block; }
  .site-nav { flex-basis: 100%; justify-content: center; gap: 0.25rem 1.25rem; padding-top: 0.5rem; }
  .site-nav a { font-size: 1em; }
  .js .site-nav { display: none; flex-direction: column; align-items: center; gap: 0; padding: 0.5rem 0 1rem; }
  .js .site-nav a { padding: 0.5em 0; font-size: 1.15em; }
  .js .nav-open .site-nav { display: flex; }
  .hero-cover { float: none; width: 100%; margin: 0 0 1.25rem; }
  .author-layout { grid-template-columns: 1fr; }
  .author-photo { max-width: 360px; }
  .float-cover { float: none; width: min(100%, 320px); margin: 0 auto 1.25rem; }
  .contact .row { grid-template-columns: 1fr; }
  .site-footer { padding-inline: 1.25rem; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; }
}
