:root {
  --bg: #0F1115;
  --paper: #E8E4DA;
  --muted: #8A8F9A;
  --teal: #095F73;
  --teal-light: #0E7A91;
  --teal-bright: #3BB3C9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}

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

/* ---------- Nav ---------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 56px;
  border-bottom: 1px solid rgba(232, 228, 218, 0.08);
  flex-wrap: wrap;
  gap: 16px;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 20px;
  letter-spacing: -0.2px;
}
.brand-mini svg { width: 42px; height: 42px; display: block; }
.brand-mini b { font-weight: 500; }
.brand-mini em { color: var(--teal-bright); font-style: italic; font-weight: 500; margin: 0 4px; }
.brand-mini .apps-label { color: var(--muted); font-style: italic; }

nav ul {
  display: flex;
  gap: 40px;
  list-style: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
nav ul a:hover { color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 10%; left: 50%;
  transform: translateX(-50%);
  width: 1100px; height: 1100px;
  border: 1px solid rgba(9, 95, 115, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  top: 22%; left: 50%;
  transform: translateX(-50%);
  width: 720px; height: 720px;
  border: 1px solid rgba(9, 95, 115, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.hero-mark {
  width: 180px;
  height: 180px;
  margin-bottom: 28px;
  position: relative;
}

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 28px;
  position: relative;
}

.hero h1 {
  font-size: clamp(48px, 7.5vw, 100px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 28px;
  position: relative;
  max-width: 18ch;
}
.hero h1 .amp { font-style: italic; color: var(--teal-bright); font-weight: 500; }
section h2 .amp { font-style: italic; color: var(--teal-bright); font-weight: 500; }
.hero h1 .apps {
  font-size: 0.5em;
  color: var(--muted);
  font-weight: 400;
  vertical-align: 0.45em;
  margin-left: 0.1em;
  font-style: italic;
}

.rule {
  width: 60px;
  height: 1px;
  background: var(--teal);
  margin: 20px auto;
  position: relative;
}

.tag {
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
  position: relative;
  margin-bottom: 48px;
}

.cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  position: relative;
  font-family: 'Inter', sans-serif;
  flex-wrap: wrap;
}
.btn {
  padding: 13px 34px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 0;
  cursor: pointer;
  transition: all .2s;
  display: inline-block;
}
.btn-p { background: var(--teal); color: var(--paper); border-color: var(--teal); }
.btn-p:hover { background: var(--teal-light); border-color: var(--teal-light); }
.btn-s { background: transparent; color: var(--paper); border-color: rgba(232, 228, 218, 0.25); }
.btn-s:hover { border-color: var(--paper); }

/* ---------- Sections (landing.html pattern) ---------- */
section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 56px;
  border-top: 1px solid rgba(232, 228, 218, 0.06);
}

.kicker {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 22px;
}

section h2 {
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 40px;
  max-width: 720px;
}
section h2 em { color: var(--teal-light); }

/* Column grid (catalogue style) */
.cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.col h3 {
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 14px;
  font-style: italic;
}
.col p { color: var(--muted); font-size: 17px; }
.col .num {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--teal-light);
  margin-bottom: 18px;
  display: block;
}

/* 2-col variant for the legal index */
.cols.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Section lede paragraph (under h2, above grid) */
.lede {
  max-width: 680px;
  font-size: 21px;
  line-height: 1.6;
  color: var(--paper);
  margin-top: -20px;
  margin-bottom: 36px;
}

/* Section foot — small CTA row under cols */
.section-foot {
  margin-top: 32px;
  font-family: 'Inter', sans-serif;
}
.link-arrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-bright);
  border-bottom: 1px solid rgba(59, 179, 201, 0.3);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}
.link-arrow:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* When cols are links (the index page) */
a.col {
  color: inherit;
  display: block;
  padding: 32px;
  margin: -32px;
  transition: background 0.2s, transform 0.2s;
  border: 1px solid transparent;
}
a.col:hover {
  background: rgba(9, 95, 115, 0.06);
  border-color: rgba(59, 179, 201, 0.25);
  transform: translateY(-2px);
}
a.col:hover h3 { color: var(--teal-bright); }

