/* =========================================================
   CLYDE A. LANDON — AUTHOR WEBSITE
   MAIN STYLESHEET
   Header styles are in header.css
========================================================= */

/* =========================================================
   1. ROOT VARIABLES
========================================================= */

:root {
  --teal: #2fa9b6;
  --teal-dark: #1b7f8a;

  --gold: #eba42d;
  --rose: #d4868c;

  --ink: #111111;
  --muted: #565f66;

  --white: #ffffff;
  --cream: #ffffff;
  --soft: #f2f8f9;

  --radius: 18px;

  --shadow: 0 12px 32px rgba(20, 40, 50, 0.14);

  /* CHANGE YOUR BACKGROUND IMAGE HERE
     (if you change it, update the matching preload link in home.html too) */
  --hero-bg: url("Images/home-bg-1.webp");

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
}

/* =========================================================
   2. RESET AND GLOBAL STYLES
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  color: var(--gold);
}

button {
  font: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  line-height: 1.12;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1.1em;
}

.container {
  width: min(1360px, 90%);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   3. SKIP LINK
========================================================= */

.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 9999;

  padding: 12px 20px;

  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  left: 10px;
}

/* =========================================================
   4. BUTTONS
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.8rem 2.2rem;
  min-height: 48px;

  border-radius: 999px;

  background: linear-gradient(100deg, var(--teal), #63aeb2, var(--rose));

  color: var(--white);

  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 800;

  letter-spacing: 0.015em;
  text-transform: uppercase;

  text-decoration: none;
  border: none;

  cursor: pointer;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.btn:hover {
  color: var(--white);
  transform: translateY(-3px);

  box-shadow: 0 12px 25px rgba(47, 169, 182, 0.2);
}

/* =========================================================
   5. HERO SECTION
   (the two .hero blocks that were in this file are merged
   here; the values are the ones the browser was using)
========================================================= */

.hero {
  position: relative;
  isolation: isolate;

  width: 100%;

  min-height: 100vh;
  min-height: 100svh;

  display: flex;
  align-items: center;

  overflow: hidden;

  padding: 120px 0 40px;

  background-color: #ffffff;
}

/* FULL HERO BACKGROUND IMAGE
   The image begins at the top of the hero.
   The transparent header sits on top of it,
   so the background covers BOTH the header and the hero. */

.hero::before {
  content: "";

  position: absolute;
  inset: 0;

  z-index: -1;

  background-image: var(--hero-bg);

  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;

  pointer-events: none;
}

/* SLIDER CONTAINER */

.hero-slider {
  position: relative;

  display: flex;
  align-items: center;

  width: min(1360px, 90%);

  min-height: 100%;
  margin-inline: auto;
}

/* =========================================================
   6. HERO SLIDES
========================================================= */

.hero-slide {
  width: 100%;

  display: grid;

  grid-template-columns: 1fr 1fr;

  align-items: center;

  gap: 3rem;

  padding: 0 3rem;

  min-height: 780px;

  animation: heroFade 0.55s ease both;
}

.hero-slide[hidden] {
  display: none !important;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   7. HERO CONTENT
========================================================= */

.hero-content {
  width: 100%;
  max-width: 700px;

  padding-left: 0;

  position: relative;
  z-index: 2;
}

/* MAIN HEADING */

.hero-title {
  font-family: var(--serif);

  font-size: clamp(4.5rem, 8vw, 7.6rem);

  font-weight: 600;

  line-height: 0.95;
  letter-spacing: -0.035em;

  margin: 0 0 1.6rem;

  color: #050505;
}

.hero-title span {
  display: block;
}

.hero-title .accent {
  color: var(--gold);
}

/* DESCRIPTION */

.hero .lead {
  max-width: 560px;

  margin: 0 0 2.2rem;

  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);

  font-weight: 400;

  line-height: 1.5;

  color: #222222;

  text-align: justify;
}

/* =========================================================
   8. BOOK COVER
========================================================= */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;

  position: relative;
  z-index: 1;
}

.book-cover {
  width: min(500px, 95%);

  max-height: 760px;
  height: auto;

  object-fit: contain;

  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.22));

  transition: transform 0.4s ease;
}

.book-cover:hover {
  transform: translateY(-7px);
}

/* =========================================================
   9. SLIDER ARROWS
========================================================= */

.hero-arrow {
  position: absolute;

  top: 50%;
  transform: translateY(-50%);

  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 50px;
  height: 60px;

  padding: 8px;

  background: transparent;
  border: none;

  color: #050505;

  cursor: pointer;

  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.hero-arrow:hover {
  color: var(--teal-dark);
}

.hero-arrow svg {
  width: 38px;
  height: 38px;
}

.hero-prev {
  left: -5px;
}

.hero-next {
  right: -5px;
}

/* =========================================================
   10. GENERAL CONTENT SECTIONS
========================================================= */

section:not(.hero) {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--soft);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.card {
  background: var(--white);

  border-radius: var(--radius);

  padding: 2rem;

  box-shadow: var(--shadow);
}

.page-title {
  background: linear-gradient(135deg, #e3f1f2, #ffffff);
  padding: 4rem 0 3rem;
}

.page-title h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0;
}

/* =========================================================
   11. GALLERY
========================================================= */

.gallery {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));

  gap: 1rem;
}

.gallery figure {
  margin: 0;

  border-radius: var(--radius);
  overflow: hidden;

  background: #dfe8ea;

  aspect-ratio: 4 / 3;

  box-shadow: var(--shadow);
}

.gallery img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.4s;
}

