/* ═══════════════════════════════════════════
   JOURNALS — Notebook Cards
   ═══════════════════════════════════════════ */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }

/* ── header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(0,212,255,.15);
  background: rgba(8,6,13,.85);
}

.back-btn {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,212,255,.2);
  border-radius: 50%;
  background: rgba(0,212,255,.05);
  transition: background .2s, border-color .2s, transform .15s;
}
.back-btn:hover {
  background: rgba(0,212,255,.12);
  border-color: var(--pink);
}
.back-btn:active { transform: scale(.92); }

.logo {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--gold);
  letter-spacing: .1em;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4vh, 3rem) 1.25rem clamp(.5rem, 1.5vh, 1rem);
}

.hero__title {
  font-family: 'Righteous', cursive;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--pink);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 .3rem;
}

.hero__sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--cyan);
  margin-top: 0;
  text-shadow: 0 0 20px rgba(0,212,255,.1);
}

/* ═══════════════════════════════════════════
   JOURNAL GRID — NOTEBOOK CARDS
   ═══════════════════════════════════════════ */
.journal-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0 1.25rem clamp(1rem, 2vh, 2rem);
  max-width: 700px;
  margin: 0 auto;
}

.journal-card {
  flex: 1;
  max-width: 200px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 600px;
}

.journal-card__book {
  position: relative;
  display: flex;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
  box-shadow:
    3px 4px 12px rgba(0,0,0,.4),
    0 0 0 1px rgba(255,255,255,.04);
}

.journal-card:hover .journal-card__book {
  transform: translateY(-6px) rotateY(-3deg);
  box-shadow:
    6px 8px 24px rgba(0,0,0,.5),
    0 0 20px hsla(var(--card-hue), 60%, 60%, .1);
}

/* spine */
.journal-card__spine {
  width: 14px;
  flex-shrink: 0;
  background: hsla(var(--card-hue), 50%, 35%, .6);
  border-right: 1px solid hsla(var(--card-hue), 40%, 50%, .15);
}

/* page */
.journal-card__page {
  flex: 1;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 160px;
  background:
    linear-gradient(
      160deg,
      hsla(var(--card-hue), 40%, 60%, .06) 0%,
      hsla(var(--card-hue), 30%, 50%, .03) 100%
    );
  border: 1px solid hsla(var(--card-hue), 40%, 60%, .12);
  border-left: none;
  border-radius: 0 10px 10px 0;
  position: relative;
}

/* subtle ruled lines */
.journal-card__page::before {
  content: '';
  position: absolute;
  inset: 12px 8px;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 22px,
    hsla(var(--card-hue), 30%, 50%, .06) 22px,
    hsla(var(--card-hue), 30%, 50%, .06) 23px
  );
  pointer-events: none;
}

/* top corner wear */
.journal-card__page::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 20px;
  background: linear-gradient(225deg, rgba(0,14,26,.4) 0%, transparent 70%);
  border-radius: 0 10px 0 0;
  pointer-events: none;
}

.journal-card__name {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: hsla(var(--card-hue), 50%, 75%, .9);
  text-shadow: 0 0 12px hsla(var(--card-hue), 50%, 60%, .15);
}

.journal-card__tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  color: hsla(var(--card-hue), 40%, 60%, .5);
  letter-spacing: .2em;
}

.journal-card:hover .journal-card__name {
  color: hsla(var(--card-hue), 60%, 80%, 1);
  text-shadow: 0 0 18px hsla(var(--card-hue), 50%, 60%, .25);
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: .6rem 1rem;
}
.footer__divider {
  width: 60px; height: 2px; margin: 0 auto .5rem;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 1px;
  opacity: .5;
}
.footer__text {
  font-family: var(--font-display);
  font-size: .8rem;
  color: var(--gold);
  letter-spacing: .1em;
  min-height: 1.2em;
}
.footer__credit {
  font-family: var(--font-mono);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .15em;
  margin-top: .3rem;
  opacity: .8;
}

/* ═══════════════════════════════════════════
   TABBAR
   ═══════════════════════════════════════════ */
.tabbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  display: none;
  justify-content: space-around;
  background: rgba(4,14,26,.95);
  border-top: 1px solid rgba(0,212,255,.2);
  box-shadow: 0 -6px 24px -16px rgba(0,0,0,.8);
  z-index: 1000;
  padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
}
.tabbar__indicator {
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--pink), var(--gold));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px var(--glow-pink);
  transition: transform .4s cubic-bezier(.22,.8,.25,1), width .3s;
  pointer-events: none;
}
.tabbar__item {
  flex: 1; text-align: center;
  padding: .5rem .3rem .4rem;
  border-radius: 10px;
  transition: background .3s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.tabbar__item:active { transform: translateY(1px); }
.tabbar__ico { font-size: 1.15rem; display: block; }
.tabbar__label {
  font-family: var(--font-display);
  font-size: .6rem; letter-spacing: .08em;
  color: var(--dim);
  display: block; margin-top: 2px;
  transition: color .3s;
}
.tabbar__item.active {
  background: rgba(0,212,255,.1);
}
.tabbar__item.active .tabbar__label { color: var(--gold); }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .tabbar { display: flex; }
  body { padding-bottom: 0; }
  .header { padding: .6rem 1rem; }
  .hero { padding: 1.2rem 1rem .5rem; }
  .journal-grid {
    gap: .8rem;
    padding: 0 1rem 1rem;
    flex-direction: column;
    align-items: center;
  }
  .journal-card {
    max-width: 280px;
    width: 100%;
  }
  .journal-card__page {
    padding: 1.2rem .8rem;
    min-height: 120px;
  }
}
@media (min-width: 601px) {
  .tabbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
