/* =============================================
   RIHLA — Cultural Guide Platform
   Style: Warm Editorial / Terracotta & Cream
   Fonts: Playfair Display (serif headlines) + DM Sans (body) + Cormorant Garamond (italic accents)
   ============================================= */

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

:root {
  --bg:        #faf7f2;
  --bg2:       #f5efe6;
  --cream:     #fffcf7;
  --surface:   #f0e9de;
  --border:    #e2d8cc;
  --border2:   #c8b9a8;
  --text:      #1e1a16;
  --muted:     #6b5e52;
  --muted2:    #9c8e82;
  --terra:     #c4593a;
  --terra2:    #d96b4a;
  --terra-dim: rgba(196,89,58,0.08);
  --terra-glow:rgba(196,89,58,0.2);
  --sand:      #d4a574;
  --sand2:     #e8c49a;
  --sage:      #6b8c6e;
  --midnight:  #1a1510;
  --gold:      #b8922a;
}

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

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

/* ---- ANIMATIONS ---- */
@keyframes fadeUp    { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
@keyframes fadeIn    { from{opacity:0} to{opacity:1} }
@keyframes marquee   { from{transform:translateX(0)} to{transform:translateX(-50%)} }
@keyframes float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes shimmer   { 0%{background-position:-200% center} 100%{background-position:200% center} }

/* ---- REVEAL ---- */
.reveal { opacity:0; transform:translateY(16px); transition:opacity 0.9s cubic-bezier(.22,1,.36,1), transform 0.9s cubic-bezier(.22,1,.36,1); }
.revealed { opacity:1; transform:none; }
.reveal-delay-1 { transition-delay:0.12s; }
.reveal-delay-2 { transition-delay:0.24s; }
.reveal-delay-3 { transition-delay:0.36s; }
.reveal-delay-4 { transition-delay:0.48s; }

/* =============================================
   NAVIGATION
   ============================================= */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 3rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.nav-logo-mark {
  width: 34px; height: 34px; border: 1.5px solid var(--terra);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700;
  color: var(--terra); font-style: italic;
  transition: all 0.3s;
}
.nav-logo:hover .nav-logo-mark { background: var(--terra); color: white; }
.nav-logo-name { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.nav-logo-name em { font-style: italic; color: var(--terra); }

nav ul { display: flex; gap: 0; list-style: none; height: 68px; }
nav ul a {
  display: flex; align-items: center; height: 68px; padding: 0 1.2rem;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  text-decoration: none; letter-spacing: 0.01em;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s;
}
nav ul a:hover, nav ul a.active { color: var(--terra); border-bottom-color: var(--terra); }

.nav-cta {
  background: var(--terra); color: white;
  padding: 0.55rem 1.4rem; font-size: 0.8rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s; letter-spacing: 0.01em;
  border-radius: 2px;
}
.nav-cta:hover { background: var(--terra2); }

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero {
  background: var(--midnight); padding: 5rem 3rem 4rem;
  position: relative; overflow: hidden;
}
.ph-pattern {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: radial-gradient(circle, var(--sand) 1px, transparent 1px);
  background-size: 32px 32px;
}
.ph-glow { position: absolute; bottom: -50%; left: 50%; transform: translateX(-50%); width: 80vw; height: 80vw; border-radius: 50%; background: radial-gradient(circle, rgba(196,89,58,0.15) 0%, transparent 60%); }
.page-hero-inner { position: relative; z-index: 1; max-width: 1300px; margin: 0 auto; }
.ph-breadcrumb { font-size: 0.72rem; color: rgba(255,255,255,0.35); margin-bottom: 1rem; display: flex; gap: 0.5rem; align-items: center; }
.ph-breadcrumb a { color: var(--sand2); text-decoration: none; }
.ph-breadcrumb span { opacity: 0.3; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem,5vw,5rem); font-weight: 700; color: white; letter-spacing: -0.02em; line-height: 1.05; }
.page-hero h1 em { font-style: italic; color: var(--sand2); }
.page-hero p { font-size: 0.88rem; color: rgba(255,255,255,0.45); margin-top: 0.6rem; }

/* =============================================
   TYPOGRAPHY HELPERS
   ============================================= */
.eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 0.65rem; font-weight: 600;
  color: var(--terra); letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem;
}
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--terra); }

.display-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem,4vw,3.5rem); font-weight: 700;
  color: var(--text); letter-spacing: -0.02em; line-height: 1.1;
}
.display-title em { font-style: italic; color: var(--terra); }
.display-title .stroke { -webkit-text-stroke: 1px var(--terra); color: transparent; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-terra {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--terra); color: white;
  padding: 0.85rem 2rem; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; border-radius: 2px;
  transition: all 0.25s; letter-spacing: 0.01em;
}
.btn-terra:hover { background: var(--terra2); transform: translateY(-2px); box-shadow: 0 8px 24px var(--terra-glow); }