/* Essay / prose block */
.essay {
  max-width: 680px;
  font-size: 21px;
  line-height: 1.8;
  color: var(--paper);
}
.essay p + p { margin-top: 26px; }
.essay h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  font-style: italic;
  color: var(--paper);
  margin-top: 52px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.essay h3:first-child { margin-top: 0; }
.essay ul { margin: 18px 0 26px; padding-left: 24px; }
.essay li { margin-bottom: 10px; }
.essay strong { font-weight: 500; color: var(--paper); }
.essay a { color: var(--teal-bright); border-bottom: 1px solid rgba(59, 179, 201, 0.3); }
.essay a:hover { border-bottom-color: var(--teal-bright); }
.essay .pull {
  font-size: 32px;
  font-style: italic;
  color: var(--teal-light);
  line-height: 1.3;
  margin: 36px 0;
  padding-left: 24px;
  border-left: 2px solid var(--teal);
}
.essay .effective-date {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 40px;
}

/* Back link on legal pages */
.back-link {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--teal-bright); }

/* ---------- Book cards (used on home + /books/) ---------- */
.book-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  padding: 28px;
  margin: 0 0 20px;
  border: 1px solid rgba(232, 228, 218, 0.08);
  background: rgba(9, 95, 115, 0.02);
  color: inherit;
  transition: background .2s, border-color .2s, transform .2s;
  align-items: start;
}
.book-card:hover {
  background: rgba(9, 95, 115, 0.06);
  border-color: rgba(59, 179, 201, 0.25);
  transform: translateY(-2px);
}
.book-card:hover h3 a { color: var(--teal-bright); }
.book-card-body h3 a { color: inherit; transition: color .2s; }
.book-card-body h3 a:hover { color: var(--teal-bright); }
.book-card-cover { display: block; }
.book-card-cover img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform .2s;
}
.book-card-cover:hover img { transform: scale(1.02); }
.book-card-body h3 {
  font-size: 32px;
  font-weight: 500;
  font-style: italic;
  margin: 8px 0 12px;
  line-height: 1.15;
}
.book-card-body .num {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal-light);
  display: block;
}
.book-card-body .tagline {
  color: var(--paper);
  font-size: 19px;
  margin-bottom: 14px;
}
.book-card-body p { color: var(--muted); font-size: 17px; margin-bottom: 18px; }

/* Editions row inside card */
.editions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
  font-family: 'Inter', sans-serif;
}
.edition-btn {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid rgba(232, 228, 218, 0.25);
  color: var(--paper);
  transition: border-color .2s, background .2s, color .2s;
}
.edition-btn:hover {
  border-color: var(--teal-bright);
  color: var(--teal-bright);
  background: rgba(59, 179, 201, 0.06);
}
.edition-btn.primary {
  background: var(--teal);
  border-color: var(--teal);
}
.edition-btn.primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: var(--paper);
}
.edition-btn.ghost {
  border-color: transparent;
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}
.edition-btn.ghost:hover {
  border-color: transparent;
  color: var(--teal-bright);
  background: transparent;
}

/* ---------- Book detail page ---------- */
.book-detail { padding: 56px 56px 72px; max-width: 1080px; margin: 0 auto; border-top: none; }
.book-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  margin-top: 32px;
  align-items: start;
}
.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.3);
}
.book-meta {
  margin-top: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
}
.book-meta .meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(232, 228, 218, 0.08);
}
.book-meta .meta-row span:first-child {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-meta .meta-row span:last-child { color: var(--paper); text-align: right; }

.buy-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.buy-stack .btn { text-align: center; }

.book-body h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 14px 0 18px;
}
.book-body .tagline {
  font-size: 22px;
  color: var(--teal-light);
  margin-bottom: 36px;
}
.book-body .essay { max-width: 640px; }
.book-body .essay p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

