/* ── Landing page ──────────────────────────────────────
   Zotero-inspired full landing page for unauthenticated
   visitors. Nav + hero + 6 stage sections + about + modal.
   ───────────────────────────────────────────────────── */

/* ── Page shell ──────────────────────────────── */
.landing-page{
  position:fixed;inset:0;z-index:9999;
  overflow-y:auto;overflow-x:hidden;
  background:var(--cream, #FAF6F0);
  font-family:var(--sans, 'Segoe UI',system-ui,-apple-system,sans-serif);
  color:var(--text, #35201A);
  line-height:1.6;
}

/* ── Fixed nav bar ───────────────────────────── */
.landing-nav{
  position:fixed;top:0;left:0;right:0;z-index:10000;
  transition:background .3s,box-shadow .3s;
}
.landing-nav.scrolled{
  background:rgba(53,32,26,.97);
  box-shadow:0 2px 20px rgba(0,0,0,.3);
}
.landing-nav-inner{
  max-width:1100px;margin:0 auto;
  padding:.7rem 2rem;
  display:flex;align-items:center;justify-content:space-between;
}
.landing-nav-brand{
  font-family:'Great Vibes',cursive;
  font-size:1.6rem;font-weight:400;
  color:#FAF6F0;letter-spacing:.2px;line-height:1;
  opacity:0;transition:opacity .3s;
  text-decoration:none;
}
.fonts-loaded .landing-nav-brand{opacity:1}
.landing-nav-links{
  display:flex;align-items:center;gap:.6rem;
}
.landing-nav-link{
  font-size:.78rem;font-weight:500;color:rgba(250,246,240,.7);
  text-decoration:none;padding:.35rem .7rem;
  transition:color .15s;letter-spacing:.3px;
}
.landing-nav-link:hover{color:#FAF6F0}
.landing-nav-btn{
  font-size:.76rem;font-weight:600;
  padding:.4rem 1rem;border-radius:5px;
  cursor:pointer;transition:all .15s;
  letter-spacing:.3px;
}
.landing-nav-btn.ghost{
  background:none;border:1px solid rgba(250,246,240,.3);
  color:#FAF6F0;
}
.landing-nav-btn.ghost:hover{
  border-color:rgba(250,246,240,.6);background:rgba(250,246,240,.08);
}
.landing-nav-btn.primary{
  background:var(--gold, #9E7A3C);border:1px solid var(--gold, #9E7A3C);
  color:var(--brown-dark, #35201A);
}
.landing-nav-btn.primary:hover{
  background:var(--gold-light, #B89868);border-color:var(--gold-light, #B89868);
}

/* ── Hero section ────────────────────────────── */
.landing-hero{
  position:relative;
  min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  background:url('../img/hero-library.jpg') center/cover no-repeat fixed;
  text-align:center;
}
.landing-hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(
    180deg,
    rgba(35,20,15,.70) 0%,
    rgba(35,20,15,.78) 50%,
    rgba(35,20,15,.88) 100%
  );
}
.landing-hero-content{
  position:relative;z-index:1;
  max-width:680px;padding:6rem 2rem 4rem;
}
.landing-hero-brand-row{
  display:flex;align-items:flex-start;justify-content:center;gap:10px;
  margin-bottom:.3rem;
}
.landing-hero-brand{
  font-family:'Great Vibes',cursive;
  font-size:5.2rem;font-weight:400;
  color:#FAF6F0;letter-spacing:.2px;line-height:1;
  opacity:0;transition:opacity .3s;
}
.fonts-loaded .landing-hero-brand{opacity:1}
.landing-hero-beta{
  display:inline-block;font-size:.6rem;font-weight:700;
  font-family:var(--sans, 'Segoe UI',system-ui,-apple-system,sans-serif);
  letter-spacing:.6px;text-transform:uppercase;
  color:var(--gold-light, #B89868);
  border:1px solid rgba(184,152,104,.45);
  border-radius:4px;padding:2px 7px;line-height:1;
  margin-top:.9rem;
}
.landing-hero-tagline{
  font-size:1.05rem;color:var(--gold-light, #B89868);
  font-weight:500;letter-spacing:.6px;text-transform:uppercase;
  margin-bottom:1.6rem;
  text-shadow:0 0 6px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.6);
}
.landing-hero-desc{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:1.18rem;color:rgba(250,246,240,.85);
  line-height:1.7;margin-bottom:2rem;
}
.landing-hero-cta{
  display:flex;gap:.8rem;justify-content:center;flex-wrap:wrap;
}
.landing-hero-cta .landing-cta-btn{
  font-size:.95rem;font-weight:600;
  padding:.65rem 2rem;border-radius:6px;
  cursor:pointer;transition:all .15s;
  letter-spacing:.3px;
}
.landing-cta-btn.primary{
  background:var(--gold, #9E7A3C);border:2px solid var(--gold, #9E7A3C);
  color:var(--brown-dark, #35201A);
}
.landing-cta-btn.primary:hover{
  background:var(--gold-light, #B89868);border-color:var(--gold-light, #B89868);
}
.landing-cta-btn.ghost{
  background:none;border:2px solid rgba(250,246,240,.35);
  color:#FAF6F0;
}
.landing-cta-btn.ghost:hover{
  border-color:rgba(250,246,240,.65);background:rgba(250,246,240,.08);
}

/* ── Stage sections (alternating image + text) ─ */
.landing-stages-wrap{
  /* container for all 6 stage sections */
}
.landing-stage{
  display:flex;align-items:stretch;
  min-height:420px;
}
.landing-stage.reverse{
  flex-direction:row-reverse;
}
.landing-stage-img{
  flex:0 0 50%;
  background-size:cover;background-position:center;
  position:relative;
}
.landing-stage-img::after{
  content:'';position:absolute;inset:0;
  background:rgba(35,20,15,.18);
  transition:background .3s;
}
.landing-stage:hover .landing-stage-img::after{
  background:rgba(35,20,15,.08);
}
.landing-stage-text{
  flex:0 0 50%;
  display:flex;flex-direction:column;justify-content:center;
  padding:3rem 3.5rem;
  background:var(--cream, #FAF6F0);
}
.landing-stage.reverse .landing-stage-text{
  background:var(--white, #FFFFFF);
}
.landing-stage-num{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:50%;flex-shrink:0;
  background:rgba(158,122,60,.28);color:var(--gold, #9E7A3C);
  font-size:.72rem;font-weight:700;font-family:var(--sans);
  margin-bottom:.8rem;
}
.landing-stage-text h2{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:1.35rem;font-weight:700;
  color:var(--brown-dark, #35201A);
  margin-bottom:.7rem;letter-spacing:.2px;
}
.landing-stage-text p{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:.92rem;color:var(--text-light, #5C3D2E);
  line-height:1.7;margin-bottom:.7rem;
}
.landing-stage-text p:last-child{margin-bottom:0}

/* ── About sections ──────────────────────────── */
.landing-about{
  padding:3.5rem 2rem;
}
.landing-about-inner{
  max-width:800px;margin:0 auto;
}
.landing-section{margin-bottom:1.6rem}
.landing-section h2{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:1.25rem;font-weight:700;
  color:var(--brown-dark, #35201A);margin-bottom:.6rem;
  padding-bottom:.4rem;
  border-bottom:1.5px solid var(--border, #D7CCC8);
}
.landing-section p{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:.92rem;
  color:var(--text-light, #5C3D2E);
  margin-bottom:.4rem;line-height:1.5;
}
.landing-section p:last-child{margin-bottom:0}

/* ── Numbered section heading (about page six stages) ── */
.landing-section h2 .landing-section-num{
  display:inline-flex;align-items:center;justify-content:center;
  width:26px;height:26px;border-radius:50%;
  background:rgba(158,122,60,.28);color:var(--gold, #9E7A3C);
  font-size:.7rem;font-weight:700;font-family:var(--sans);
  margin-right:.6rem;vertical-align:baseline;
  position:relative;top:-.05em;
}

/* ── About-this-project divider on about page ─── */
.landing-about-divider{
  font-family:var(--serif, 'Georgia','Times New Roman',serif);
  font-size:1.45rem;font-weight:700;
  color:var(--brown-dark, #35201A);
  margin:2.8rem 0 1.4rem;
  padding-bottom:.6rem;
  border-bottom:2px solid var(--gold, #9E7A3C);
  letter-spacing:.3px;
}

/* ── Layer 2 (deeper background) ─────────────── */
.landing-deeper{
  background:var(--cream-dark, #F0EBE3);
  padding:3.5rem 2rem 2rem;
}
.landing-deeper .landing-about-inner{
  max-width:800px;margin:0 auto;
}
.landing-deeper .landing-section h2{
  border-bottom-color:rgba(158,122,60,.25);
}

/* ── Footer ──────────────────────────────────── */
.landing-footer{
  background:var(--brown-dark, #35201A);
  color:rgba(250,246,240,.5);
  text-align:center;
  padding:2rem 2rem 1.4rem;
}
.landing-footer-brand{
  font-family:'Great Vibes',cursive;
  font-size:1.8rem;color:#FAF6F0;
  margin-bottom:.25rem;
  opacity:0;transition:opacity .3s;
}
.fonts-loaded .landing-footer-brand{opacity:1}
.landing-footer-line{
  font-size:.72rem;letter-spacing:.3px;
  margin-bottom:1rem;
}
.landing-footer-line a{
  /* Inherit the same muted cream as the surrounding "Beta · Free &" so the
     'Open Source' link doesn't stand out in a link color while still being
     clickable. Subtle underline-on-hover affordance, matching credits. */
  color:inherit;text-decoration:none;
}
.landing-footer-line a:hover{
  color:var(--gold-light, #B89868);text-decoration:underline;
}
.landing-footer-credits{
  font-size:.62rem;color:rgba(250,246,240,.35);
  line-height:1.6;letter-spacing:.2px;
}
.landing-footer-credits a{
  color:rgba(250,246,240,.5);text-decoration:none;
}
.landing-footer-credits a:hover{
  color:var(--gold-light, #B89868);text-decoration:underline;
}

/* ── Auth modal ──────────────────────────────── */
.landing-modal{
  display:none;
  position:fixed;inset:0;z-index:10001;
  align-items:center;justify-content:center;
}
.landing-modal.open{
  display:flex;
}
.landing-modal-overlay{
  position:absolute;inset:0;
  background:rgba(0,0,0,.6);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
}
.landing-modal-card{
  position:relative;z-index:1;
  width:400px;max-width:92vw;
  background:rgba(53,32,26,.95);
  border:1px solid rgba(255,255,255,.08);border-radius:14px;
  box-shadow:0 12px 48px rgba(0,0,0,.4);
  padding:2rem 2rem 1.6rem;
  text-align:center;
  max-height:90vh;overflow-y:auto;
}
.landing-modal-close{
  position:absolute;top:12px;right:14px;
  background:none;border:none;cursor:pointer;
  color:rgba(250,246,240,.5);font-size:1.3rem;
  line-height:1;padding:4px;
  transition:color .15s;
}
.landing-modal-close:hover{color:#FAF6F0}
.landing-modal-brand{
  font-family:'Great Vibes',cursive;
  font-size:2.4rem;font-weight:400;
  color:#FAF6F0;line-height:1;
  margin-bottom:1.2rem;
  opacity:0;transition:opacity .3s;
}
.fonts-loaded .landing-modal-brand{opacity:1}

/* ── Auth form styles (inside modal) ─────────── */
.landing-form{ text-align:left; }
.landing-form-row{display:flex;gap:10px}
.landing-form-row .landing-form-group{flex:1;min-width:0}
.landing-label{
  display:block;font-size:.65rem;font-weight:600;
  color:var(--gold-light, #B89868);text-transform:uppercase;
  letter-spacing:.5px;margin-bottom:.15rem;
}
.landing-input{
  width:100%;box-sizing:border-box;
  padding:.4rem .6rem;font-size:.82rem;
  border:1px solid rgba(255,255,255,.12);border-radius:6px;
  background:rgba(255,255,255,.07);color:#FAF6F0;
  outline:none;margin-bottom:.5rem;
  transition:border-color .15s,background .15s;
}
.landing-input::placeholder{color:rgba(250,246,240,.3)}
.landing-input:focus{border-color:var(--gold, #9E7A3C);background:rgba(255,255,255,.1)}
.landing-btn{
  width:100%;padding:.5rem 0;
  font-size:.82rem;font-weight:600;
  color:var(--brown-dark, #35201A);background:var(--gold, #9E7A3C);
  border:none;border-radius:6px;cursor:pointer;
  transition:background .15s;margin-top:.15rem;
}
.landing-btn:hover{background:var(--gold-light, #B89868)}
.landing-error{
  color:#E57373;font-size:.72rem;
  margin-bottom:.3rem;min-height:.9em;
}
.landing-switch{
  margin-top:.8rem;font-size:.76rem;color:rgba(250,246,240,.5);
  text-align:center;
}
.landing-switch a{
  color:var(--gold-light, #B89868);cursor:pointer;
  text-decoration:none;font-weight:600;
}
.landing-switch a:hover{text-decoration:underline;color:var(--gold, #9E7A3C)}

/* ── Responsive ──────────────────────────────── */
@media(max-width:900px){
  .landing-stage{flex-direction:column!important;min-height:auto}
  .landing-stage-img{flex:none;height:260px}
  .landing-stage-text{flex:none;padding:2rem 1.8rem}
}
@media(max-width:600px){
  .landing-nav-inner{padding:.6rem 1rem}
  .landing-nav-link{display:none}
  .landing-nav-btn{font-size:.7rem;padding:.35rem .7rem}
  .landing-hero-content{padding:5rem 1.2rem 3rem}
  .landing-hero-brand{font-size:3.2rem}
  .landing-hero-desc{font-size:.92rem}
  .landing-stage-text{padding:1.8rem 1.2rem}
  .landing-about{padding:2.4rem 1.2rem}
  .landing-deeper{padding:2.4rem 1.2rem 1.5rem}
  .landing-form-row{flex-direction:column;gap:0}
  .landing-modal-card{padding:1.6rem 1.4rem 1.2rem}
}
