/* =========================================
   Midnight’s Monsoon — FINAL CSS (clean + consolidated)
   - Keeps your current look
   - Fixes poem reel crop (fill width, crop bottom if needed)
   - Compact order form + boxed cover
   ========================================= */

/* ---------- Base tokens ---------- */
:root{
  --line: rgba(255,255,255,.08);
  --shadow: 0 10px 24px rgba(0,0,0,.40);
  --r-lg: 18px;
  --text: #e8ecff;
  --muted:#9aa3c7;
  --blue:#3a6ff7;
}

/* =========================================
   (Legacy) Vertical reel — safe to keep if used elsewhere
   ========================================= */
.reel{
  position:relative; display:flex; gap:1px; padding:2px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.03)
}
.reel::-webkit-scrollbar{display:none}
.reel .sq{
  flex:0 0 auto; width:180px; aspect-ratio:1/1; border-radius:14px;
  background:linear-gradient(135deg,#16223e,#0c1224);
  border:1px solid var(--line); box-shadow:var(--shadow);
  scroll-snap-align:center; position:relative; overflow:hidden; transform:translateZ(0);
}
.reel .sq:hover{transform:scale(1.06); transition:transform .25s ease}

/* =========================================
   Hero cover (float + reveal)
   ========================================= */
.book-mock{
  position:relative; width:100%; aspect-ratio:3/4;
  border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow);
}
.cover-card{
  position:absolute; inset:0; display:grid; place-items:center;
  background:#0f1629; opacity:0; transition:opacity .8s ease-in-out;
}
.cover-card img{ width:100%; height:100%; object-fit:cover; }
.cover-card.show{ opacity:1; z-index:5; }

#heroBook{
  position:relative; width:100%; aspect-ratio:3/4; overflow:hidden;
  border-radius:var(--r-lg);
  background:#0f1629 center/cover no-repeat;
  box-shadow:var(--shadow), inset 0 0 0 1px rgba(255,255,255,.08);
  animation:float 6s ease-in-out infinite;
}
@keyframes float{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
#titleGlass{
  position:absolute; inset:0; display:grid; place-items:center;
  background:linear-gradient(180deg, rgba(15,22,41,.35), rgba(15,22,41,.55));
  backdrop-filter: blur(6px) saturate(1.1); transition:opacity .38s ease; z-index:5;
}
#heroBook::after{
  content:""; position:absolute; inset:0;
  background: radial-gradient(120% 120% at 50% 30%, rgba(0,0,0,.15), rgba(0,0,0,.45));
  transition:opacity .8s ease; z-index:2;
}
#heroBook.reveal::after{ opacity:0; }

/* =========================================
   POEM CAMERA REEL (horizontal)
   - Cards fill edge-to-edge; bottom may crop
   - Tight inter-card gap
   ========================================= */
.poems-reel-section .header{ margin-bottom:12px; }

.camera-reel-wrap{
  position:relative; width:100%; overflow:hidden;
  padding: 8px 0 4px;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 60px, transparent calc(100% - 60px), rgba(0,0,0,.25));
  border-radius:18px;
}

/* Track */
.camera-reel{
  --h: 190px;     /* strip height */
  --gap: 6px;     /* inter-card spacing */
  --rad: 12px;    /* card radius */
  position:relative; display:inline-flex; align-items:center;
  gap: var(--gap); height: var(--h);
  padding: 0 34px;   /* arrow gutters */
  will-change: transform;
}
@media (max-width: 860px){ .camera-reel{ --h: 170px; --gap: 6px; } }
@media (max-width: 560px){ .camera-reel{ --h: 150px; --gap: 6px; padding: 0 28px; } }

/* Card */
.poem-frame{
  position:relative;
  height: calc(var(--h) - 6px);
  aspect-ratio:1/1;                    /* portrait poems look better */
  width: auto;
  border-radius: var(--rad);
  overflow:hidden;
  background:#0f1630;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, var(--shadow);
  transform-style:preserve-3d;
  transition: transform .18s ease, box-shadow .18s ease, z-index .18s ease, filter .2s ease;
  will-change: transform;
  opacity:0; animation: reelPop .25s ease forwards;
}
@keyframes reelPop{ from{opacity:0; transform:scale(.94)} to{opacity:1; transform:scale(1)} }

/* Image — FILL WIDTH & HEIGHT (no side bars). Crop bottom if needed. */
.poem-img{
  position:absolute; inset:0;
  width:100%; height:100%; display:block;
  object-fit: cover;                  /* fills completely */
  object-position: top center;        /* keep top; crop bottom first */
  backface-visibility:hidden;
  filter:saturate(1.04) contrast(1.03);
  transition: transform .18s ease, filter .2s ease;
}

/* Hover (desktop) */
@media (hover:hover){
  .poem-frame:hover{
    z-index:5; transform: translateZ(0) scale(1.06);
    box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05) inset;
  }
  .poem-frame:hover .poem-img{ filter:saturate(1.14) contrast(1.07); }
}

/* Optional caption (off by default) */
.poem-cap{
  position:absolute; left:10px; bottom:10px;
  padding:6px 9px; background:rgba(11,16,48,.55);
  border:1px solid rgba(255,255,255,.08); backdrop-filter: blur(4px);
  color:#e8ecff; font:600 12px/1.2 Inter, system-ui; border-radius:10px; display:none;
}

