/* ═══════════════════════════════════════
   FRANKIS – Clean Minimalist Theme
   ═══════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAFAF8;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-light: #999;
  --accent: #2D5A3D;
  --accent-light: #E8F0EB;
  --accent-hover: #3D7A53;
  --border: #E8E8E4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Grain overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ─── Navigation ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.scrolled {
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 40px;
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ─── Mobile menu ─── */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 210;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s;
}

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

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu li {
  margin: 16px 0;
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 1.8rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* ─── Hero (fixed background layer) ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 40px 80px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

/* ─── Content panel that slides over hero ─── */
.content-panel {
  position: relative;
  z-index: 10;
  margin-top: 100vh;
  background: var(--bg);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -20px 80px rgba(0,0,0,0.08);
  min-height: 100vh;
}

.content-panel::before {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto;
  position: relative;
  top: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 520px;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bg);
  background: var(--text);
  padding: 16px 36px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

.hero-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(45, 90, 61, 0.25);
}

.hero-cta svg { transition: transform 0.3s; }
.hero-cta:hover svg { transform: translateY(3px); }

.hero-scroll-line {
  position: absolute;
  bottom: 40px;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Floating shapes ─── */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}

.shape-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -100px; right: -100px;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 350px; height: 350px;
  background: var(--accent);
  bottom: -50px; left: -80px;
  animation: float 25s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px; height: 200px;
  background: var(--text);
  top: 40%; left: 15%;
  animation: float 18s ease-in-out infinite 3s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Stats bar ─── */
.stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  padding: 48px 40px 60px;
  margin-top: 16px;
  border-bottom: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
}

/* ─── Section commons ─── */
.section-header {
  text-align: center;
  padding: 100px 40px 60px;
}

.section-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ─── Page hero (subpages) ─── */
.page-hero {
  text-align: center;
  padding: 140px 40px 60px;
}

/* ─── Blog grid ─── */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.blog-grid--page {
  padding-top: 20px;
}

.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(40px);
}

.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--accent-light), #f0ede8);
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.card-image .placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
}

.card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  font-weight: 300;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.card-date {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 400;
}

.card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.blog-card:hover .card-arrow {
  background: var(--accent);
  border-color: var(--accent);
}

.blog-card:hover .card-arrow svg {
  stroke: white;
  transform: translateX(2px);
}

.card-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  transition: all 0.3s;
}

/* ─── Featured post ─── */
.blog-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.blog-card.featured .card-image {
  height: 100%;
  min-height: 320px;
  border-radius: var(--radius) 0 0 var(--radius);
}

.blog-card.featured .card-body {
  padding: 40px;
  justify-content: center;
}

.blog-card.featured .card-title {
  font-size: 1.6rem;
  font-family: 'Playfair Display', serif;
}

/* ═══════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════ */

.gallery-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-grid--page {
  padding-top: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--accent-light);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  color: white;
  font-size: 0.85rem;
  font-weight: 400;
  z-index: 2;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.lightbox.active .lightbox-image {
  transform: scale(1);
}

.lightbox-caption {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 300;
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ═══════════════════════════════════════
   ARTICLE PAGE
   ═══════════════════════════════════════ */

.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 140px 40px 80px;
}

.article-header {
  margin-bottom: 40px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.article-date {
  font-size: 0.82rem;
  color: var(--text-light);
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-excerpt {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.7;
}

.article-cover {
  margin-bottom: 48px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
}

.article-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 48px 0 20px;
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 36px 0 16px;
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-muted);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.article-content pre {
  background: var(--text);
  color: #e0e0e0;
  padding: 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 24px 0;
}

.article-content code {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
}

.article-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 24px;
  margin: 24px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content ul, .article-content ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-muted);
}

.article-content li {
  margin-bottom: 8px;
}

.article-back {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* ─── Default content page ─── */
.default-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px 80px;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.default-content p {
  margin-bottom: 20px;
}

/* ─── Categories section ─── */
.categories {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.category-card {
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.category-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.category-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-count {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 60px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg);
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* ─── Cursor glow ─── */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(45, 90, 61, 0.06), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.15s ease-out;
  transform: translate(-50%, -50%);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 12px 20px; }
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .hero { padding: 100px 24px 60px; }
  .content-panel { border-radius: 24px 24px 0 0; }
  .stats { gap: 32px; flex-wrap: wrap; padding: 40px 20px; }
  .stat-number { font-size: 1.8rem; }
  .blog-grid { padding: 0 20px 60px; grid-template-columns: 1fr; }
  .blog-card.featured { grid-template-columns: 1fr; }
  .blog-card.featured .card-image { border-radius: var(--radius) var(--radius) 0 0; min-height: 200px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 0 20px 60px; }
  .categories { grid-template-columns: 1fr; padding: 0 20px 60px; }
  .category-card { padding: 28px; }
  footer { flex-direction: column; gap: 24px; text-align: center; padding: 40px 20px; }
  .section-header { padding: 60px 20px 40px; }
  .article-page { padding: 120px 20px 60px; }
  .page-hero { padding: 120px 20px 40px; }
  .default-content { padding: 0 20px 60px; }
  .lightbox-nav { display: none; }
}