.btn-outline-terra {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: transparent; color: var(--terra); border: 1.5px solid var(--terra);
  padding: 0.85rem 2rem; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border-radius: 2px; transition: all 0.25s;
}
.btn-outline-terra:hover { background: var(--terra); color: white; }

.btn-dark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--midnight); color: white;
  padding: 0.85rem 2rem; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none; border-radius: 2px;
  transition: all 0.25s;
}
.btn-dark:hover { background: var(--text); transform: translateY(-2px); }

/* =============================================
   GUIDE / ARTICLE CARD
   ============================================= */
.guide-card {
  background: var(--cream); border: 1px solid var(--border);
  overflow: hidden; transition: all 0.35s;
}
.guide-card:hover { transform: translateY(-5px); box-shadow: 0 16px 48px rgba(30,26,22,0.1); border-color: var(--border2); }
.gc-img { height: 220px; overflow: hidden; position: relative; }
.gc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.guide-card:hover .gc-img img { transform: scale(1.06); }
.gc-cat { position: absolute; top: 1rem; left: 1rem; background: var(--terra); color: white; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 2px; }
.gc-save { position: absolute; top: 1rem; right: 1rem; width: 32px; height: 32px; background: white; border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.gc-save:hover { background: var(--terra); color: white; }
.gc-body { padding: 1.5rem; }
.gc-region { font-size: 0.68rem; font-weight: 600; color: var(--muted2); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.3rem; }
.gc-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 0.5rem; }
.gc-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; }
.gc-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border); }
.gc-meta { display: flex; gap: 1rem; }
.gc-m { font-size: 0.72rem; color: var(--muted2); display: flex; align-items: center; gap: 0.3rem; }
.gc-read { font-size: 0.72rem; font-weight: 600; color: var(--terra); text-decoration: none; }
.gc-read:hover { text-decoration: underline; }

/* =============================================
   DESTINATION CARD
   ============================================= */
.dest-card { position: relative; overflow: hidden; border-radius: 2px; cursor: pointer; }
.dest-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.dest-card:hover img { transform: scale(1.07); }
.dest-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(26,21,16,0.88) 100%); }
.dest-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.5rem; }
.dest-region { font-size: 0.6rem; font-weight: 600; color: var(--sand2); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.3rem; }
.dest-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: white; line-height: 1.1; }
.dest-count { font-size: 0.72rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }

/* =============================================
   MARQUEE
   ============================================= */
.marquee-strip { background: var(--midnight); padding: 1rem 0; overflow: hidden; }
.marquee-track { display: flex; gap: 4rem; animation: marquee 22s linear infinite; white-space: nowrap; align-items: center; }
.marquee-track span { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 400; color: rgba(255,255,255,0.3); font-style: italic; letter-spacing: 0.02em; }
.marquee-track .m-sep { color: var(--terra); font-style: normal; font-family: 'DM Sans', sans-serif; font-size: 0.6rem; }

/* =============================================
   FORMS
   ============================================= */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.form-group input, .form-group select, .form-group textarea {
  background: white; border: 1.5px solid var(--border);
  padding: 0.85rem 1rem; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem;
  outline: none; transition: border-color 0.2s; resize: none; width: 100%; border-radius: 2px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-dim);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--midnight); color: rgba(255,255,255,0.55);
  padding: 5rem 3rem 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: 1300px; margin: 0 auto 3rem; }
.footer-logo-name { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: white; letter-spacing: -0.01em; display: block; margin-bottom: 0.2rem; }
.footer-logo-name em { font-style: italic; color: var(--sand2); }
.footer-logo-sub { font-size: 0.65rem; color: rgba(255,255,255,0.3); letter-spacing: 0.12em; text-transform: uppercase; display: block; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.8rem; line-height: 1.85; max-width: 240px; }
.footer-col h4 { font-size: 0.62rem; color: var(--sand2); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.3rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col ul a { font-size: 0.82rem; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--sand2); }
.footer-col p { font-size: 0.8rem; line-height: 1.9; }
.footer-rule { border: none; border-top: 1px solid rgba(255,255,255,0.08); max-width: 1300px; margin: 0 auto 1.5rem; }
.footer-bottom { max-width: 1300px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.68rem; color: rgba(255,255,255,0.25); }
.footer-bottom a { color: var(--sand2); text-decoration: none; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media(max-width:900px){
  nav { padding: 0 1.5rem; }
  nav ul { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .page-hero { padding: 4rem 1.5rem 3rem; }
}
@media(max-width:600px){
  .footer-grid { grid-template-columns: 1fr; }
}
