/* ============================================
   KAITLYN TEER — AUTHOR WEBSITE
   Color Palette: Deep Navy, Coral, Pink, Cream, Gold
   Font: TT Ricordi Allegria
   ============================================ */

/* Font Import - Using similar elegant serif as fallback */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Outfit:wght@300;400;500&display=swap");

/* If you have TT Ricordi Allegria, add it as a local font */
@font-face {
  font-family: "TT Ricordi Allegria";
  src: url("fonts/TTRicordiAllegria-Regular.woff2") format("woff2"),
    url("fonts/TTRicordiAllegria-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "TT Ricordi Allegria";
  src: url("fonts/TTRicordiAllegria-Italic.woff2") format("woff2"),
    url("fonts/TTRicordiAllegria-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* CSS Variables */
:root {
  --font-display: "TT Ricordi Allegria", "Playfair Display", Georgia, serif;
  --font-sans: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Primary Palette */
  --navy: #05006c;
  --navy-light: #1a1a8c;
  --cream: #f8f4ec;
  --cream-dark: #ede8dd;
  --coral: #ff9277;
  --coral-light: #ffb5a0;
  --pink: #ff78b5;
  --pink-light: #ffc4dd;
  --gold: #9a8b55;
  --gold-light: #c9b978;
  --sky: #a8d4e6;

  /* Utility Colors */
  --white: #ffffff;
  --ink: #1a1a1a;
  --ink-muted: #666666;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;

  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-text: 680px;

  --transition: 0.3s ease;
}

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

blockquote,
cite,
footer {
  background: none;
  background-color: transparent;
}

html {
  scroll-behavior: smooth;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--navy);
  color: var(--cream);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-sm);
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--navy);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--space-lg);
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.section-title em {
  font-style: italic;
}

/* ============================================
   HEADER
   ============================================ */

header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.logo:hover {
  color: var(--coral);
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

nav a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--coral);
  transition: width var(--transition);
}

nav a:hover {
  color: var(--coral);
}

nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-menu-btn.active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background-color: var(--navy);
  color: var(--cream);
}

.btn-primary:hover {
  background-color: var(--coral);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0 var(--space-xl);
  background: var(--cream);
  position: relative;
  overflow: visible;
}

/* Decorative gradient blob */
.hero::before {
  content: "";
  position: absolute;
  top: 10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--pink-light) 0%, transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--coral-light) 0%, transparent 60%);
  opacity: 0.3;
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 560px;
}

.hero-intro {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-lg);
  color: var(--navy);
}

.hero-title em {
  font-style: italic;
}

.hero-book-title {
  margin-bottom: var(--space-lg);
}

.book-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background-color: var(--coral);
  padding: 0.375rem 0.875rem;
  margin-bottom: var(--space-xs);
}

.hero-book-title h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-style: italic;
  font-weight: 400;
  color: var(--navy);
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Book 3D Effect */
.hero-book {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.book-3d {
  perspective: 1200px;
  max-width: 480px;
  margin-right: -80px; /* Allow bleed to right */
  margin-top: -40px;
  margin-bottom: -40px;
}

.book-3d img {
  width: 100%;
  transform: rotateY(-12deg) scale(1.05);
  transition: transform 0.6s ease;
  box-shadow: -30px 30px 60px rgba(5, 0, 108, 0.25),
    -15px 15px 30px rgba(5, 0, 108, 0.18);
}

.book-3d:hover img {
  transform: rotateY(-5deg) scale(1.08);
}

/* ============================================
   FEATURED QUOTE
   ============================================ */

.featured-quote {
  background-color: var(--navy);
  padding: var(--space-xl) 0;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.featured-quote::before {
  content: '"';
  position: absolute;
  top: -40px;
  left: 5%;
  font-family: var(--font-display);
  font-size: 20rem;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  pointer-events: none;
}

.featured-quote blockquote {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.featured-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.featured-quote footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.featured-quote cite {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--coral);
}

.featured-quote footer span {
  font-size: 0.875rem;
  opacity: 0.8;
}

.featured-quote footer em {
  font-style: italic;
}

/* ============================================
   BOOK SECTION
   ============================================ */

.book-section {
  padding: var(--space-xl) 0;
  background-color: var(--white);
}

.book-content {
  max-width: var(--max-width-text);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-sm);
}

.drop-cap {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 0.8;
  color: var(--coral);
  margin-top: 0.05em;
}

.book-description {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--navy);
}

.book-description p {
  margin-bottom: var(--space-md);
  text-align: justify;
  hyphens: auto;
}

.book-description p:last-child {
  margin-bottom: 0;
}

.book-description em {
  font-style: italic;
}

.cta-text {
  padding-top: var(--space-sm);
  border-top: 2px solid var(--cream-dark);
}

/* ============================================
   PRAISE SECTION
   ============================================ */

