/* ===== VARIABLES & RESET ===== */
:root {
  --primary: #1a2744;
  --accent: #c9a84c;
  --bg: #0d1526;
  --text: #f0ede6;
  --light: #e8e0d0;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

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

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--light);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #dbb955;
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
}

.btn-gold {
  background: var(--accent);
  color: var(--bg);
}

.btn-gold:hover {
  background: #dbb955;
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

/* ===== NAV ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: rgba(13, 21, 38, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 80px;
  width: auto;
}

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

.nav-links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, #1a2744 0%, #0d1526 70%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
}

.signature {
  width: clamp(300px, 65vw, 520px);
  height: auto;
  margin: 0 auto 2rem;
  display: block;
  overflow: visible;
}



.sig-stroke {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

/* sig-char paths animated sequentially via JS */
.sig-dot { opacity: 0; }
.sig-char { opacity: 0; }
/* No-JS fallback: if JS never runs, show everything */
.no-js .sig-char { opacity: 1; }
.no-js .sig-dot { opacity: 1; }

@keyframes drawStroke {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--light);
  min-height: 2.5rem;
  margin-bottom: 0.4rem;
}

.tagline-korean {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  color: var(--accent);
  min-height: 1.6rem;
  margin-bottom: 2rem;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tagline-korean.visible {
  opacity: 1;
}

.cursor {
  animation: blink 0.8s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-cta {
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(201, 168, 76, 0.5);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ===== SECTION COMMON ===== */
section {
  padding: 6rem 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--light);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ===== HERO CTAS ===== */
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta-secondary {
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}

/* ===== FEATURED BOOK ===== */
#featured-book {
  background: linear-gradient(180deg, var(--bg) 0%, #111d33 100%);
  padding: 6rem 0;
}

.featured-book-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.featured-book-cover {
  position: relative;
  text-align: center;
}

.badge-new {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 1rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

.featured-cover {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(201,168,76,0.15);
}

.featured-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.featured-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--light);
  margin-bottom: 0.3rem;
  line-height: 1.1;
}

.featured-author {
  color: rgba(240,237,230,0.6);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.featured-blurb {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(240,237,230,0.85);
  margin-bottom: 2rem;
}

.featured-blurb em {
  color: var(--accent);
  font-style: italic;
}

.featured-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== BOOK BLURB ===== */
.book-blurb {
  font-size: 0.9rem;
  color: rgba(240,237,230,0.65);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ===== BOOKS ===== */
#books {
  background: linear-gradient(180deg, var(--bg) 0%, #111d33 50%, var(--bg) 100%);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1000px;
  margin: 0 auto;
  gap: 2.5rem;
  align-items: start;
}

.book-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  background: rgba(26, 39, 68, 0.4);
  border: 1px solid rgba(201, 168, 76, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book-card:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 0 20px 50px rgba(201, 168, 76, 0.15);
}

.book-cover-wrap {
  position: relative;
  margin-bottom: 1.5rem;
  perspective: 800px;
}

.book-cover {
  width: auto;
  height: 267px;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book-card:hover .book-cover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(201, 168, 76, 0.15);
}

.book-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
  color: var(--light);
}

.book-author {
  font-size: 0.9rem;
  color: rgba(240, 237, 230, 0.6);
  margin-bottom: 1.2rem;
}

/* Coming Soon Badge */
.badge-coming {
  position: absolute;
  top: 10px;
  right: -5px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 3px;
  z-index: 2;
  letter-spacing: 0.05em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(201, 168, 76, 0); }
}

/* ===== ABOUT ===== */
#about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

.photo-pair {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
}

/* Diamond layout for About photos */
.diamond-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.diamond-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.diamond-top,
.diamond-bottom {
  justify-content: center;
}

.photo-pair-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.photo-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-style: italic;
}

.photo-frame {
  width: 175px;
  height: 175px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(201, 168, 76, 0.25);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.photo-frame--magik img {
  object-position: center;
}

/* J.J. photo frame background to blend with top of image */
.photo-frame--jj {
  background-color: #564f4c;
}

/* Individual photo position tweaks */
.photo-jj {
  object-position: 50% 10px !important;
}

.photo-drpark {
  object-position: 50% -16px !important;
}

/* Seal styled as a framed circle like the portraits */
.photo-frame--seal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 156px;
  background: #ffffff;
  padding: 9px;
  overflow: visible;
}

.seal-ring-text {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.seal-ring-text text {
  fill: var(--accent);
  font-family: var(--font-heading);
  font-size: 17px;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.seal-ring-text__top {
  transform: none;
}

.seal-ring-text__bottom {
  transform: rotate(2deg);
  transform-origin: 50% 50%;
}

.seal-ring-text textPath {
  dominant-baseline: middle;
}

.korean-seal-img {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: calc(50% + 1px) 50% !important;
  border-radius: 50%;
  opacity: 1;
}

.korean-seal-wrap {
  margin-top: 1.5rem;
  text-align: center;
}

/* Coming Soon book card */
.book-card--coming-soon {
  opacity: 0.7;
}

.book-cover--soon {
  filter: grayscale(80%) blur(0.5px);
  opacity: 0.5;
}

.btn-disabled {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

.korean-seal {
  width: 90px;
  height: auto;
  opacity: 0.85;
  filter: drop-shadow(0 2px 8px rgba(201, 168, 76, 0.35));
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.korean-seal:hover {
  opacity: 1;
  transform: scale(1.05);
}

.about-text p {
  margin-bottom: 1rem;
  color: rgba(240, 237, 230, 0.85);
}

.about-text em {
  color: var(--accent);
  font-style: italic;
}

.fun-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.fact {
  text-align: center;
  min-width: 120px;
}

.fact-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.fact span {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--light);
}

/* ===== TESTIMONIALS ===== */
#testimonials {
  background: linear-gradient(180deg, var(--bg) 0%, #111d33 50%, var(--bg) 100%);
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-track-container {
  overflow: hidden;
  flex: 1;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: center;
}

.carousel-slide img {
  max-height: 400px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  max-width: 680px;
  margin: 0 auto;
}

.testimonial-avatar-frame {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  margin: 0 auto 1.5rem;
  flex-shrink: 0;
}

.testimonial-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin: 0;
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--light);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 1rem;
}

.testimonial-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.carousel-btn {
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--accent);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.25);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

/* ===== NEWSLETTER ===== */
#newsletter {
  background: var(--bg);
}

.newsletter-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(26, 39, 68, 0.4);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 12px;
}

