/* ====== Design Tokens ====== */
:root{
  --bg: #FFFAF1;             
  --bg-2: #EADBC8;           
  --ink: #1a1a1a;             
  --ink-soft:#923737;         
  --accent: #550908;         
  --accent-2:#C18E55;        
  --white:#fff;
  --maxw: 1120px;
  --radius: 18px;
}

/* ====== Reset / Base ====== */
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{
    font-family: 'Kefa', sans-serif;
    font-weight: 500;
    font-style: normal; 
    margin:0; font: 16px/1.6;
    color:var(--ink); background:var(--bg);
}
img{max-width:100%; display:block}
a{color:inherit; text-decoration:none}
h1,h2,h3{
    font-family: "noka", sans-serif;
    font-weight: 500;
    font-style: normal; 
    letter-spacing:.02em; 
    margin:0 0 .5rem}
h1{font-size: clamp(2rem, 3.6vw + .5rem, 3.75rem);}
h2{font-size: clamp(1.25rem, 1.4vw + .6rem, 2rem)}
.container{max-width:var(--maxw); margin-inline:auto; padding-inline: 20px}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0}

/* ====== Header / Nav ====== */
header{
  position:sticky; top:0; z-index:50; backdrop-filter:saturate(160%) blur(6px);
  background:color-mix(in srgb, var(--bg) 85%, #fff); border-bottom:1px solid #e6dccf;
}
.nav{display:flex; align-items:center; justify-content:space-between; gap:16px; height:64px}
.brand{
    font-weight:700; letter-spacing:.06em}
.menu{display:flex; gap:22px; align-items:center}
.menu a{font-weight:600}

/* ====== Simple Tag Navigation ====== */
.tag-nav{
  margin-top: 8px;
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;  
}

.tag-nav a{
  padding: 6px 14px;
  border-radius: 999px;        
  font-size: 0.85rem;
  border: 1px solid #d8c9b3;
  background: #fff8ee;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tag-nav a:hover{
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

html {
  scroll-behavior: smooth;   
}

/* Base: make images fill the cover box */
.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease, box-shadow .25s ease;
  transform-origin: center center;
}

.cover:hover img {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}


@media (max-width: 760px){
  .nav{
    flex-wrap:wrap;
    height:auto;
    padding-block: 10px;
  }

  .menu{
    display:flex;
    gap:16px;
  }
}


/* ====== Hero (split) ====== */
.hero{
  background: linear-gradient(135deg, #0b0b0b 0%, #1b1b1b 55%, #2b2b2b 100%);
  color:var(--white);
  padding: clamp(18px, 2vw, 24px) 0;
}
.hero-wrap{display:grid; grid-template-columns: 1.1fr 1.4fr; gap:24px; align-items:stretch}
.hero .photo{border-radius:var(--radius); overflow:hidden; min-height: 100px;}
.hero .title{display:flex; align-items:center; justify-content:flex-start; padding: clamp(18px, 4vw, 48px)}
.hero p{
  color:#ddd; 
  font-family: "noka", sans-serif;
  font-weight:100;
  }
.hero h1{
  font-family: "noka", sans-serif;
  font-size:64px;
}

@media (max-width: 900px){
  .hero{
    text-align:center;
  }
  .hero-wrap{
    grid-template-columns:1fr;
  }
  .hero .title{
    padding: 20px;
    justify-content:center;
    text-align:center;
  }
  .hero h1{
    font-size:48px;
  }
  .hero .photo {
    margin: 0 auto;
    max-width:320px;
  }
  .hero p{
    margin-inline:auto;
  }
}

/* ====== Pill tagline separator ====== */
.tagline{ text-align:center; color:var(--ink-soft); padding:20px 10px }
.tagline span{display:inline-block; border-top:1px solid #e8dece; padding-top:12px; font-style:italic}

/* ====== Best Sellers (scroll) ====== */
.section{padding: 56px 0}
.section h2{
  color:var(--accent);
}

.section #best{
  text-align:center;
  font-size:32px;
  margin-top:0px;
  margin-bottom:20px;
}

.carousel {
  display: grid;
  gap: 8px;
  padding: 6px 2px 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card{ 
  max-width: 240px;
  border:6px solid #e9dcc8; 
  overflow:hidden}
.card .meta{padding:10px; font-size:.9rem}

@media (max-width: 900px) {
  .carousel {
    place-items: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section h2 {
    margin-bottom:20px;
    font-size:32px;
    text-align: center;
  }
  .card{ 
    max-width: 200px;
  }
}

@media (max-width: 600px) {
  .carousel {
    place-items: center;
    grid-template-columns: 1fr;
  }
  .section h2 {
    text-align: center;
  }
}


/* ====== About / Fun Facts / Career ====== */
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:32px; }

@media (max-width: 900px){ 
  .grid-2 { 
    grid-template-columns: 1fr; 
    margin: 0 100px;
  } 
  
  .grid-2 .img-box{
    max-width: 420px;
    margin-inline: auto;    
  }
  .about-row:nth-child(even) .img-box {
    order: -1; /* This puts the image before the text on mobile for even rows */
  }
}

.about-row { 
  align-items: center; 
}

.about-row + .about-row {
  margin-top: 60px; 
}

.about-row .paragraph {
  text-align: left;
}

.img-box{
  border:6px solid #e9dcc8; 
  overflow:hidden;
  aspect-ratio: 4 / 3;
}

.img-box img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.paragraph p{ 
  margin-top: 6px;
  padding: 0px 0px;
}

.paragraph h2{
  font-family: "noka", sans-serif;
  font-weight: 400;
  font-style:medium;
  padding: 16px 0px;
  font-size:36px;
}
/* ====== Books Page ====== */
.page{display:none}
.page.active{display:block}

.page-hero{
  background: linear-gradient(135deg, #0b0b0b 0%, #1b1b1b 55%, #2b2b2b 100%);
  color:#fff; 
  padding: 100px 0}
.page-hero p{
  font-family: "noka", sans-serif;
  font-weight:100;
}
.shelf{display:grid; gap:18px; grid-template-columns: repeat(4, 1fr)}
.shelf .cover {
  border: 6px solid #e9dcc8;
  background: #e9e2d7;
  overflow: hidden; 
}
.shelf-wrap{
  margin-top:24px;
}
.section #atlas, .section #alexene, .section #upcoming{
  margin-bottom:0px;
}

@media (max-width: 900px){ 
  .shelf{
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  } 
  .shelf .cover {
    max-width: 260px;
  }
}
@media (max-width: 600px) {
  .shelf {
    grid-template-columns: 1fr;
    place-items: center;
    gap: 16px;
  }

  .shelf .cover {
    max-width: 260px;
  }
}


.section small{
  color:var(--ink-soft);
}

/* ====== Footer ====== */
.social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  line-height:40px;
}

.social-top {
  line-height:26px;
}

.social-bottom{
  font-size:14px;
  color:#55090862;
  margin-top: 20px;
  line-height:24px;
}

.social p {
  margin: 2px 0;
}

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

footer {
  background: var(--bg-2); 
  border-top: 1px solid #e2d6c3; 
  padding: 60px 12px 16px;  /* top | left/right | bottom */
  margin-top: 24px;
}

.foot {
  display: flex; 
  justify-content: space-between; 
  align-items: stretch;
  gap: 18px; 
  flex-wrap: wrap;
}

.social strong {
  font-size: 21px;     
  font-weight: 600;
}

.social-links{
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.social-links a{
  text-decoration: none;
  font-size:14px;
  font-weight: 500;
}
