/* =====================================================
   STORYLENS - ADAPTED FOR TOBAVERSE DESIGN SYSTEM
===================================================== */

/* HERO */
.story-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 100px;
  background: 
    linear-gradient(
      90deg,
      rgba(7, 24, 38, 0.82) 0%,
      rgba(7, 24, 38, 0.60) 35%,
      rgba(7, 24, 38, 0.35) 65%,
      rgba(7, 24, 38, 0.18) 100%
    ),
    url("../assets/images/storylens/huta-siallagan.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.story-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.story-hero .eyebrow {
  color: var(--clay-light);
}

.story-hero h1 {
  color: var(--paper);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 18px 0 28px;
}

.story-hero h1 em {
  color: var(--clay-light);
  font-style: normal;
}

.story-hero .hero-actions {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.story-hero p {
  color: rgba(251, 249, 244, 0.82);
  font-size: 1.08rem;
  line-height: 1.8;
  max-width: 600px;
}

/* INTRO */
.story-intro {
  padding: 110px 0;
  background: var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
}

.intro-card {
  background: var(--paper);
  border: 1px solid rgba(11, 46, 61, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.intro-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

.intro-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(31, 122, 92, 0.12), rgba(29, 111, 140, 0.12));
  font-size: 1.6rem;
  margin-bottom: 22px;
}

.intro-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.intro-card p {
  color: #48606a;
  line-height: 1.7;
}

/* FEATURED */
.featured-story {
  padding: 110px 0;
  background: linear-gradient(180deg, var(--paper-dim), var(--paper));
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.featured-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.featured-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 16px 0 18px;
}

.featured-content p {
  color: #465e68;
  line-height: 1.8;
}

.story-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.story-info span {
  background: rgba(31, 122, 92, 0.10);
  color: var(--emerald);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* GALLERY */
.story-gallery {
  padding: 110px 0;
  background: var(--paper);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 50px;
}

.story-card{
    display:flex;
    flex-direction:column;

    overflow:hidden;
    border-radius:var(--radius-lg);
    background:#fff;
    border:1px solid rgba(11,46,61,.08);
    box-shadow:var(--shadow-soft);
    transition:.35s;
}

.story-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
}

.story-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.story-card-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:24px;
}

.story-card-content p{
    color:#52616a;
    line-height:1.7;
    margin-bottom:20px;

    flex:1;
}

.story-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 122, 92, 0.12);
  color: var(--emerald);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.story-card p {
  color: #52616a;
  line-height: 1.7;
}

/* ===========================
   STORY BOOK MODAL
=========================== */

.story-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  visibility: hidden;
  transition: 0.4s;
  z-index: 9999;
}

.story-modal.show {
  opacity: 1;
  visibility: visible;
}

/* BOOK COVER */
.book-cover {
  position: absolute;
  width: min(900px, 92%);
  height: 700px;
  z-index: 30;
  perspective: 2500px;
  pointer-events: none;
}

.book-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0b3f45, #0d6058);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: left;
  transition: 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.book-front::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.45),
    rgba(255, 255, 255, 0.08)
  );
}

/* BOOK OPEN ANIMATION */
.book-cover.open .book-front {
  transform: perspective(2200px) rotateY(-170deg);
  box-shadow: -35px 0 60px rgba(0, 0, 0, 0.35);
}

/* BOOK TITLE */
.book-title {
  text-align: center;
  color: #fff;
  padding: 40px;
}

.book-title span {
  letter-spacing: 8px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.book-title h2 {
  font-size: 64px;
  margin: 30px 0;
  font-weight: 800;
}

.book-title p {
  font-size: 30px;
  color: #f2b04c;
}

/* STORY MODAL CONTENT */
.story-modal-content{
    position:absolute;
    width:min(900px,92%);
    max-height:90vh;
    overflow-y:auto;
    background:#fff;
    border-radius:22px;
    box-shadow:0 30px 80px rgba(0,0,0,.25);
    opacity:0;
    transform:scale(.96);
    transition:.5s;
}

.story-modal-content.show{
    opacity:1;
    transform:scale(1);
}

.story-modal-content img{
    width:100%;
    height:340px;
    object-fit:cover;
}
.story-body{
    padding:50px 60px 60px;
    max-width:760px;
    margin:auto;
}

.story-modal-content.show .story-body {
  opacity: 1;
  transform: none;
  transition-delay: 0.55s;
}

.story-category {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: #eef7f2;
  color: #1f7a5c;
  font-weight: 700;
  margin-bottom: 20px;
}

.story-body h2 {
  font-size: 2.7rem;
  margin-bottom: 18px;
}

.story-body p {
  line-height: 2;
  white-space: pre-line;
  color: #4d5d67;
}

.story-divider{
width:80px;
height:4px;
background:linear-gradient(
90deg,
var(--emerald),
var(--clay)
);
border-radius:99px;
margin:25px 0;
}

.close-story {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .intro-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 560px) {
  .story-hero {
    padding: 120px 0 80px;
    min-height: auto;
  }

  .story-hero-content {
    max-width: 100%;
  }

  .story-hero h1 {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .intro-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .book-title h2 {
    font-size: 36px;
  }

  .book-title p {
    font-size: 20px;
  }
}