/* ================================================
   OFRALU — Shared Styles
   ================================================ */

/* Fonts */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/CormorantGaramond-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/CormorantGaramond-300italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/CormorantGaramond-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/CormorantGaramond-400italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/CinzelDecorative-400.woff2') format('woff2');
}

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

/* Design tokens */
:root {
  --bg: #fdf8f2;
  --bg2: #f5ede0;
  --soft: #e8d5c0;
  --mist: #7a6a5a;
  --text: #3d2e22;
  --accent: #b07d54;
  --blush: #e8b4a0;
  --sky: #c8dde8;
  --sage: #a8c4b0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle paper texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 150px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Floating dust motes */
.stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: rgba(176, 125, 84, 0.3);
  animation: twinkle var(--d) ease-in-out infinite;
  opacity: 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50% { opacity: var(--op); transform: translateY(-8px); }
}

/* Orbs — base */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes drift {
  0%   { opacity: 0; transform: translate(0,0) scale(1); }
  20%  { opacity: 1; }
  50%  { transform: translate(25px, -18px) scale(1.04); }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-8px, 12px) scale(0.98); }
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* ================================================
   Hero
   ================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  overflow: hidden;
  background: linear-gradient(160deg, #fdf8f2 0%, #fce9d8 40%, #f0e4d4 100%);
}

.lang-switch {
  position: absolute;
  top: 1.6rem;
  right: 1.8rem;
  z-index: 3;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(122, 106, 90, 0.55);
  border-bottom: 1px solid rgba(122, 106, 90, 0.25);
  padding-bottom: 0.12rem;
  transition: color 0.25s, border-color 0.25s;
}

.lang-switch:hover {
  color: var(--accent);
  border-bottom-color: rgba(176, 125, 84, 0.5);
}

.wordmark {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(3.5rem, 12vw, 9rem);
  letter-spacing: 0.18em;
  color: transparent;
  background: linear-gradient(135deg, #8b5e3c 0%, #c9956a 45%, #b07d54 100%);
  -webkit-background-clip: text;
  background-clip: text;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
  text-shadow: none;
  filter: drop-shadow(0 2px 20px rgba(176, 125, 84, 0.2));
  text-decoration: none;
}

.subtitle {
  font-style: italic;
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--mist);
  opacity: 0;
  animation: fadeUp 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
  margin-top: 0.5rem;
  z-index: 2;
}

.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 3rem auto;
  opacity: 0;
  animation: fadeIn 2s ease 1.2s forwards;
  z-index: 2;
}

/* ================================================
   Definition
   ================================================ */

.definition {
  max-width: 640px;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 2s cubic-bezier(0.22, 1, 0.36, 1) 1s forwards;
}

.pos {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.etymology {
  font-size: 0.85rem;
  font-style: italic;
  color: #a07858;
  margin-bottom: 1.8rem;
  opacity: 0.8;
}

.def-text {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  line-height: 1.75;
  color: var(--text);
  font-weight: 300;
}

/* ================================================
   Example quote
   ================================================ */

.example-wrap {
  max-width: 560px;
  margin: 4rem auto 0;
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 2s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}
.example-wrap::before {
  content: '\201C';
  font-family: 'Cinzel Decorative', serif;
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.2;
  position: absolute;
  top: -2rem; left: -1rem;
  line-height: 1;
}
.example-text {
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--mist);
  line-height: 1.8;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(176, 125, 84, 0.25);
}

/* ================================================
   Scroll hint
   ================================================ */

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 2s ease 2.5s forwards;
  z-index: 2;
}
.scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(122, 106, 90, 0.4);
}
.scroll-line {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, rgba(176,125,84,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ================================================
   Feeling cards (index)
   ================================================ */

.section2 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #f0e4d4 0%, #fdf8f2 100%);
}
.feelings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 800px;
  width: 100%;
}
.feeling-card {
  border: 1px solid rgba(176, 125, 84, 0.18);
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(253, 248, 242, 0.8);
  backdrop-filter: blur(10px);
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  opacity: 0;
  animation: fadeUp 1.5s ease forwards;
  box-shadow: 0 2px 20px rgba(176, 125, 84, 0.06);
}
.feeling-card:hover {
  border-color: rgba(176, 125, 84, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(176, 125, 84, 0.12);
}
.feeling-card:nth-child(1) { animation-delay: 0.1s; }
.feeling-card:nth-child(2) { animation-delay: 0.3s; }
.feeling-card:nth-child(3) { animation-delay: 0.5s; }

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  display: block;
}
.card-title {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.card-desc {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--mist);
  line-height: 1.7;
  opacity: 0.9;
}

/* ================================================
   Meanings navigation
   ================================================ */

.meanings-section {
  padding: 2rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #fdf8f2 0%, #f5ede0 100%);
  border-top: 1px solid rgba(176, 125, 84, 0.1);
}

.meanings-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.meanings-label {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(122, 106, 90, 0.45);
}

.meanings-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-arrow {
  background: none;
  border: 1px solid rgba(176, 125, 84, 0.3);
  color: var(--accent);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, opacity 0.3s;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-arrow:hover {
  border-color: var(--accent);
  background: rgba(176, 125, 84, 0.07);
}
.nav-arrow:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}
a.nav-arrow {
  text-decoration: none;
  cursor: pointer;
}

.nav-dots {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}
.nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(176, 125, 84, 0.25);
  transition: background 0.3s, transform 0.3s;
  border: none;
  padding: 0;
}
.nav-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}
a.nav-dot {
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.meaning-counter {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(122, 106, 90, 0.4);
}

/* ================================================
   Footer
   ================================================ */

footer {
  text-align: center;
  padding: 3rem 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(122, 106, 90, 0.35);
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(176, 125, 84, 0.1);
  background: var(--bg);
}
