/* ============================================
   ZAYD IBN ALI — SCHOLARLY ARCHIVE
   Design System & Global Styles
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- CSS Variables --- */
:root {
  --deep-brown: #2C1810;
  --brown-dark: #1A0E09;
  --parchment: #F5E6D3;
  --parchment-light: #FAF3E8;
  --gold: #C9A84C;
  --gold-light: #D4B96E;
  --gold-dark: #A8882E;
  --black: #0A0A0A;
  --off-white: #FAF3E8;
  --text-dark: #1A0E09;
  --text-light: #F5E6D3;
  --text-muted: #8B7355;
  --border-ornate: #C9A84C33;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Cormorant Garamond', 'Palatino Linotype', 'Book Antiqua', serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;

  --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-medium: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.3s ease;

  --nav-height: 72px;
  --container-max: 1200px;
  --container-narrow: 860px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--parchment);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

::selection {
  background: var(--gold);
  color: var(--deep-brown);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--deep-brown);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: 0.015em; }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1.2em;
  font-weight: 400;
}

.text-arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.4em;
  color: var(--gold-dark);
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }

/* --- Ornamental Dividers --- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2.5rem 0;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament-icon {
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0.7;
}

.divider-gold {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem auto;
  border: none;
}

/* Islamic geometric pattern divider */
.geometric-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 3rem auto;
  max-width: 300px;
}

.geometric-divider span {
  display: block;
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  opacity: 0.6;
}

.geometric-divider span:nth-child(2) {
  width: 12px;
  height: 12px;
  opacity: 0.9;
  background: var(--gold);
}

.geometric-divider::before,
.geometric-divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark));
}

.geometric-divider::after {
  background: linear-gradient(90deg, var(--gold-dark), transparent);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navigation --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
  transition: background var(--transition-medium);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-logo a {
  color: inherit;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--parchment);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 0.25rem 0;
  opacity: 0.8;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--transition-medium);
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1010;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--parchment);
  transition: all var(--transition-fast);
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Sections --- */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.55) 0%,
    rgba(26, 14, 9, 0.65) 50%,
    rgba(10, 10, 10, 0.8) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--parchment-light);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-content .tagline {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gold-light);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.hero-content .subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(245, 230, 211, 0.7);
  max-width: 550px;
  margin: 1rem auto 0;
  line-height: 1.7;
}

.hero-small {
  min-height: 55vh;
}

.hero-small .hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

/* --- Page Content Sections --- */
.page-body {
  padding-top: var(--nav-height);
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background: var(--deep-brown);
  color: var(--parchment);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--parchment-light);
}

.section-parchment {
  background: var(--parchment);
}

.section-cream {
  background: var(--parchment-light);
}

.section-black {
  background: var(--black);
  color: var(--parchment);
}

.section-black h2,
.section-black h3 {
  color: var(--parchment-light);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: rgba(245, 230, 211, 0.6);
}

/* --- Manuscript-style Content Block --- */
.manuscript-block {
  background: var(--parchment-light);
  border: 1px solid var(--border-ornate);
  border-radius: 2px;
  padding: 2.5rem 3rem;
  margin-bottom: 2rem;
  position: relative;
}

.manuscript-block::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  pointer-events: none;
}

.manuscript-block-dark {
  background: rgba(44, 24, 16, 0.6);
  border-color: rgba(201, 168, 76, 0.2);
}

.manuscript-block-dark::before {
  border-color: rgba(201, 168, 76, 0.1);
}

/* --- Quote Block --- */
.quote-block {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 700px;
  margin: 2rem auto;
}

.quote-block blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-style: italic;
  color: var(--deep-brown);
  line-height: 1.6;
  position: relative;
  padding: 0 1.5rem;
}

.quote-block blockquote::before {
  content: '"';
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--gold);
  position: absolute;
  top: -1.5rem;
  left: -0.5rem;
  line-height: 1;
  opacity: 0.5;
}

.quote-block cite {
  display: block;
  margin-top: 1.2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: normal;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.section-dark .quote-block blockquote {
  color: var(--parchment-light);
}

.section-dark .quote-block cite {
  color: rgba(245, 230, 211, 0.5);
}

/* --- CTA Button --- */
.btn-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--deep-brown);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  padding: 1rem 2.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  border: 1px solid rgba(44, 24, 16, 0.15);
  transition: border-color var(--transition-fast);
}

.btn-cta:hover {
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 168, 76, 0.3);
}

.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  padding: 0.85rem 2rem;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  background: var(--gold);
  color: var(--deep-brown);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--parchment-light);
  border: 1px solid var(--border-ornate);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(44, 24, 16, 0.08);
}

