/* Sign-in page — antiquarian manuscript title page */

.signin-screen {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: transparent;
}


.signin-box {
  border: none;
  background: transparent;
  padding: 3rem 3.5rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── Ornamental top flourish ── */
.signin-ornament-top,
.signin-ornament-bottom {
  display: block;
  font-size: 1.6rem;
  color: #8a7354;
  letter-spacing: 0.3em;
  line-height: 1;
  opacity: 0.6;
  user-select: none;
}

.signin-ornament-top {
  margin-bottom: 2rem;
}

.signin-ornament-bottom {
  margin-top: 2rem;
}

/* ── Logo image ── */
.signin-logo {
  max-width: 420px;
  width: 100%;
  height: auto;
  margin-bottom: 0.3rem;
}

/* ── Title: the book name (fallback) ── */
.signin-title {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #3a2a14;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(255, 245, 220, 0.5);
}

/* ── Subtitle ── */
.signin-subtitle {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  color: #7a6548;
  margin-bottom: 0;
  letter-spacing: 0.06em;
}

/* ── Decorative rule ── */
.signin-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    #a0895e 20%,
    #8a7354 50%,
    #a0895e 80%,
    transparent 100%
  );
  margin: 2rem auto;
  width: 70%;
  opacity: 0.5;
}

/* ── Volume / edition line ── */
.signin-edition {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #9a8568;
  margin-bottom: 2.5rem;
}

/* ── Sign-in button styled as an invitation ── */
.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(210, 190, 155, 0.12);
  border: 1px solid #a08058;
  box-shadow: inset 0 0 0 1px rgba(160, 128, 88, 0.15), 0 1px 3px rgba(90, 60, 20, 0.08);
  color: #5a4a30;
  padding: 0.65rem 1.6rem;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  width: auto;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
}

.google-btn::before,
.google-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 1px;
  background: linear-gradient(to var(--dir, right), #b5a382, transparent);
  opacity: 0.5;
  transition: width 0.4s ease, opacity 0.4s ease;
}
.google-btn::before {
  --dir: left;
  right: calc(100% + 10px);
}
.google-btn::after {
  --dir: right;
  left: calc(100% + 10px);
}

.google-btn:hover {
  border-color: #7a5a30;
  color: #3a2a14;
  background: rgba(210, 190, 155, 0.22);
  box-shadow: inset 0 0 0 1px rgba(160, 128, 88, 0.25), 0 1px 4px rgba(90, 60, 20, 0.12);
}
.google-btn:hover::before,
.google-btn:hover::after {
  width: 36px;
  opacity: 0.8;
}

.google-btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* ── Entrance animation ── */
.signin-box {
  animation: pageReveal 1.2s ease-out both;
}

@keyframes pageReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signin-ornament-top { animation: fadeIn 1.6s ease-out 0.2s both; }
.signin-logo { animation: fadeIn 1.2s ease-out 0.4s both; }
.signin-subtitle { animation: fadeIn 1.2s ease-out 0.6s both; }
.signin-divider { animation: fadeIn 1.2s ease-out 0.7s both; }
.signin-edition { animation: fadeIn 1.2s ease-out 0.8s both; }
.signin-version { font-size: 0.55rem; opacity: 0.5; }
.google-btn { animation: fadeIn 1.2s ease-out 1.0s both; }
.signin-ornament-bottom { animation: fadeIn 1.6s ease-out 1.1s both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Override container for sign-in page */
body.sessions-page > .container { padding: 0; max-width: 100%; }

/* Move parchment background to body so the whole page is one seamless surface */
body:has(.signin-screen),
body:has(.signin-screen) .container {
  overflow: hidden;
}
body:has(.signin-screen) {
  background:
    repeating-conic-gradient(
      rgba(120, 90, 50, 0.03) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 4px 4px,
    radial-gradient(ellipse at 0% 0%, rgba(90, 60, 30, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(100, 65, 25, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 0% 100%, rgba(95, 60, 30, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(90, 55, 25, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 40%, #efe3cd 0%, #e2d3b8 40%, #d4c4a4 80%);
}

/* ── Sign-in page: position footer at viewport bottom ── */
body:has(.signin-screen) { display: flex; flex-direction: column; }
body:has(.signin-screen) .site-footer {
  position: absolute;
  bottom: 1.8rem;
  left: 0;
  right: 0;
  animation: fadeIn 1.6s ease-out 1.4s both;
}

/* ── Legal pages (privacy, terms) — same parchment surface ── */
body:has(.legal-page) {
  background:
    repeating-conic-gradient(
      rgba(120, 90, 50, 0.03) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 4px 4px,
    radial-gradient(ellipse at 0% 0%, rgba(90, 60, 30, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(100, 65, 25, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 0% 100%, rgba(95, 60, 30, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(90, 55, 25, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 40%, #efe3cd 0%, #e2d3b8 40%, #d4c4a4 80%);
}

.legal-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 2rem;
}

.legal-content {
  max-width: 640px;
  width: 100%;
  animation: pageReveal 0.8s ease-out both;
}

.legal-content h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3a2a14;
  margin-bottom: 2rem;
  text-align: center;
}

.legal-content h2 {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a4a30;
  margin: 2rem 0 0.8rem;
}

.legal-content p,
.legal-content li {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.85rem;
  line-height: 1.75;
  color: #5a4a30;
}

.legal-content ul {
  padding-left: 1.2em;
  list-style-type: '— ';
}

.legal-content li { margin-bottom: 0.3rem; }

.legal-content a {
  color: #6a5a3a;
  text-decoration: underline;
  text-decoration-color: rgba(106, 90, 58, 0.3);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 0.3s ease;
}
.legal-content a:hover { text-decoration-color: rgba(106, 90, 58, 0.8); }

.legal-placeholder {
  text-align: center;
  font-style: italic;
  opacity: 0.6;
}

.legal-back {
  display: block;
  text-align: center;
  margin-top: 3rem;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.8rem;
  color: #9a8568;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.legal-back:hover { opacity: 1; text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .signin-title {
    font-size: 2rem;
    letter-spacing: 0.16em;
  }

  body:has(.signin-screen) .site-footer {
    font-size: 0.58rem;
    bottom: 1.2rem;
  }
}
