/* Random.ge — Georgian Culture
   Main stylesheet */

:root {
  --wine: #4a1628;
  --wine-dark: #2d0e18;
  --wine-deep: #1a0810;
  --gold: #c9a227;
  --gold-light: #e5c76b;
  --gold-muted: #8b7355;
  --cream: #f5f0e8;
  --cream-dim: #d4cfc4;
}

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

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

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, var(--wine) 0%, var(--wine-dark) 40%, var(--wine-deep) 85%, #0d0408 100%);
  color: var(--cream);
  overflow-x: hidden;
  position: relative;
}

/* Noise 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='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)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.brand .brand-link,
.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand .brand-link:hover,
.brand-link:hover {
  color: var(--gold-light);
}

.brand .brand-link::first-letter,
.brand-link::first-letter {
  font-size: 1.55em;
  line-height: 0.9;
}

.site-header {
  position: relative;
  text-align: center;
}

.tagline {
  font-size: 0.95rem;
  color: var(--gold-muted);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.lang-switch {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.lang-link {
  color: var(--gold-muted);
  text-decoration: none;
  padding: 0 0.25rem;
}

.lang-link:hover {
  color: var(--gold-light);
}

.lang-link[data-lang].active-lang {
  color: var(--gold-light);
  font-weight: 600;
}

.lang-sep {
  color: var(--gold-muted);
  opacity: 0.7;
  padding: 0 0.15rem;
}

/* Category nav (SEO: separate pages) */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  max-width: 90vw;
}

.pill {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--gold-muted);
  background: transparent;
  color: var(--cream-dim);
  border-radius: 2rem;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
  text-decoration: none;
  display: inline-block;
}

a.pill {
  color: var(--cream-dim);
}

.pill:hover {
  color: var(--gold-light);
  border-color: var(--gold);
}

.pill.active {
  background: var(--gold);
  color: var(--wine-deep);
  border-color: var(--gold);
}

/* Facts section (home) */
.facts-section {
  width: 100%;
  max-width: 520px;
  margin-bottom: 0.5rem;
}

.facts-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold-muted);
  text-align: center;
  margin-bottom: 1rem;
}

/* Card */
.card-wrap {
  width: 100%;
  max-width: 520px;
  position: relative;
}

