/* =============================================
   Ken Miles — kenmiles.ca
   Modern Static Site Stylesheet
   ============================================= */

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

:root {
  --navy:    #1a2a3a;
  --navy-light: #243347;
  --gold:    #c9922c;
  --gold-light: #e8b860;
  --cream:   #faf8f4;
  --white:   #ffffff;
  --text:    #2c2c2c;
  --text-muted: #6b7280;
  --border:  #e5e7eb;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --max-w: 1160px;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }
em { font-style: italic; }
strong { font-weight: 600; }

/* --- Layout --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-eyebrow.light { color: var(--gold-light); }
.section-eyebrow.center, h2.center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all .2s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201,146,44,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  color: var(--white);
}

.btn-amazon {
  background: #FF9900;
  color: #111;
  border-color: #FF9900;
  font-size: 1.05rem;
  padding: 16px 40px;
}
.btn-amazon:hover {
  background: #e68a00;
  border-color: #e68a00;
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,153,0,0.4);
}

.btn-full { width: 100%; justify-content: center; }

/* =============================================
   NAV
   ============================================= */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: transparent;
  transition: background .3s, box-shadow .3s;
}
#nav.scrolled {
  background: var(--navy);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width .2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .3s;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 35, 0.82) 0%,
    rgba(26, 42, 58, 0.65) 50%,
    rgba(10, 20, 35, 0.5) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 60px) 24px 80px;
  max-width: 780px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero h1 em { color: var(--gold-light); }

.hero-sub {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.life-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 40px;
  padding: 6px 18px;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  backdrop-filter: blur(8px);
  transition: background .2s;
}
.badge:hover { background: rgba(201,146,44,0.3); border-color: var(--gold); }
.badge small {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.7);
}
.badge-L { border-color: rgba(201,146,44,0.5); }
.badge-I { border-color: rgba(201,146,44,0.4); }
.badge-F { border-color: rgba(201,146,44,0.3); }
.badge-E { border-color: rgba(201,146,44,0.2); }

/* =============================================
   BOOK SECTION
   ============================================= */
.section-book { background: var(--cream); }

.book-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

.book-image-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.book-cover {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: transform .3s;
}
.book-cover:hover { transform: scale(1.02) rotate(-1deg); }

.book-questions {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.book-questions p { color: var(--text-muted); margin-bottom: 0.5rem; }
.book-questions p:last-child { margin-bottom: 0; }

.life-pillars {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pillar {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.pillar:hover { transform: translateX(4px); box-shadow: var(--shadow-lg); }

.pillar-letter {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.section-about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 80px;
  align-items: center;
}

.about-photo-wrap {
  position: relative;
}
.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -16px -16px 16px 16px;
  border: 3px solid var(--gold);
  border-radius: var(--radius);
  z-index: 0;
  opacity: 0.4;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  display: block;
}

/* =============================================
   BUY SECTION
   ============================================= */
.section-buy {
  position: relative;
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.buy-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.buy-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,20,35,0.88), rgba(26,42,58,0.78));
}

.buy-content {
  position: relative;
  z-index: 2;
}

.section-buy h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.buy-sub {
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
}

/* =============================================
   REVIEWS SECTION
   ============================================= */
.section-reviews { background: var(--cream); }

.section-reviews h2 { margin-bottom: 3rem; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform .2s, box-shadow .2s;
  border-top: 3px solid var(--gold);
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stars { color: var(--gold); font-size: 1rem; letter-spacing: 2px; }

blockquote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
  flex: 1;
}
blockquote::before { content: '\201C'; }
blockquote::after  { content: '\201D'; }

cite {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
cite strong { color: var(--navy); font-size: 0.95rem; }
cite span   { color: var(--text-muted); font-size: 0.8rem; }

/* =============================================
   CONTACT SECTION
   ============================================= */
.section-contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info p  { color: var(--text-muted); }

.contact-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
}
.contact-detail svg { color: var(--gold); flex-shrink: 0; }
.contact-detail a { color: var(--text); font-weight: 500; }
.contact-detail a:hover { color: var(--gold); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,146,44,0.12);
  background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #b0b8c4;
}

/* Form status message */
.form-status {
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: 6px;
  display: none;
}
.form-status.success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.form-status.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--navy);
  padding: 60px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer-brand .footer-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
  font-weight: 700;
  display: block;
  margin-bottom: 0.35rem;
}
.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
}
.footer-bottom p {
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  margin: 0;
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: var(--gold); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .book-grid { grid-template-columns: 280px 1fr; gap: 48px; }
  .about-grid { grid-template-columns: 1fr 360px; gap: 48px; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
  .nav-links a::after { display: none; }

  .hero-content { padding-top: calc(var(--nav-h) + 40px); }
  .hero-actions { flex-direction: column; }
  .life-badges { gap: 0.6rem; }
  .badge { font-size: 1.1rem; padding: 5px 14px; }

  .book-grid { grid-template-columns: 1fr; }
  .book-image-wrap { position: static; max-width: 260px; margin: 0 auto; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { order: -1; max-width: 320px; margin: 0 auto; }
  .about-photo-wrap::before { display: none; }

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

  .form-row { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .footer-links { gap: 1rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .hero-sub { font-size: 1rem; }
  .buy-sub { font-size: 1rem; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate {
  opacity: 0;
  transform: translateY(24px);
}
.animate.visible {
  animation: fadeUp 0.6s ease forwards;
}
.animate:nth-child(2) { animation-delay: 0.1s; }
.animate:nth-child(3) { animation-delay: 0.2s; }
.animate:nth-child(4) { animation-delay: 0.3s; }
.animate:nth-child(5) { animation-delay: 0.4s; }
.animate:nth-child(6) { animation-delay: 0.5s; }

/* Scroll progress bar */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--gold);
  z-index: 2000;
  transition: width 0.1s linear;
}