.praise-section {
  padding: var(--space-xl) 0;
  background-color: var(--cream);
}

.praise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.praise-item {
  padding: var(--space-md);
  background-color: var(--white);
  border-left: 4px solid var(--coral);
  transition: transform var(--transition), box-shadow var(--transition);
}

.praise-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(5, 0, 108, 0.08);
}

.praise-item:nth-child(2) {
  border-left-color: var(--pink);
}

.praise-item:nth-child(3) {
  border-left-color: var(--gold);
}

.praise-item:nth-child(4) {
  border-left-color: var(--sky);
}

.praise-item:nth-child(6) {
  border-left-color: var(--pink);
}

.praise-item:nth-child(7) {
  border-left-color: var(--gold);
}

.praise-quote {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--navy);
  margin-bottom: var(--space-sm);
}

.praise-quote em {
  font-style: italic;
}

.praise-author {
  margin-top: var(--space-sm);
}

.author-name {
  display: block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.125rem;
}

.author-bio {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.author-bio em {
  font-style: italic;
}

.praise-divider {
  border: none;
  border-top: 1px solid rgba(5, 0, 108, 0.12);
  margin: var(--space-lg) auto;
  max-width: var(--max-width);
}

/* ============================================
   BIO SECTION
   ============================================ */

.bio-section {
  padding: var(--space-xl) 0;
  background-color: var(--white);
}

.bio-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.bio-text {
  max-width: 480px;
}

.bio-text p {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
  color: var(--navy);
}

.bio-text p:last-child {
  margin-bottom: 0;
}

.bio-text a {
  color: var(--coral);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.bio-text a:hover {
  color: var(--pink);
}

.bio-text em {
  font-style: italic;
}

.bio-image {
  display: flex;
  justify-content: center;
}

.bio-image img {
  max-width: 420px;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(5, 0, 108, 0.12),
    0 8px 24px rgba(5, 0, 108, 0.08);
}

.bio-image {
  flex-direction: column;
  align-items: center;
}

.photo-credit {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.75rem;
  font-style: italic;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ============================================
   ESSAYS SECTION
   ============================================ */

.essays-section {
  padding: var(--space-xl) 0;
  background-color: var(--cream-dark);
}

.essays-list {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.essay-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(5, 0, 108, 0.1);
  transition: all var(--transition);
}

.essay-item:first-child {
  border-top: 1px solid rgba(5, 0, 108, 0.1);
}

.essay-item:hover {
  padding-left: var(--space-sm);
}

.essay-publication {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--navy);
}

.essay-title {
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: right;
}

.essay-item:hover .essay-publication {
  color: var(--coral);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--coral) 0%, var(--pink) 100%);
  color: var(--white);
}

.newsletter-content {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-content h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.newsletter-content p {
  font-size: 1rem;
  opacity: 0.95;
  margin-bottom: var(--space-md);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  max-width: 280px;
  padding: 0.875rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: none;
  background-color: var(--white);
  color: var(--navy);
}

.newsletter-form input::placeholder {
  color: var(--ink-muted);
}

.newsletter-form input:focus {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.newsletter-form .btn-primary {
  background-color: var(--navy);
}

.newsletter-form .btn-primary:hover {
  background-color: var(--gold);
  color: var(--navy);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
  padding: var(--space-xl) 0;
  text-align: center;
  background-color: var(--white);
}

.contact-section p {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: var(--space-sm);
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.contact-email:hover {
  color: var(--coral);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: var(--space-md) 0;
  background-color: var(--navy);
}

footer .container {
  text-align: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--cream);
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
    order: 2;
  }

  .hero-book {
    order: 1;
  }

  .hero-cta {
    justify-content: center;
  }

  .bio-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .bio-text {
    max-width: 100%;
    order: 2;
    text-align: center;
  }

  .bio-image {
    order: 1;
  }

  .praise-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
  }

  .header-inner {
    padding: var(--space-sm);
  }

  nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--cream);
    padding: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    box-shadow: 0 8px 30px rgba(5, 0, 108, 0.1);
  }

  nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  nav ul {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .book-content {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .book-content {
    display: block;
  }

  .drop-cap {
    font-size: 2.75rem;
    float: left;
    line-height: 0.85;
    margin-right: 0.08em;
    margin-top: 0.15em;
  }

  .book-description p {
    text-align: left;
  }

  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }

  .newsletter-form input {
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: 2rem;
  }

  .book-3d {
    max-width: 320px;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
  }

  .essay-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .essay-title {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .praise-item {
    padding: var(--space-sm);
  }

  .bio-text p {
    font-size: 1.125rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text,
.hero-book {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-book {
  animation-delay: 0.15s;
}

/* Selection highlight */
::selection {
  background-color: var(--coral);
  color: var(--white);
}