/* Arrows */
.reel-btn{
  position:absolute; top:50%; transform:translateY(-50%);
  width:46px; height:46px; border:none; border-radius:50%;
  background: rgba(20,28,58,.75); color:#e8ecff; font-size:28px; line-height:1;
  display:grid; place-items:center; cursor:pointer; user-select:none;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  transition: transform .15s ease, background .15s ease, opacity .2s ease;
  z-index:10;
}
.reel-btn.left{ left:12px; } .reel-btn.right{ right:12px; }
.reel-btn:hover{ background: rgba(34,48,94,.9); transform: translateY(-50%) scale(1.05); }
.reel-btn:active{ transform: translateY(-50%) scale(.98); }

.camera-reel::-webkit-scrollbar{ display:none; }

/* =========================================
   Contact
   ========================================= */
#contact{
  padding:80px 20px; background:#0f1630; color:var(--text);
}
#contact .container{ max-width:1100px; margin:0 auto; }
#contact .section-h{ text-align:center; font-size:2rem; margin-bottom:2rem; }
.contact-links{ display:flex; flex-direction:column; gap:12px; margin-bottom:40px; text-align:center; }
.pill-link{
  display:inline-block; padding:12px 22px; border-radius:40px;
  background:var(--blue); color:#fff; font-weight:600; text-decoration:none; transition:background .3s ease;
}
.pill-link:hover{ background:#ff2b2b; }
.contact-links .note{ font-size:.9rem; color:var(--muted); }
.contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:start; }
.contact-form .row{ display:flex; gap:20px; margin-bottom:18px; }
.contact-form .row.single{ flex-direction:column; }
.contact-form label{ font-size:.9rem; display:block; margin-bottom:6px; }
.contact-form input,.contact-form textarea{
  width:100%; padding:12px 14px; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.05);
  color:#fff; font-size:1rem;
}
.contact-form .actions{ margin-top:20px; display:flex; gap:14px; }
.contact-form .btn{ padding:12px 20px; border-radius:8px; border:none; cursor:pointer; font-weight:600; background:var(--blue); color:#fff; }
.contact-form .btn.ghost{ background:transparent; border:1px solid var(--muted); color:var(--muted); }
.msg-toast{ margin-top:15px; font-size:.9rem; color:#ff7a18; }
.contact-grid img{ display:block; margin:0 auto; max-width:100%; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.4); }
@media(max-width:768px){ .contact-grid{ grid-template-columns:1fr; } }

/* =========================================
   ORDER (Form + Cover)
   ========================================= */
#order{ padding:72px 20px; }
#order .section-h{ margin-bottom:8px; text-align:center; }

/* Grid */
#order .order-grid{
  display:grid; grid-template-columns:1.05fr .95fr; gap:10px; align-items:start;
}

/* Cover panel */
#order .order-cover-wrap{
  width:100%; aspect-ratio:5/7; border-radius:16px;
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
  overflow:hidden; position:relative; box-shadow:0 18px 40px rgba(0,0,0,.34);
}
#order #orderCover{
  width:100%; height:100%; display:block; object-fit:cover; cursor:zoom-in;
  transition: transform .35s ease, filter .35s ease;
}
#order #orderCover:hover{ transform:scale(1.02); }

/* Zoom */
#order #orderCover.zoomed{
  position:fixed !important; inset:0; margin:auto;
  width:min(92vmin,980px); height:auto; max-height:92vh;
  z-index:9999; cursor:zoom-out; border-radius:18px;
  box-shadow:0 28px 64px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.08) inset;
  filter:brightness(1.04) contrast(1.04);
}
body.order-zoom-active::after{ content:""; position:fixed; inset:0; background:rgba(0,0,0,.18); z-index:9998; }

/* Form */
#order .form{
  background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding:10px 8px; box-shadow:0 14px 34px rgba(0,0,0,.26);
}
#order .row{ display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:4px; }
#order .row.single{ grid-template-columns:1fr; }
#order label{ font-size:.92rem; display:block; margin-bottom:6px; color:var(--muted); }
#order .input,#order textarea{
  width:100%; padding:8px 10px; border-radius:10px;
  border:1px solid rgba(255,255,255,.1); background:rgba(255,255,255,.05);
  color:var(--text); font-size:1rem;
}
#order textarea{ resize:vertical; }
#order .price{ margin:14px 0 6px; font-size:1.08rem; display:flex; justify-content:space-between; gap:10px; }
#order .form-actions{ display:flex; gap:12px; margin:8px 0 10px; }
#order .btn{ padding:12px 8px; border-radius:10px; border:0; cursor:pointer; font-weight:600; background:var(--blue); color:#fff; }
#order .btn.ghost{ background:transparent; border:1px solid var(--muted); color:var(--muted); }
#order .fine{ color:var(--muted); font-size:.9rem; }

@media (max-width:980px){
  #order .order-grid{ grid-template-columns:1fr; gap:20px; }
  #order .row{ grid-template-columns:1fr; }
  #order .order-cover-wrap{ min-height:420px; }
}

/* =========================
   HARDENED OVERRIDES (keep last)
   ========================= */
#poems .camera-reel{ gap:6px !important; }
#poemReelTrack > *{ margin:0 !important; }