.card-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.section-dark .card {
  background: rgba(44, 24, 16, 0.5);
  border-color: rgba(201, 168, 76, 0.15);
}

.section-dark .card p {
  color: rgba(245, 230, 211, 0.6);
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 3rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold), var(--gold), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.5rem;
  width: 9px;
  height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-dark .timeline-item p {
  color: rgba(245, 230, 211, 0.65);
}

.section-dark .timeline-date {
  color: var(--gold-light);
}

/* --- Image with Overlay Text --- */
.image-feature {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 2rem 0;
}

.image-feature img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
}

.image-feature .image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.85));
  color: var(--parchment);
}

.image-feature .image-caption h3 {
  color: var(--parchment-light);
  font-size: 1.3rem;
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--deep-brown);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow), opacity var(--transition-medium);
}

.gallery-item:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}

.gallery-item .gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, rgba(10, 10, 10, 0.8));
  color: var(--parchment);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transform: translateY(100%);
  transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-label {
  transform: translateY(0);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 2px solid rgba(201, 168, 76, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 168, 76, 0.4);
  background: none;
  color: var(--parchment);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep-brown);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: var(--parchment-light);
  color: var(--text-dark);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.section-dark .form-group label {
  color: var(--gold-light);
}

.section-dark .form-group input,
.section-dark .form-group textarea {
  background: rgba(44, 24, 16, 0.5);
  border-color: rgba(201, 168, 76, 0.2);
  color: var(--parchment);
}

.section-dark .form-group input:focus,
.section-dark .form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* --- Footer --- */
.site-footer {
  background: var(--black);
  color: rgba(245, 230, 211, 0.6);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(245, 230, 211, 0.5);
}

.footer-col a:hover {
  color: var(--gold);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icons a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment);
  transition: all var(--transition-fast);
}

.social-icons a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-icons a:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(201, 168, 76, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(245, 230, 211, 0.35);
}

.footer-bottom a {
  color: var(--gold-dark);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(4) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(5) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* --- Password Page Specific --- */
.password-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.password-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(201, 168, 76, 0.3) 40px,
      rgba(201, 168, 76, 0.3) 41px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(201, 168, 76, 0.3) 40px,
      rgba(201, 168, 76, 0.3) 41px
    );
}

.password-container {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem;
  max-width: 440px;
  width: 100%;
}

.password-container .archive-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.password-container h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--parchment-light);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.password-container .arabic-line {
  font-family: var(--font-arabic);
  font-size: 1.6rem;
  color: var(--gold);
  margin: 0.8rem 0 2rem;
  opacity: 0.7;
}

.password-field-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.password-field-wrap input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-align: center;
  background: rgba(245, 230, 211, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--parchment);
  outline: none;
  transition: all var(--transition-fast);
}

.password-field-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.password-field-wrap input::placeholder {
  color: rgba(245, 230, 211, 0.3);
  letter-spacing: 0.1em;
}

.password-field-wrap.shake {
  animation: shake 0.5s ease;
}

.password-field-wrap.shake input {
  border-color: #8B3A3A;
  box-shadow: 0 0 15px rgba(139, 58, 58, 0.3);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-enter-btn {
  width: 100%;
  padding: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--deep-brown);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
}

.password-enter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.3);
}

.password-error {
  font-size: 0.85rem;
  color: #C07A7A;
  margin-top: 0.8rem;
  min-height: 1.2em;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.password-error.show {
  opacity: 1;
}

/* Light reveal transition */
.light-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, var(--gold) 0%, var(--black) 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.light-reveal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* --- Two-Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col-text h2 {
  margin-bottom: 1rem;
}

.two-col-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 500px;
}

/* --- Portrait Image (no crop) --- */
.portrait-feature {
  max-width: 350px;
  margin: 0 auto;
}

.portrait-feature img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 3px solid var(--border-ornate);
  padding: 6px;
}

/* --- Social Icons SVG via unicode --- */
/* We'll use text symbols for social icons */

/* --- Page Transition --- */
/* NOTE: body animation uses opacity only — transform on body breaks position:fixed nav */
.page-enter {
  animation: pageEnterFade 0.6s ease forwards;
}

.page-enter .hero,
.page-enter .page-body {
  animation: pageEnterSlide 0.6s ease forwards;
}

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

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

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-medium);
    z-index: 1005;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .manuscript-block {
    padding: 1.5rem;
  }

  .manuscript-block::before {
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .section {
    padding: 3.5rem 0;
  }

  .container, .container-narrow {
    padding: 0 1.2rem;
  }

  .main-nav {
    padding: 0 1.2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-small {
    min-height: 45vh;
  }

  .password-container {
    padding: 2rem 1.5rem;
  }
}
