/* ============================================================
   Ahmet Coşkun — Digital Memorial & Academic Archive
   Main Stylesheet — Design Tokens, Layout, Components
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Backgrounds */
  --bg-ivory: #FBF8F1;
  --bg-cream: #F5F0E6;
  --bg-paper: #F0EBE0;
  --bg-sand: #E8DFD0;
  --bg-beige: #DDD2C0;

  /* Accents — matte, never bright */
  --gold: #A68B5B;
  --gold-light: #C4A574;
  --gold-muted: #B8976A;
  --bronze: #8B7355;
  --coffee: #3D2E1F;
  --coffee-dark: #2A2118;
  --coffee-deeper: #1A1510;
  --charcoal: #2C2416;
  --ink: #1F1A14;

  /* Text */
  --text-primary: #2C2416;
  --text-secondary: #5C4E3A;
  --text-muted: #8B7B66;
  --text-on-dark: #F5F0E6;
  --text-gold: #C4A574;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Inter', system-ui, sans-serif;

  /* Spacing & Rhythm */
  --section-pad: clamp(5rem, 12vw, 9rem);
  --container: min(1200px, calc(100% - 3rem));
  --ease-luxury: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Glass */
  --glass-bg: rgba(251, 248, 241, 0.72);
  --glass-border: rgba(166, 139, 91, 0.18);
}

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-ivory);
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.35s var(--ease-soft);
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

::selection {
  background: rgba(166, 139, 91, 0.25);
  color: var(--coffee-dark);
}

/* Focus accessibility */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- Paper Texture Overlay ---------- */
.paper-texture {
  position: relative;
}

.paper-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* Ottoman geometric pattern layer */
.ottoman-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url('../images/ottoman-pattern.svg');
  background-size: 280px 280px;
  background-repeat: repeat;
}

/* Soft gradient wash */
.gradient-wash {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(196, 165, 116, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(139, 115, 85, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-ivory) 0%, var(--bg-cream) 50%, var(--bg-ivory) 100%);
}

/* ---------- Typography ---------- */
.font-display {
  font-family: var(--font-display);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 36rem;
  line-height: 1.75;
  font-weight: 300;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 1.5rem;
  }
}

.section {
  padding-block: var(--section-pad);
  position: relative;
  overflow: hidden;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--bronze), var(--gold-light));
  z-index: 9999;
  transform-origin: left;
  box-shadow: 0 0 8px rgba(166, 139, 91, 0.4);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.5s var(--ease-soft),
              backdrop-filter 0.5s var(--ease-soft),
              box-shadow 0.5s var(--ease-soft),
              border-color 0.5s var(--ease-soft);
  border-bottom: 1px solid transparent;
  padding: 1.25rem 0;
}

.site-header.is-scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 4px 30px rgba(44, 36, 22, 0.04);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--coffee);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.75;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0.45rem 0.7rem;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0.15rem;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease-luxury), left 0.35s var(--ease-luxury);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--coffee);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 60%;
  left: 20%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-btn,
.icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.lang-btn {
  width: auto;
  padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
}

.lang-btn:hover,
.icon-btn:hover {
  background: rgba(166, 139, 91, 0.1);
  color: var(--coffee);
}

.icon-btn:hover {
  transform: scale(1.08);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--coffee);
  transition: transform 0.4s var(--ease-luxury), opacity 0.3s;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(251, 248, 241, 0.97);
  backdrop-filter: blur(24px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s, visibility 0.45s;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--coffee);
  padding: 0.5rem 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s, color 0.3s;
}

.mobile-nav.is-open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a:nth-child(1) { transition-delay: 0.05s; }
.mobile-nav a:nth-child(2) { transition-delay: 0.1s; }
.mobile-nav a:nth-child(3) { transition-delay: 0.15s; }
.mobile-nav a:nth-child(4) { transition-delay: 0.2s; }
.mobile-nav a:nth-child(5) { transition-delay: 0.25s; }
.mobile-nav a:nth-child(6) { transition-delay: 0.3s; }
.mobile-nav a:nth-child(7) { transition-delay: 0.35s; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  position: relative;
  overflow: hidden;
  transition: color 0.45s, border-color 0.45s, transform 0.4s var(--ease-luxury), box-shadow 0.4s;
  z-index: 1;
}

.btn-primary {
  background: var(--coffee);
  color: var(--text-on-dark);
  border: 1px solid var(--coffee);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--coffee-dark), var(--bronze));
  opacity: 0;
  transition: opacity 0.45s;
  z-index: -1;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(44, 36, 22, 0.2);
  border-color: var(--bronze);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--coffee);
  border: 1px solid rgba(166, 139, 91, 0.45);
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--coffee);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-luxury);
  z-index: -1;
}

