/* ===== CSS Variables – easy customization ===== */
:root {
  --new-color: #2596be;
  /* New color scheme – dark blue complement */
  --bg-color: #f0f4fa;
  /* very light blue-gray */
  --text-color: #1e2b3a;
  /* dark navy */
  --primary-color: #2c3e5c;
  /* medium dark blue */
  --secondary-color: #8a9bb5;
  /* muted blue-gray */
  --navbar-text: #1e2b3a;

  /* Fonts: Futura for headings, Nunito for body (kept for readability) */
  --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --heading-font: 'Futura', 'Trebuchet MS', Arial, sans-serif;

  --base-font-size: 18px;
  --heading-font-size: 3rem;
  --subheading-font-size: 2rem;
  --border-radius: 4px;
  --cover-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  --content-max-width: 1200px;
  --spacing: 2.5rem;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: var(--base-font-size);
  line-height: 1.6;
}

h1,
h2,
h3,
.header-name {
  font-family: var(--heading-font);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--heading-font-size);
  margin-bottom: 1rem;
}

h2 {
  font-size: var(--subheading-font-size);
  margin-bottom: 1.5rem;
}

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

/* ===== Fixed Two‑Line Header ===== */
.site-header {
  width: 100%;
  background-color: transparent;
  padding: 1.5rem 2rem 0.5rem 2rem;
  border-bottom: 1px solid rgba(58, 46, 40, 0.15);
  backdrop-filter: blur(2px);
  /* optional, still works */
  z-index: 1000;
  /* keeps it above content if needed, but not fixed */
}

/* Center the title block within the header */
.title-wrapper {
  text-align: center;
  padding-right: 1.7em;
}

.title-block {
  display: inline-grid;
  grid-template-columns: min-content 1fr;
  align-items: start;
  /* tops aligned */
  gap: 0;
  /* no gap between columns */
  font-family: var(--heading-font);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 6rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--new-color);
}

.rotate-wrapper {
  display: flex;
  /* enables easy positioning */
  align-items: flex-start;
  /* stick to top */
  justify-content: flex-start;
  width: min-content;
  /* shrink to fit the rotated word's width */
  height: 1.2em;
  /* keep height equal to line-height */
  padding: 0;
  margin: 0;
}

.rotate-word {
  font-size: 0.4em;
  transform: rotate(-90deg) translateX(-130%) translateY(80%);
  transform-origin: top left;
  white-space: nowrap;
  line-height: 1;
  /* avoid extra height */
  display: block;
  /* removes any inline spacing */
  /* Optional: fine-tune vertical alignment */
  /* margin-top: -0.05em; */
  /* adjust if needed */
}

.rest-title {
  white-space: nowrap;
  line-height: 1.2;
}

/* Tagline (already exists – ensure it's below) */
.tagline {
  font-family: var(--font-family);
  font-size: 1.75rem;
  color: var(--primary-color);
  letter-spacing: 1px;
  font-weight: 400;
  margin-bottom: 1rem;
  text-align: center;
  /* text-transform: uppercase; */
  border-bottom: 1px solid rgba(30, 43, 58, 0.1);
  padding-bottom: 1rem;
  font-weight: 700;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .title-block {
    font-size: 2.5rem;
  }

  .rotate-wrapper {
    width: 1.2em;
    height: 1.2em;
  }

  .rotate-word {
    font-size: 0.35em;
    transform: rotate(-90deg) translateX(-138%) translateY(200%);
    transform-origin: top left;
    /* keep same ratio */
  }

  .tagline {
    font-size: 1rem;
  }
}

/* ===== Navbar inside header ===== */
.navbar {
  width: 100%;
}

.nav-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  padding: 0.5rem 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--navbar-text);
  font-weight: 500;
  font-size: 1.2rem;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  padding: 6px;
}

.nav-links a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nav-social a {
  color: var(--navbar-text);
  font-size: 1.8rem;
  transition: color 0.2s;
}

.nav-social a:hover {
  color: var(--primary-color);
}

.right-writer {
  text-align: right;
}

/* ===== Main Content ===== */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  margin-bottom: 5rem;
  margin-top: 2rem;
}

/* ===== Grid Layouts ===== */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing);
  align-items: start;
  font-size: calc(var(--base-font-size)*1.1)
}

/* Reverse the column order (image on right, text on left) */
.two-col-grid.reverse {
  direction: rtl;
  /* changes visual order, but careful with text alignment */
}

/* But direction: rtl also flips text alignment, so we reset text inside */
.two-col-grid.reverse>* {
  direction: ltr;
  /* keep text left-to-right */
}

.reviews-grid {
  display: grid;
  grid-template-columns: 3fr 4fr;
  gap: var(--spacing);
}

/* ===== Home Page ===== */
.book-cover {
  /* box-shadow: var(--cover-shadow); */
  border-radius: var(--border-radius);
  transform: scale(1.1);
}

.purchase-links {
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 30px;
  /* pill shape */
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: #1f2c40;
  transform: scale(1.02);
}

.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: #6f809c;
}

/* ===== About Page ===== */
.illustrator-img {
  width: fit-content;
  margin: 0 auto;
}

/* ===== Reviews Page ===== */
.reviews-list {
  list-style: none;
}

.reviews-list li {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(58, 46, 40, 0.2);
}

.reviews-list li:last-child {
  border-bottom: none;
}

.review-text {
  font-style: italic;
  color: #5f4e45;
  font-size: 1.1rem;
}

.review-author {
  margin-top: 0.5rem;
  font-weight: 600;
  color: #3a2e28;
}

/* ===== Contact Page ===== */
.contact-blurb {
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 2rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #3a2e28;
}

input,
textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(58, 46, 40, 0.2);
  border-radius: 30px;
  font-family: inherit;
  font-size: 1rem;
  background-color: white;
  transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 62, 92, 0.2);
}

textarea {
  min-height: 180px;
  resize: vertical;
  border-radius: 20px;
}

.form-message {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 30px;
  display: none;
  font-weight: 500;
}

.form-message.success {
  background-color: #d4e0ed;
  border-color: var(--primary-color);
  color: #1e2b3a;
  border: 1px solid #7f9f8c;
  display: block;
}

.form-message.error {
  background-color: #f3d9d1;
  color: #a14f3a;
  border: 1px solid #b46f4c;
  display: block;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 2.5rem;
  color: #5f4e45;
  border-top: 1px solid rgba(58, 46, 40, 0.1);
  margin-top: 4rem;
  font-size: 0.95rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --heading-font-size: 2.5rem;
    --spacing: 1.8rem;
    --base-font-size: 16px;
  }

  .site-header {
    padding: 1rem 1rem 0.5rem 1rem;
  }

  .header-name {
    font-size: 2.8rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.8rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .nav-social a {
    font-size: 1.5rem;
  }

  .two-col-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .illustrator-img {
    width: 100%;
  }
}