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

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --hot-pink:       #ff2d78;
  --deep-pink:      #d91a5e;
  --spine-pink:     #b8154f;
  --blush-light:    #ff6fa3;
  --cover-texture:  #e8185a;
  --cream:          #fdf6ec;
  --cream-dark:     #f0e4cf;
  --ink:            #1a0a10;
  --ink-mid:        #6b2240;
  --gold:           #c9a96e;
  --elastic-color:  #1a0a10;

  --journal-w: min(380px, 82vw);
  --journal-h: calc(var(--journal-w) * 1.38);
  --spine-w:   calc(var(--journal-w) * 0.09);
  --radius:    4px;
}

/* ─── Body / Scene ────────────────────────────────────────── */
html, body {
  min-height: 100vh;
  background: #ff2d78;
  background-image:
    radial-gradient(ellipse at 30% 20%, #ff6fa3 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, #d91a5e 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  font-family: 'Lora', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.scene {
  position: relative;
  display: flex;
  align-items: flex-start;
  animation: floatIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ─── Journal shell ───────────────────────────────────────── */
.journal {
  position: relative;
  display: flex;
  width: calc(var(--journal-w) + var(--spine-w));
  height: var(--journal-h);
  filter:
    drop-shadow(-6px 8px 24px rgba(0,0,0,0.7))
    drop-shadow(-2px 2px 6px rgba(0,0,0,0.5));
}

/* ─── Spine ───────────────────────────────────────────────── */
.spine {
  width: var(--spine-w);
  height: 100%;
  background:
    linear-gradient(
      to right,
      var(--spine-pink) 0%,
      var(--deep-pink)  40%,
      var(--cover-texture) 100%
    );
  border-radius: var(--radius) 0 0 var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.spine__text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(0.5rem, 1.5vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* ─── Front Cover ─────────────────────────────────────────── */
.cover {
  position: relative;
  flex: 1;
  height: 100%;
  background:
    /* subtle grain texture via layered gradients */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.012) 2px,
      rgba(255,255,255,0.012) 4px
    ),
    linear-gradient(
      160deg,
      var(--blush-light)    0%,
      var(--hot-pink)       30%,
      var(--cover-texture)  60%,
      var(--deep-pink)      100%
    );
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
}

/* leather-like sheen */
.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.18) 0%,
      transparent            40%,
      rgba(0,0,0,0.15)       100%
    );
  pointer-events: none;
}

/* ─── Cover Inner (padding container) ────────────────────── */
.cover__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8% 10%;
}

/* ─── Embossed border lines ───────────────────────────────── */
.emboss-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.emboss-line {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.28);
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.emboss-line--thin {
  height: 1px;
  background: rgba(255,255,255,0.16);
}

/* ─── Body text ───────────────────────────────────────────── */
.cover__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.label {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(0.58rem, 1.6vw, 0.7rem);
  font-style: italic;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
}

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  line-height: 1.05;
}

.title em {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(1.7rem, 7vw, 2.8rem);
  font-style: italic;
  font-weight: 400;
  color: #fff;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.3),
    0 0 30px rgba(255,180,210,0.25);
  letter-spacing: 0.01em;
}

.title span {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(0.7rem, 2.5vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.35);
}

.divider__mark {
  font-size: 0.5rem;
  color: rgba(255,255,255,0.6);
}

.coming-soon {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(0.62rem, 1.8vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* ─── Corner protectors ───────────────────────────────────── */
.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(0,0,0,0.18);
}

.corner--tl { top: 0;    left: 0;    border-radius: 0 0 4px 0; }
.corner--tr { top: 0;    right: 0;   border-radius: 0 var(--radius) 0 4px; }
.corner--bl { bottom: 0; left: 0;    border-radius: 4px 0 0 0; }
.corner--br { bottom: 0; right: 0;   border-radius: 4px 0 var(--radius) 0; }

/* ─── Elastic band ────────────────────────────────────────── */
.elastic {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--journal-w) + var(--spine-w));
  height: 9px;
  background:
    linear-gradient(
      to bottom,
      #1a0a10 0%,
      #2e1020 30%,
      #1a0a10 100%
    );
  z-index: 10;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.04);
}

/* ─── Pages edge ──────────────────────────────────────────── */
.pages-edge {
  position: absolute;
  right: -5px;
  top: 3px;
  bottom: 3px;
  width: 5px;
  background: repeating-linear-gradient(
    to bottom,
    var(--cream-dark) 0px,
    var(--cream)      1px,
    var(--cream)      2px,
    var(--cream-dark) 3px
  );
  border-radius: 0 1px 1px 0;
  opacity: 0.9;
}

/* ─── Table shadow ────────────────────────────────────────── */
.table-shadow {
  position: absolute;
  bottom: -20px;
  left: 5%;
  width: 90%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45) 0%, transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

/* ─── Copyright ───────────────────────────────────────────── */
.copyright {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(0.6rem, 1.6vw, 0.68rem);
  font-style: italic;
  letter-spacing: 0.12em;
  color: rgba(120,0,50,0.55);
  text-align: center;
}

/* ─── Animation ───────────────────────────────────────────── */
@keyframes floatIn {
  from {
    opacity: 0;
    transform: perspective(800px) rotateX(8deg) translateY(30px);
  }
  to {
    opacity: 1;
    transform: perspective(800px) rotateX(0deg) translateY(0);
  }
}