.btn-outline:hover {
  color: var(--text-on-dark);
  border-color: var(--coffee);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 36, 22, 0.12);
}

.btn-outline:hover::before {
  transform: scaleX(1);
}

.btn-gold {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid rgba(196, 165, 116, 0.5);
}

.btn-gold:hover {
  background: rgba(196, 165, 116, 0.12);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(166, 139, 91, 0.2);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 5rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 45% at 75% 40%, rgba(184, 151, 106, 0.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 15% 70%, rgba(139, 115, 85, 0.06) 0%, transparent 55%),
    linear-gradient(165deg, #FBF8F1 0%, #F5F0E6 40%, #F0EBE0 100%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-muted);
  opacity: 0;
}

.hero-rays {
  position: absolute;
  top: -20%;
  right: 5%;
  width: 60%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: conic-gradient(
    from 200deg at 70% 40%,
    transparent 0deg,
    rgba(196, 165, 116, 0.04) 20deg,
    transparent 40deg,
    rgba(184, 151, 106, 0.03) 60deg,
    transparent 90deg
  );
  animation: rayDrift 20s ease-in-out infinite alternate;
}

@keyframes rayDrift {
  from { transform: rotate(-3deg) scale(1); opacity: 0.7; }
  to { transform: rotate(3deg) scale(1.05); opacity: 1; }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .hero-grid {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
  }
}

.hero-content {
  max-width: 560px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--coffee-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.85rem;
  letter-spacing: 0.02em;
}

.hero-roles {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.hero-desc {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: 2.5rem;
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Portrait */
.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.portrait-glow {
  position: absolute;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 151, 106, 0.28) 0%, rgba(166, 139, 91, 0.08) 40%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  animation: glowPulse 8s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { transform: scale(0.95); opacity: 0.7; }
  to { transform: scale(1.08); opacity: 1; }
}

.portrait-ornament {
  position: absolute;
  width: 70px;
  height: 70px;
  opacity: 0.35;
  z-index: 3;
  animation: floatOrnament 12s ease-in-out infinite;
  pointer-events: none;
}

.portrait-ornament--1 {
  top: 8%;
  right: 5%;
  animation-delay: 0s;
}

.portrait-ornament--2 {
  bottom: 15%;
  left: 0%;
  width: 55px;
  height: 55px;
  animation-delay: -4s;
  animation-direction: reverse;
}

.portrait-ornament--3 {
  top: 45%;
  right: -5%;
  width: 40px;
  height: 40px;
  animation-delay: -7s;
}

@keyframes floatOrnament {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

.portrait-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  border-radius: 48% 52% 45% 55% / 42% 48% 52% 58%;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(44, 36, 22, 0.18),
    0 0 0 1px rgba(166, 139, 91, 0.2),
    inset 0 0 60px rgba(44, 36, 22, 0.08);
  animation: frameMorph 18s ease-in-out infinite alternate;
}

@keyframes frameMorph {
  0% { border-radius: 48% 52% 45% 55% / 42% 48% 52% 58%; }
  50% { border-radius: 52% 48% 55% 45% / 48% 42% 58% 52%; }
  100% { border-radius: 45% 55% 48% 52% / 55% 50% 45% 50%; }
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-luxury);
}

.portrait-frame:hover img {
  transform: scale(1.04);
}

.portrait-ring {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(166, 139, 91, 0.25);
  border-radius: 48% 52% 45% 55% / 42% 48% 52% 58%;
  z-index: 1;
  animation: frameMorph 18s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.4s;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--bronze);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  background: var(--gold);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ---------- Timeline Section ---------- */
.timeline-section {
  background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-ivory) 100%);
}

.timeline-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.timeline-header .section-lead {
  margin-inline: auto;
  margin-top: 1.25rem;
}

.timeline-track {
  position: relative;
  padding: 2rem 0 1rem;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(166, 139, 91, 0.2);
  transform: translateY(-50%);
  z-index: 0;
}

.timeline-line-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bronze), var(--gold-light));
  box-shadow: 0 0 12px rgba(166, 139, 91, 0.35);
}

.timeline-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2rem 0.5rem 3rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  z-index: 1;
}

.timeline-scroll::-webkit-scrollbar {
  display: none;
}