.gallery figure:hover img {
  transform: scale(1.05);
}

/* =========================================================
   12. VIDEO
========================================================= */

.video-wrap {
  position: relative;

  aspect-ratio: 16 / 9;

  border-radius: var(--radius);
  overflow: hidden;

  background: #000;

  box-shadow: var(--shadow);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  border: 0;
}

/* =========================================================
   13. FORMS
========================================================= */

form label {
  display: block;

  font-weight: 600;
  margin-bottom: 0.3rem;

  font-size: 0.9rem;
}

form input,
form textarea {
  width: 100%;

  padding: 0.85rem 1rem;

  border: 1.5px solid #c9d3d6;
  border-radius: 12px;

  font: inherit;

  margin-bottom: 1.1rem;

  background: #fff;
}

form input:focus,
form textarea:focus {
  outline: 3px solid rgba(47, 169, 182, 0.3);
  border-color: var(--teal);
}

.hp {
  position: absolute;
  left: -9999px;
}

/* =========================================================
   14. FOOTER
========================================================= */

.site-footer {
  background: var(--ink);

  color: #dfe6e8;

  padding: 2rem 0;

  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;

  align-items: center;
  justify-content: space-between;

  gap: 1rem;
}

.footer-inner p {
  margin: 0;
}

.site-footer a {
  color: var(--white);
  transition: color 0.25s ease;
}

.site-footer a:hover {
  color: var(--gold);
}

/* =========================================================
   15. BUY SECTION (small banner with image background)
   (the two buy-section blocks are merged here; the values
   are the ones the browser was using)
========================================================= */

.buy-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: flex;
  align-items: center;

  height: clamp(380px, 35vw, 680px);
  min-height: 0;
  padding: 0 !important;

  background-color: #2cadbb;
}

/* Background image. If "buy-bg.jpg" is missing, the gradients
   recreate the teal background with the rose/grey left corner. */
.buy-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image:
    url("Images/buy-bg.jpg"),
    radial-gradient(ellipse 32% 110% at 0% 100%,
      #d4868c 0%, rgba(212, 134, 140, 0) 100%),
    linear-gradient(90deg,
      rgba(150, 160, 165, 0.55) 0%, rgba(150, 160, 165, 0) 28%);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.buy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 8vw, 9rem);
}

.buy-books img {
  width: clamp(340px, 30vw, 600px);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.25));
}

.buy-title {
  margin: 0 0 1.4rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
}

.buy-accent {
  color: #e2b865;
}

/* Amazon button image */
.amazon-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.amazon-link img {
  width: 250px;      /* change this to resize your button */
  height: auto;
}

.amazon-link:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

/* =========================================================
   16. HERO SLIDER: real slide animation
   (both books move: one slides out while the other slides in)
========================================================= */

/* The viewport is created by slider-animation.js.
   It hides whatever is outside while the books slide. */
.hero-viewport {
  display: grid;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Every slide sits in the same spot; only the active one is seen.
   display / animation are forced so the old hidden-toggle
   code in script.js can't interfere. */
.hero-viewport > .hero-slide {
  grid-area: 1 / 1;
  min-width: 0;
  display: grid !important;
  animation: none !important;
  visibility: hidden;
  will-change: transform;
}

.hero-viewport > .hero-slide.is-active {
  visibility: visible;
}

/* =========================================================
   17. TABLET RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .hero-slide {
    padding-inline: 2rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(4rem, 8vw, 6rem);
  }

  .book-cover {
    width: min(420px, 90%);
  }
}

/* =========================================================
   18. MOBILE RESPONSIVE
========================================================= */

@media (max-width: 860px) {
  .hero-slider {
    width: 90%;
  }

  .hero-slide {
    grid-template-columns: 1fr;

    gap: 1.5rem;

    min-height: 0;

    padding: 1.5rem 0 3rem;

    text-align: center;
  }

  .hero-content {
    max-width: 600px;

    margin-inline: auto;

    order: 2;
  }

  .hero-title {
    font-size: clamp(3.8rem, 13vw, 5.4rem);
    margin-bottom: 1.2rem;
  }

  .hero .lead {
    max-width: 520px;

    margin: 0 auto 1.6rem;

    font-size: 1.05rem;
    line-height: 1.6;

    text-align: center;
  }

  .hero-visual {
    order: 1;
  }

  .book-cover {
    width: min(310px, 72%);
    max-height: 430px;
  }

  .hero-arrow {
    top: auto;
    bottom: 0;

    transform: none;

    width: 45px;
    height: 45px;
  }

  .hero-arrow:hover {
    transform: scale(1.08);
  }

  .hero-arrow svg {
    width: 30px;
    height: 30px;
  }

  .hero-prev {
    left: calc(50% - 65px);
  }

  .hero-next {
    right: calc(50% - 65px);
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section:not(.hero) {
    padding: 3rem 0;
  }

  /* Buy section */
  .buy-section {
    height: auto;
    padding: 3rem 0 !important;
  }

  .buy-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .buy-books img {
    width: min(380px, 90%);
  }

  .buy-title {
    white-space: normal;
  }
}

/* =========================================================
   19. SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .container {
    width: 90%;
  }

  .hero-slide {
    padding-top: 1rem;
    gap: 1.2rem;
  }

  .hero-title {
    font-size: clamp(3.3rem, 14vw, 4.4rem);
    line-height: 0.98;
  }

  .hero .lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .book-cover {
    width: min(250px, 74%);
    max-height: 350px;
  }

  .btn {
    padding: 0.75rem 1.8rem;
    min-height: 45px;
    font-size: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   20. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}