.card {
  background: linear-gradient(145deg, rgba(45, 14, 24, 0.92) 0%, rgba(26, 8, 16, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 2.25rem 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,162,39,0.08) inset;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card .corner {
  position: absolute;
  font-size: 1.8rem;
  color: var(--gold);
  opacity: 0.35;
  font-family: Georgia, serif;
}

.card .corner-tl { top: 0.75rem; left: 0.75rem; }
.card .corner-tr { top: 0.75rem; right: 0.75rem; }
.card .corner-bl { bottom: 0.75rem; left: 0.75rem; }
.card .corner-br { bottom: 0.75rem; right: 0.75rem; }

.card .category {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  padding-top: 1rem;
}
.card .fact {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  padding-bottom: 1rem;
}

.category {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.fact {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--cream);
}

.fact a {
  color: var(--gold-light);
  text-decoration: underline;
}

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

.fact.enter {
  animation: factEnter 0.5s ease-out forwards;
}

.fact.exit {
  animation: factExit 0.35s ease-in forwards;
}

@media (prefers-reduced-motion: reduce) {
  .fact.enter,
  .fact.exit {
    animation: none;
  }
  .fact { opacity: 1; }
}

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

@keyframes factExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Next button */
.next-wrap {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.btn-next {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.7rem 2rem;
  border: 2px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
}

.btn-next::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-next:hover {
  color: var(--wine-deep);
}

.btn-next:hover::before {
  transform-origin: left;
  transform: scaleX(1);
}

.counter {
  font-size: 0.85rem;
  color: var(--gold-muted);
  letter-spacing: 0.1em;
}

.counter span {
  color: var(--gold-light);
  font-weight: 600;
}

.site-footer {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold-muted);
  letter-spacing: 0.08em;
}

.footer-nav {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--gold-light);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

.footer-hint {
  margin: 0.25rem 0 0.5rem;
  font-weight: 500;
  color: var(--cream-dim);
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.9;
}

footer a {
  color: var(--gold-light);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer code {
  font-size: 0.85em;
  color: var(--gold-light);
}

/* Blog page */
.blog-main {
  width: 100%;
  max-width: 600px;
  padding: 0 1rem;
}

.blog-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-empty {
  color: var(--cream-dim);
  font-style: italic;
}

.blog-post {
  background: linear-gradient(145deg, rgba(45, 14, 24, 0.92) 0%, rgba(26, 8, 16, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.blog-post-image-wrap {
  display: block;
  margin: -1.5rem -1.75rem 1rem -1.75rem;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.blog-post-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}

.blog-date {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold-muted);
  display: block;
  margin-bottom: 0.5rem;
}

.blog-post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.blog-post-title a {
  color: inherit;
  text-decoration: none;
}

.blog-post-title a:hover {
  text-decoration: underline;
}

.blog-read-more {
  margin-top: 0.5rem;
}

.blog-read-more a {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 600;
}

.blog-read-more a:hover {
  text-decoration: underline;
}

.blog-excerpt {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.blog-body {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.55;
  font-weight: 500;
  color: var(--cream);
}

.blog-body p {
  margin-bottom: 0.75rem;
}

.blog-body p:last-child {
  margin-bottom: 0;
}

.blog-body code {
  background: rgba(201, 162, 39, 0.15);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-body a {
  color: var(--gold-light);
  text-decoration: underline;
}

.blog-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.6vw, 1.4rem);
  font-weight: 600;
  color: var(--gold);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.blog-body h2:first-child {
  margin-top: 0;
}

.pill-blog {
  margin-left: 0.25rem;
}

/* Standalone article page (SEO) */
.article-main {
  width: 100%;
  max-width: 640px;
  padding: 0 1rem;
}

.article-post {
  background: linear-gradient(145deg, rgba(45, 14, 24, 0.92) 0%, rgba(26, 8, 16, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-featured-image {
  margin: 0 -2.25rem 1.5rem -2.25rem;
  border-radius: 0;
  overflow: hidden;
}

.article-featured-image .blog-post-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.article-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 600;
  color: var(--gold-light);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.6vw, 1.4rem);
  font-weight: 600;
  color: var(--gold);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-back {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.article-back a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 0.9rem;
}

.article-back a:hover {
  text-decoration: underline;
}

/* Legal pages (Privacy) */
.legal-main {
  width: 100%;
  max-width: 640px;
  padding: 0 1rem;
}

.legal-article {
  background: linear-gradient(145deg, rgba(45, 14, 24, 0.92) 0%, rgba(26, 8, 16, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 2rem 2.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.legal-h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--gold-muted);
  margin-bottom: 1.25rem;
}

.legal-article p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.legal-article h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-article a {
  color: var(--gold-light);
  text-decoration: underline;
}

.legal-back {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.legal-back a {
  text-decoration: none;
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(26, 8, 16, 0.98);
  border-top: 1px solid rgba(201, 162, 39, 0.3);
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--cream-dim);
}

.cookie-consent a {
  color: var(--gold-light);
  text-decoration: underline;
}

.cookie-consent-btn {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  padding: 0.4rem 1rem;
  background: var(--gold);
  color: var(--wine-deep);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.cookie-consent-btn:hover {
  background: var(--gold-light);
}

@media (max-width: 480px) {
  .app {
    padding: 1rem 0.75rem 1rem;
    min-height: 100dvh;
    justify-content: flex-start;
    padding-top: 1.25rem;
  }
  .brand {
    margin-bottom: 0.25rem;
  }
  .tagline {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
  }
  .lang-switch {
    margin-bottom: 0.75rem;
  }
  .filters {
    margin-bottom: 0.75rem;
    gap: 0.35rem;
  }
  .pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }
  .facts-heading {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  .card {
    padding: 1.75rem 1.5rem 1.5rem;
    min-height: 150px;
  }
  .card .corner {
    font-size: 1.4rem;
  }
  .card .category,
  .card .fact {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .card .category {
    padding-top: 0.5rem;
  }
  .card .fact {
    padding-bottom: 0.5rem;
  }
  .next-wrap {
    margin-top: 1rem;
    gap: 0.5rem;
  }
  .site-footer {
    padding-top: 1rem;
    font-size: 0.8rem;
  }
  .cookie-consent {
    flex-direction: column;
    text-align: center;
  }
}

/* 404 page */
.error-main {
  width: 100%;
  max-width: 520px;
  margin-top: 0.5rem;
}

.error-card {
  background: linear-gradient(145deg, rgba(45, 14, 24, 0.92) 0%, rgba(26, 8, 16, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,162,39,0.08) inset;
  text-align: center;
}

.error-card .corner {
  position: absolute;
  font-size: 1.8rem;
  color: var(--gold);
  opacity: 0.35;
  font-family: Georgia, serif;
}

.error-card .corner-tl { top: 0.75rem; left: 0.75rem; }
.error-card .corner-tr { top: 0.75rem; right: 0.75rem; }
.error-card .corner-bl { bottom: 0.75rem; left: 0.75rem; }
.error-card .corner-br { bottom: 0.75rem; right: 0.75rem; }

.error-code {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.error-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 1rem;
}

.error-text {
  color: var(--cream-dim);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.error-actions a {
  color: var(--gold-light);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 500;
}

.error-actions a:hover {
  text-decoration: underline;
}