.timeline-card {
  flex: 0 0 min(280px, 75vw);
  scroll-snap-align: start;
  background: rgba(251, 248, 241, 0.85);
  border: 1px solid rgba(166, 139, 91, 0.15);
  padding: 2rem 1.75rem;
  position: relative;
  transition: transform 0.5s var(--ease-luxury),
              box-shadow 0.5s,
              border-color 0.4s;
  cursor: default;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-ivory);
  border: 2px solid var(--gold);
  z-index: 2;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.timeline-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 24px 48px rgba(44, 36, 22, 0.1);
  border-color: rgba(166, 139, 91, 0.35);
}

.timeline-card:hover::before {
  background: var(--gold);
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 12px rgba(166, 139, 91, 0.5);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.timeline-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--coffee);
  margin-bottom: 0.75rem;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* ---------- Books Section ---------- */
.books-section {
  background: var(--bg-ivory);
}

.books-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.books-nav {
  display: flex;
  gap: 0.75rem;
}

.books-nav-btn {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(166, 139, 91, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--coffee);
  transition: background 0.35s, border-color 0.35s, transform 0.35s, color 0.35s;
}

.books-nav-btn:hover {
  background: var(--coffee);
  border-color: var(--coffee);
  color: var(--text-on-dark);
  transform: scale(1.06);
}

.books-carousel {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2rem 0.25rem 3rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.books-carousel::-webkit-scrollbar {
  display: none;
}

.book-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 180px;
  perspective: 1000px;
  cursor: pointer;
}

@media (min-width: 640px) {
  .book-card {
    width: 200px;
  }
}

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-luxury);
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    4px 6px 20px rgba(44, 36, 22, 0.2),
    1px 0 0 rgba(255, 255, 255, 0.05) inset;
}

.book-cover::before {
  /* Book spine depth */
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0,0,0,0.25), transparent);
  border-radius: 2px 0 0 2px;
  z-index: 2;
  pointer-events: none;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px 6px 6px 2px;
}

.book-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at center, rgba(184, 151, 106, 0.35), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}

.book-card:hover .book-cover {
  transform: rotateY(-12deg) rotateX(4deg) translateY(-12px) scale(1.04);
  box-shadow:
    12px 24px 48px rgba(44, 36, 22, 0.28),
    0 0 40px rgba(166, 139, 91, 0.25);
}

.book-card:hover .book-glow {
  opacity: 1;
}

.book-preview {
  position: absolute;
  inset: 0;
  background: rgba(26, 21, 16, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: 2px 6px 6px 2px;
  z-index: 3;
}

.book-card:hover .book-preview {
  opacity: 1;
}

.book-preview span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-on-dark);
  border: 1px solid rgba(196, 165, 116, 0.6);
  padding: 0.65rem 1.1rem;
  transition: background 0.3s, border-color 0.3s;
}

.book-preview span:hover {
  background: rgba(196, 165, 116, 0.2);
  border-color: var(--gold-light);
}

.book-meta {
  margin-top: 1.25rem;
  text-align: center;
}

.book-meta h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--coffee);
  margin-bottom: 0.25rem;
}

.book-meta p {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------- Quote Section ---------- */
.quote-section {
  background: var(--bg-cream);
  text-align: center;
  padding-block: clamp(6rem, 14vw, 10rem);
}

.quote-inner {
  max-width: 820px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.quote-marks {
  width: 64px;
  height: 48px;
  margin: 0 auto 2rem;
  opacity: 0.5;
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: var(--coffee);
  margin-bottom: 2rem;
}

.quote-attr {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.quote-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
  opacity: 0.5;
}

/* ---------- Videos Section ---------- */
.videos-section {
  background: linear-gradient(180deg, var(--bg-ivory) 0%, var(--bg-paper) 100%);
}

.videos-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.videos-header .section-lead {
  margin-inline: auto;
  margin-top: 1.25rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .videos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.video-card {
  position: relative;
  overflow: hidden;
  background: var(--coffee-dark);
  cursor: pointer;
  group: true;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-luxury), filter 0.5s;
}

.video-card:hover .video-thumb img {
  transform: scale(1.06);
  filter: brightness(0.7);
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 165, 116, 0.7);
  background: rgba(26, 21, 16, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.45s var(--ease-luxury), background 0.35s, border-color 0.35s, box-shadow 0.35s;
  z-index: 2;
}

.video-play svg {
  width: 20px;
  height: 20px;
  fill: var(--gold-light);
  margin-left: 3px;
}

.video-card:hover .video-play {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(166, 139, 91, 0.25);
  border-color: var(--gold-light);
  box-shadow: 0 0 30px rgba(166, 139, 91, 0.35);
}

.video-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(26, 21, 16, 0.75) 100%);
  opacity: 0.6;
  transition: opacity 0.4s;
  z-index: 1;
  pointer-events: none;
}

