/* Thiago P.K. Land — one stylesheet, no framework.
   Colours come from the covers: the deep green of a garden at dusk,
   the bright leaf green of the titles, tomato red for accents. */

:root {
  --forest: #173323;
  --forest-2: #20452f;
  --leaf: #4f9a3a;
  --leaf-dark: #3d7d2c;
  --leaf-soft: #e6f0dc;
  --tomato: #c8502d;
  --ink: #1d2a21;
  --muted: #5d6b60;
  --paper: #f7f3ea;
  --surface: #fffdf8;
  --line: #e4dccb;
  --on-dark: #eef3e8;
  --on-dark-muted: #b7c7b4;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --book-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 14px 30px -10px rgba(23, 51, 35, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--leaf-dark); }

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  margin: 0 0 1rem;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lead { font-size: 1.22rem; color: var(--muted); max-width: 34em; }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.5em;
  border: 2px solid var(--leaf);
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.button:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); transform: translateY(-1px); }
.button-ghost { background: transparent; color: var(--leaf-dark); }
.button-ghost:hover { background: var(--leaf-soft); color: var(--leaf-dark); }
.button-light { background: transparent; border-color: rgba(238, 243, 232, 0.45); color: var(--on-dark); }
.button-light:hover { background: rgba(238, 243, 232, 0.1); border-color: var(--on-dark); }
.button svg { width: 1.15em; height: 1.15em; flex: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 2rem; }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin 0.2s; }
.link-arrow:hover::after { margin-left: 4px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 243, 234, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-role { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--leaf-dark); }
.nav .button { padding: 0.5em 1.1em; font-size: 0.95rem; color: #fff; }
.nav .button:hover { color: #fff; }

/* Hero: dark garden green with a fan of covers */

.hero { background: var(--forest); color: var(--on-dark); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; padding: 96px 24px 104px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: #9fd17f; }
.hero .lead { color: var(--on-dark-muted); }
.hero .button-ghost { color: var(--on-dark); border-color: rgba(238, 243, 232, 0.45); }
.hero .button-ghost:hover { background: rgba(238, 243, 232, 0.1); border-color: var(--on-dark); }

.fan { position: relative; height: 440px; }
.fan img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 230px;
  border-radius: 3px 6px 6px 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.fan .fan-left { transform: translateX(-112%) rotate(-9deg); transform-origin: bottom right; }
.fan .fan-right { transform: translateX(12%) rotate(9deg); transform-origin: bottom left; }
.fan .fan-front { width: 260px; transform: translateX(-50%) translateY(-28px); z-index: 2; }

/* Sections */

.section { padding: 96px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 48px; }
.section-head p { margin: 0; color: var(--muted); max-width: 34em; }
.section-head h2 { margin: 0; }

/* Feature: one book, cover beside the text */

.feature { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: center; }
.feature .cover { width: 100%; }
.cover { border-radius: 3px 6px 6px 3px; box-shadow: var(--book-shadow); }

/* Shelf: book cards, covers aligned on their bottom edge like on a shelf */

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 40px; }
.book-card { color: var(--ink); text-decoration: none; }
.book-card .shelf-spot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 28px 28px 0;
  margin-bottom: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--leaf-soft) 0%, #d9e7cc 100%);
  overflow: hidden;
}
.book-card .cover { max-height: 100%; width: auto; max-width: 74%; transition: transform 0.25s; }
.book-card:hover .cover { transform: translateY(-6px); }
.book-card h3 { margin: 0 0 0.2em; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.book-card p { margin: 0; color: var(--muted); }
.book-card .book-formats { margin-top: 0.35em; font-size: 0.85rem; color: var(--leaf-dark); font-weight: 600; }

.group + .group { margin-top: 88px; }

/* Formats */

.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.format { padding: 32px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.format svg { width: 40px; height: 40px; color: var(--leaf); margin-bottom: 18px; }
.format p { margin: 0; color: var(--muted); }
.formats-note { margin: 24px 0 0; color: var(--muted); font-size: 0.95rem; }

/* About teaser and quote */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.rounded { width: 100%; border-radius: 24px; }

.quote { margin: 0 auto; max-width: 780px; text-align: center; }
.quote blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.35; }
.quote blockquote::before { content: "“"; display: block; color: var(--tomato); font-size: 4rem; line-height: 0.9; }
.quote figcaption { margin-top: 1.25rem; color: var(--muted); }

/* Book page */

.book-page { padding-top: 72px; padding-bottom: 72px; }
.book-layout { display: grid; grid-template-columns: 380px 1fr; gap: 72px; align-items: start; }
.book-aside { position: sticky; top: 104px; }
.book-aside .cover { width: 100%; }
.crumbs { margin: 0 0 1.5rem; font-size: 0.92rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--leaf-dark); }
.subtitle { margin: -0.2em 0 1.4em; color: var(--muted); font-size: 1.1rem; font-style: italic; font-family: var(--serif); }
.buy { margin: 2rem 0; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.buy p { margin: 0 0 14px; font-weight: 600; }
.buy .actions { margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 0 0 2.5rem; font-size: 0.95rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.prose { max-width: 40em; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose ul { padding: 0; list-style: none; }
.prose li { position: relative; padding: 6px 0 6px 30px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.95em;
  width: 12px;
  height: 12px;
  border-radius: 50% 0;
  background: var(--leaf);
  transform: rotate(45deg);
}

.listen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 3rem;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--on-dark);
}
.listen svg { width: 44px; height: 44px; color: #9fd17f; flex: none; }
.listen div { flex: 1 1 220px; }
.listen h2 { margin: 0 0 0.2em; font-size: 1.35rem; color: #fff; }
.listen p { margin: 0; color: var(--on-dark-muted); }

/* Audiobook page */

.audio-list { display: grid; gap: 20px; margin: 48px 0 0; padding: 0; list-style: none; }
.audio-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 20px 28px 20px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.audio-item .cover { width: 96px; }
.audio-item h2 { margin: 0 0 0.15em; font-size: 1.35rem; }
.audio-item h2 a { color: var(--ink); text-decoration: none; }
.audio-item h2 a:hover { color: var(--leaf-dark); }
.audio-item p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.audio-note { margin-top: 28px; color: var(--muted); }

/* About page */

.page-hero { padding: 72px 0 0; }
.about-body { padding: 56px 0 96px; }
.about-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

/* Footer */

.site-footer { background: var(--forest); color: var(--on-dark-muted); padding: 48px 0; font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-inner p { margin: 0; }
.footer-name { color: #fff; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--on-dark-muted); }
.footer-links a:hover { color: #fff; }

/* 404 */

.error-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; min-height: 60vh; padding: 64px 24px; }

/* Tablets */

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 24px 72px; }
  .fan { height: 380px; max-width: 520px; width: 100%; margin: 0 auto; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .feature, .book-layout { grid-template-columns: 280px 1fr; gap: 48px; }
}

/* Phones */

@media (max-width: 720px) {
  .wrap, .hero-inner, .error-inner { padding-left: 16px; padding-right: 16px; }
  .header-inner { height: auto; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; padding-bottom: 10px; }
  .brand-name { font-size: 1.2rem; }
  .nav { gap: 22px; }
  .nav .button { display: none; }
  html { scroll-padding-top: 110px; }
  .fan { height: 270px; }
  .fan img { width: 132px; }
  .fan .fan-left { transform: translateX(-104%) rotate(-8deg); }
  .fan .fan-right { transform: translateX(4%) rotate(8deg); }
  .fan .fan-front { width: 160px; transform: translateX(-50%) translateY(-16px); }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .shelf { gap: 40px 16px; }
  .book-card .shelf-spot { padding: 16px 16px 0; margin-bottom: 14px; }
  .book-card h3 { font-size: 1.1rem; }
  .book-card p { font-size: 0.92rem; }
  .feature, .book-layout, .split, .error-inner { grid-template-columns: 1fr; gap: 36px; }
  .feature .cover, .book-aside .cover { max-width: 240px; margin: 0 auto; }
  .book-aside { position: static; }
  .book-page { padding-top: 40px; }
  .formats { grid-template-columns: 1fr; }
  .audio-item { grid-template-columns: 72px 1fr; gap: 16px 18px; padding: 16px; }
  .audio-item .cover { width: 72px; }
  .audio-item .button { grid-column: 1 / -1; justify-self: start; }
  .listen { padding: 24px; }
}

/* The quote on the About page sits inside the text column. */
.quote-left { margin: 3rem 0; text-align: left; }

/* The garden illustration between the About text and the quote. */
.about-garden { margin: 2.5rem 0 0; }

/* Book page: scene, sample, contents */

.scene { width: 100%; border-radius: 24px; }
.sample { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.sample-from { margin: 0; color: var(--muted); font-size: 0.95rem; }
.sample blockquote {
  position: relative;
  margin: 0;
  padding-left: 32px;
  border-left: 3px solid var(--leaf);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.55;
}
.sample blockquote p { margin: 0 0 1em; }
.sample blockquote p:last-child { margin-bottom: 0; }

.chapters { columns: 2; column-gap: 56px; margin: 0; padding: 0 0 0 1.6em; }
.chapters li { break-inside: avoid; padding: 10px 0 10px 8px; border-bottom: 1px solid var(--line); }
.chapters li::marker { color: var(--leaf-dark); font-weight: 700; }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px 56px; }
.parts h3 { margin: 0 0 8px; color: var(--leaf-dark); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.parts .chapters { columns: 1; }

.inside-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 0; padding: 0; list-style: none; }
.inside-books a { display: grid; grid-template-columns: 96px 1fr; gap: 6px 20px; align-items: center; color: var(--ink); text-decoration: none; }
.inside-books img { grid-row: span 2; width: 96px; }
.inside-books strong { font-family: var(--serif); font-size: 1.2rem; align-self: end; }
.inside-books span { color: var(--muted); font-size: 0.95rem; align-self: start; }
.inside-books a:hover strong { color: var(--leaf-dark); }

.facts-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.facts-list li { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.facts-list strong { display: block; margin-bottom: 6px; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; }

/* Home: where to start */

.start { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.start-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.start-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(23, 51, 35, 0.1); }
.start-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.start-card div { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 20px 22px 24px; }
.start-card h3 { margin: 0; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.start-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.start-card .link-arrow { margin-top: auto; padding-top: 8px; color: var(--leaf-dark); font-size: 0.95rem; }

/* Home: values */

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.values svg { width: 44px; height: 44px; margin-bottom: 16px; color: var(--tomato); }
.values h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.values p { margin: 0; color: var(--muted); }

/* Home: excerpt band and audiobook band */

.band { background: var(--forest); color: var(--on-dark); }
.band h2 { color: #fff; }
.band .eyebrow { color: #9fd17f; }
.band .lead { color: var(--on-dark-muted); }
.excerpt { max-width: 860px; margin: 0 auto; text-align: center; }
.excerpt blockquote { margin: 0 0 1.5rem; font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.45; color: #fff; }
.excerpt .link-arrow { color: #9fd17f; }

/* About: timeline */

.timeline { margin: 1.5rem 0 0; padding: 0; list-style: none; border-left: 2px solid var(--leaf-soft); }
.timeline li { position: relative; padding: 0 0 26px 28px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline strong { display: block; color: var(--leaf-dark); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 980px) {
  .start { grid-template-columns: repeat(2, 1fr); }
  .inside-books { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .scene { border-radius: 16px; }
  .sample { grid-template-columns: 1fr; gap: 16px; }
  .sample blockquote { padding-left: 20px; }
  .chapters { columns: 1; }
  .facts-list, .values { grid-template-columns: 1fr; gap: 28px; }
  .start { grid-template-columns: 1fr; }
}

/* Phones: shorter pictures in the four "where to start" cards. */
@media (max-width: 720px) {
  .start-card img { aspect-ratio: 16 / 9; }
}

/* The novel: its own colours, taken from the Phuket sunset and the cover,
   so it never looks like one more gardening guide. */

:root {
  --dusk: #261a33;
  --sunset: #e0663f;
  --sunset-dark: #c4502c;
  --sunset-soft: #f6b48e;
}

.novel-feature {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--dusk) url("/img/scenes/love-in-the-time-of-covid-19.jpg") center / cover no-repeat;
}
.novel-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(38, 26, 51, 0.95) 0%, rgba(38, 26, 51, 0.82) 48%, rgba(38, 26, 51, 0.25) 100%);
}
.novel-inner { position: relative; display: grid; grid-template-columns: 1fr 320px; gap: 72px; align-items: center; padding-top: 112px; padding-bottom: 112px; }
.novel-feature h1, .novel-feature h2 { color: #fff; }
.novel-feature h2 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.novel-feature .eyebrow { color: var(--sunset-soft); }
.novel-feature .lead { color: rgba(255, 255, 255, 0.86); }
.novel-subtitle { margin: -0.2em 0 1em; color: var(--sunset-soft); font-family: var(--serif); font-size: 1.3rem; font-style: italic; }
.novel-feature blockquote {
  max-width: 34em;
  margin: 1.8rem 0 0;
  padding-left: 22px;
  border-left: 3px solid var(--sunset);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
}
.novel-cover .cover { width: 100%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 34px 70px -20px rgba(0, 0, 0, 0.75); }
.button-sunset { background: var(--sunset); border-color: var(--sunset); }
.button-sunset:hover { background: var(--sunset-dark); border-color: var(--sunset-dark); }

/* Novel page */

.novel-hero .crumbs a { color: rgba(255, 255, 255, 0.7); }
.novel-hero .crumbs a:hover { color: #fff; }
.novel-buy { margin: 2rem 0 0; font-weight: 600; }
.novel-buy + .actions { margin-top: 12px; }
.novel-facts { margin: 1.5rem 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.novel-story { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.novel-story .prose p:first-child { font-size: 1.15rem; }
.novel-page .listen { margin-top: 0; background: var(--dusk); flex-direction: column; align-items: flex-start; }
.novel-page .listen svg { color: var(--sunset-soft); }
.novel-page .eyebrow { color: var(--sunset-dark); }
.novel-page .novel-feature .eyebrow { color: var(--sunset-soft); }
.novel-page .sample blockquote { border-left-color: var(--sunset); }
.novel-page .facts-list strong { color: var(--dusk); }
.novel-also { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.novel-also h2 { margin: 0 0 0.3em; font-size: 1.6rem; }
.novel-also p { margin: 0; color: var(--muted); }
.novel-page .novel-also .link-arrow { color: var(--leaf-dark); }

@media (max-width: 980px) {
  .novel-inner { grid-template-columns: 1fr 240px; gap: 40px; }
  .novel-story { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .novel-feature::before { background: rgba(38, 26, 51, 0.86); }
  .novel-inner { grid-template-columns: 1fr; gap: 32px; padding-top: 64px; padding-bottom: 64px; }
  .novel-cover { order: -1; max-width: 200px; }
}

/* Headings wrap into even lines, so "COVID-19" is never split at its hyphen. */
h1, h2 { text-wrap: balance; }
.novel-page .listen div { flex: none; }