/* App cards mirror book cards but icon-sized */
/* ---------- Contact form ---------- */
.contact-page { max-width: 720px; margin: 0 auto; padding: 56px 56px 80px; }
.contact-status { margin: 0 0 28px; padding: 14px 18px; border-radius: 0; font-family: 'Inter', sans-serif; font-size: 14px; display: none; }
.contact-status.success { display: block; background: rgba(9, 95, 115, 0.18); border-left: 3px solid var(--teal-bright); color: var(--paper); }
.contact-status.error { display: block; background: rgba(170, 60, 60, 0.18); border-left: 3px solid #c75050; color: var(--paper); }
.contact-form { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-family: 'Inter', sans-serif; }
.contact-form label > span {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal-light);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  padding: 12px 14px;
  background: rgba(232, 228, 218, 0.04);
  border: 1px solid rgba(232, 228, 218, 0.14);
  color: var(--paper);
  border-radius: 0;
  transition: border-color .2s, background .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; font-family: 'Inter', sans-serif; line-height: 1.5; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--teal-bright);
  background: rgba(9, 95, 115, 0.08);
}
.contact-form select option {
  background: #0F1115;
  color: #E8E4DA;
}
.contact-form button { align-self: flex-start; margin-top: 8px; cursor: pointer; }
.contact-form .honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 720px) {
  .contact-page { padding: 40px 24px 56px; }
}

.footer-socials { display: inline-flex; gap: 10px; align-items: center; vertical-align: middle; }
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(232, 228, 218, 0.12);
  border-radius: 50%;
  color: inherit;
  transition: color .2s, border-color .2s, background .2s;
}
.footer-socials a:hover {
  color: var(--teal-bright);
  border-color: rgba(59, 179, 201, 0.35);
  background: rgba(9, 95, 115, 0.08);
}

.app-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 24px;
  margin: 0 0 16px;
  border: 1px solid rgba(232, 228, 218, 0.08);
  background: rgba(9, 95, 115, 0.02);
  color: inherit;
  transition: background .2s, border-color .2s, transform .2s;
  align-items: start;
}
.app-card:hover {
  background: rgba(9, 95, 115, 0.06);
  border-color: rgba(59, 179, 201, 0.25);
  transform: translateY(-2px);
}
.app-card:hover h3 a { color: var(--teal-bright); }
.app-card-body h3 a { color: inherit; transition: color .2s; }
.app-card-body h3 a:hover { color: var(--teal-bright); }
.app-card-icon { display: block; }
.app-card-icon img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
}
@media (max-width: 720px) {
  .app-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .app-card-icon { max-width: 96px; }
}

.author-contact {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(232, 228, 218, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
}
.author-contact span {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}
.author-contact a {
  color: var(--teal-bright);
  border-bottom: 1px solid rgba(59, 179, 201, 0.3);
  width: fit-content;
}
.author-contact a:hover { border-bottom-color: var(--teal-bright); }

/* ---------- Footer ---------- */
footer {
  padding: 48px 56px;
  border-top: 1px solid rgba(232, 228, 218, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
}
footer a:hover { color: var(--paper); }
footer .amp {
  color: var(--teal-bright);
  font-style: italic;
  font-family: 'EB Garamond', Georgia, serif;
}
.footer-legal { display: flex; gap: 12px; align-items: center; }
.footer-legal a { border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.footer-legal a:hover { color: var(--paper); border-bottom-color: rgba(232, 228, 218, 0.3); }
.footer-legal .sep { opacity: 0.5; }

@media (max-width: 720px) {
  nav { padding: 20px 24px; }
  nav ul { gap: 20px; }
  section { padding: 48px 24px; }
  .cols, .cols.cols-2 { grid-template-columns: 1fr; gap: 28px; }
  footer { padding: 32px 24px; }
  section h2 { font-size: 38px; margin-bottom: 28px; }
  .lede { margin-top: -12px; margin-bottom: 28px; font-size: 18px; }
  .section-foot { margin-top: 24px; }
  .book-card { grid-template-columns: 1fr; gap: 20px; padding: 24px; }
  .book-card-cover { max-width: 200px; }
  .book-card-body h3 { font-size: 28px; }
  .book-layout { grid-template-columns: 1fr; gap: 32px; }
  .book-cover { max-width: 280px; margin: 0 auto; }
  .book-detail { padding: 40px 24px 56px; }
}