.newsletter-box h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--light);
  margin-bottom: 0.5rem;
}

.newsletter-sub {
  color: rgba(240, 237, 230, 0.7);
  margin-bottom: 2rem;
}

.newsletter-fallback {
  margin-top: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  max-width: 320px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
  background: rgba(13, 21, 38, 0.8);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.newsletter-form input::placeholder {
  color: rgba(240, 237, 230, 0.4);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== CONTACT ===== */
#contact {
  background: linear-gradient(180deg, var(--bg) 0%, #111d33 100%);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: var(--light);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 4px;
  background: rgba(13, 21, 38, 0.6);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
}

.contact-form .btn {
  width: 100%;
}

.contact-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.4rem;
}

.contact-status.success { color: #6fcf97; }
.contact-status.error   { color: #eb5757; }

/* ===== FOOTER ===== */
#footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(201, 168, 76, 0.1);
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  height: 72px;
  margin: 0 auto 1.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: var(--accent);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
}

.social-links a:hover {
  background: transparent;
  color: var(--accent);
}

.copyright {
  font-size: 0.8rem;
  color: rgba(240, 237, 230, 0.4);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .featured-book-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .featured-ctas {
    justify-content: center;
  }
  .featured-cover {
    max-width: 200px;
  }
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: rgba(13, 21, 38, 0.98);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    right: 0;
  }

  .books-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }

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

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

  .fun-facts {
    gap: 1rem;
  }

  .fact {
    min-width: 90px;
  }

  section {
    padding: 4rem 0;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