.video-card:hover .video-glass {
  opacity: 0.85;
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
  transform: translateY(4px);
  transition: transform 0.4s var(--ease-luxury);
}

.video-card:hover .video-info {
  transform: translateY(0);
}

.video-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-on-dark);
  margin-bottom: 0.35rem;
}

.video-info p {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.85;
}

/* ---------- Gallery Section ---------- */
.gallery-section {
  background: var(--bg-cream);
}

.gallery-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.gallery-masonry {
  columns: 1;
  column-gap: 1.25rem;
}

@media (min-width: 640px) {
  .gallery-masonry {
    columns: 2;
  }
}

@media (min-width: 1024px) {
  .gallery-masonry {
    columns: 3;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.9s var(--ease-luxury), filter 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05) contrast(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(26, 21, 16, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-on-dark);
  letter-spacing: 0.04em;
}

/* ---------- Articles Section ---------- */
.articles-section {
  background: var(--bg-ivory);
}

.articles-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  position: relative;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(166, 139, 91, 0.2);
  transition: transform 0.45s var(--ease-luxury);
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-6px);
}

.article-cat {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}

.article-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--coffee);
  margin-bottom: 0.85rem;
  transition: color 0.3s;
}

.article-card:hover h3 {
  color: var(--bronze);
}

.article-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.article-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.7rem;
  transition: gap 0.35s;
}

.article-card:hover .article-read {
  gap: 0.7rem;
}

/* ---------- Numbers / Stats ---------- */
.numbers-section {
  background: var(--coffee-dark);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.numbers-section .ottoman-pattern {
  opacity: 0.04;
  filter: invert(1) sepia(1) saturate(2) hue-rotate(10deg);
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .numbers-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.stat-item {
  position: relative;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.65);
}

.stat-divider {
  display: none;
}

@media (min-width: 768px) {
  .stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(166, 139, 91, 0.25);
  }
}

/* ---------- CTA Section ---------- */
.cta-section {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(184, 151, 106, 0.1) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-ivory) 100%);
  text-align: center;
  padding-block: clamp(6rem, 12vw, 9rem);
}

.cta-inner {
  max-width: 700px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--coffee);
  margin-bottom: 2.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--coffee-deeper);
  color: var(--text-on-dark);
  padding-top: 5rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(166, 139, 91, 0.25);
}

@media (min-width: 768px) {
  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 4rem;
  }
}

.footer-brand .logo {
  color: var(--text-on-dark);
  margin-bottom: 1.25rem;
}

.footer-brand .logo-mark {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(245, 240, 230, 0.55);
  line-height: 1.75;
  font-weight: 300;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.55);
  transition: color 0.3s, padding-left 0.3s;
}

.footer-col a:hover {
  color: var(--gold-light);
  padding-left: 4px;
}

.footer-contact li {
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.55);
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-link {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(166, 139, 91, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245, 240, 230, 0.6);
  transition: border-color 0.3s, color 0.3s, background 0.3s, transform 0.3s;
}

.social-link:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
  background: rgba(166, 139, 91, 0.1);
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.75rem;
  color: rgba(245, 240, 230, 0.35);
  letter-spacing: 0.04em;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(245, 240, 230, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s, transform 0.3s;
}

.back-to-top:hover {
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* ---------- Search Overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 21, 16, 0.92);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-box {
  width: min(560px, 90%);
  position: relative;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(196, 165, 116, 0.4);
  padding: 1rem 3rem 1rem 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text-on-dark);
  outline: none;
  transition: border-color 0.3s;
}

.search-box input::placeholder {
  color: rgba(245, 240, 230, 0.3);
}

.search-box input:focus {
  border-color: var(--gold-light);
}

.search-close {
  position: absolute;
  top: -4rem;
  right: 0;
  color: rgba(245, 240, 230, 0.5);
  transition: color 0.3s, transform 0.3s;
}

.search-close:hover {
  color: var(--gold-light);
  transform: rotate(90deg);
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.will-reveal {
  opacity: 0;
  transform: translateY(40px);
}

.will-reveal-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(30px);
}

.will-reveal-scale {
  opacity: 0;
  transform: scale(0.92);
}

/* Custom cursor soft glow (desktop) */
@media (hover: hover) and (pointer: fine) {
  .cursor-glow {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 139, 91, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
    opacity: 0;
  }

  body.has-cursor .cursor-glow {
    opacity: 1;
  }
}
