/* ==========================================
   HAMPI CHRONICLES — Design System
   File: css/design-system.css
   ========================================== */

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

/* ---------- CSS Variables ---------- */
:root {
  --gold:       #C9922A;
  --gold-lt:    #F5C842;
  --gold-pale:  #F7E09A;
  --ember:      #E85D25;
  --night:      #0A0804;
  --deep:       #0D0B06;
  --charcoal:   #181309;
  --stone:      #221A0C;
  --mist:       #B8A882;
  --parchment:  #EDE0C4;
  --cream:      #F9F2E4;
  --indigo:     #8B9FD4;
  --indigo-dk:  #4A5C9A;
  --teal:       #4ABAA0;
  --ruby:       #C04040;
  --fd: 'Cinzel', Georgia, serif;
  --fb: 'Crimson Pro', Georgia, serif;
  --fi: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--fb);
  background: var(--night);
  color: var(--cream);
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar       { width: 3px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
::selection { background: rgba(201,146,42,.25); color: var(--cream); }

/* ---------- Custom Cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot  { width: 10px; height: 10px; background: var(--gold); mix-blend-mode: screen; transition: width .15s, height .15s; }
.cursor-ring { width: 32px; height: 32px; border: 1px solid rgba(201,146,42,.5); transition: width .25s, height .25s; }
body.cursor-hover .cursor-dot  { width: 18px; height: 18px; }
body.cursor-hover .cursor-ring { width: 50px;  height: 50px; }

/* ---------- Typography ---------- */
.lbl { font-family: var(--fd); font-size: .58rem; letter-spacing: .45em; color: var(--gold); text-transform: uppercase; display: block; margin-bottom: .75rem; }
.txl { font-family: var(--fd); font-size: clamp(2.5rem,6vw,5rem); font-weight: 700; color: var(--cream); line-height: 1; margin-bottom: 1.4rem; }
.tlg { font-family: var(--fd); font-size: clamp(1.8rem,3.5vw,3rem); font-weight: 600; color: var(--cream); line-height: 1.1; margin-bottom: 1.2rem; }
.tmd { font-family: var(--fd); font-size: 1.4rem; font-weight: 600; color: var(--cream); line-height: 1.2; margin-bottom: 1rem; }
.sub { font-family: var(--fi); font-size: 1.1rem; font-style: italic; color: var(--mist); line-height: 1.78; }
em.g  { color: var(--gold-lt); font-style: italic; }
em.i  { color: var(--indigo);  font-style: italic; }
em.t  { color: var(--teal);    font-style: italic; }
em.r  { color: var(--ruby);    font-style: italic; }

/* Story reading typography */
.story-body { font-family: var(--fi); font-size: 1.22rem; line-height: 2.05; color: var(--parchment); }
.story-body p { margin-bottom: 1.75rem; }
.drop-cap::first-letter { font-family: var(--fd); font-size: 4.5rem; font-weight: 900; color: var(--gold); float: left; line-height: .72; margin: .1rem .3rem 0 0; }

/* ---------- Dividers ---------- */
.dv  { width: 60px; height: 1px; background: linear-gradient(to right, var(--gold), transparent); margin: 1.4rem 0; }
.dvc { width: 80px; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); margin: 1.4rem auto; }
.orn { font-family: var(--fi); font-size: 1.1rem; color: rgba(201,146,42,.35); letter-spacing: .4em; }
hr.sep { border: none; border-top: 1px solid rgba(201,146,42,.12); margin: 2.5rem 0; }

/* ---------- Buttons ---------- */
.btn { font-family: var(--fd); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; cursor: none; border: none; transition: all .3s var(--ease); }
.btn-g { background: linear-gradient(135deg, var(--gold-lt), var(--gold)); color: var(--night); padding: .85rem 2.2rem; box-shadow: 0 0 24px rgba(245,200,66,.22); }
.btn-g:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(245,200,66,.42); }
.btn-o { background: transparent; color: var(--mist); border: 1px solid rgba(184,168,130,.35); padding: .85rem 1.8rem; }
.btn-o:hover { border-color: var(--gold); color: var(--gold-lt); }
.btn-ghost { background: transparent; color: var(--gold); padding: .5rem 0; border-bottom: 1px solid rgba(201,146,42,.3); }
.btn-ghost:hover { color: var(--gold-lt); border-bottom-color: var(--gold-lt); }

/* ---------- Tags ---------- */
.tg    { font-family: var(--fd); font-size: .52rem; letter-spacing: .18em; text-transform: uppercase; padding: .28rem .65rem; display: inline-block; }
.tg-g  { background: rgba(201,146,42,.15);  color: var(--gold);   border: 1px solid rgba(201,146,42,.3); }
.tg-i  { background: rgba(139,159,212,.15); color: var(--indigo); border: 1px solid rgba(139,159,212,.3); }
.tg-t  { background: rgba(74,186,160,.15);  color: var(--teal);   border: 1px solid rgba(74,186,160,.3); }
.tg-r  { background: rgba(192,64,64,.15);   color: var(--ruby);   border: 1px solid rgba(192,64,64,.3); }

/* ---------- Cards ---------- */
.card { background: var(--stone); border: 1px solid rgba(201,146,42,.12); position: relative; overflow: hidden; cursor: none; transition: border-color .3s, transform .35s var(--ease); }
.card:hover { border-color: rgba(201,146,42,.45); transform: translateY(-3px); }
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--gold); transform: scaleY(0); transform-origin: bottom; transition: transform .35s var(--ease); }
.card:hover::before { transform: scaleY(1); }

/* ---------- Input ---------- */
.inp { width: 100%; background: rgba(255,255,255,.04); border: 1px solid rgba(201,146,42,.22); color: var(--cream); font-family: var(--fb); font-size: .95rem; padding: .7rem 1.1rem; outline: none; transition: border-color .3s; cursor: text; }
.inp:focus { border-color: var(--gold); }
.inp::placeholder { color: rgba(184,168,130,.4); }

/* ---------- Language pills ---------- */
.lang-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.lang-pill { font-family: var(--fd); font-size: .52rem; letter-spacing: .15em; color: var(--mist); border: 1px solid rgba(184,168,130,.25); padding: .28rem .7rem; }

/* ---------- Animations ---------- */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scanLine { 0% { top: 8%; } 50% { top: 88%; } 100% { top: 8%; } }
@keyframes blink    { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes float    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse    { 0%,100% { opacity: .4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes pageIn   { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageOut  { to { opacity: 0; transform: translateY(16px); } }

/* ---------- Scroll Reveal ---------- */
.rv { opacity: 0; transform: translateY(32px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.rv.v  { opacity: 1; transform: translateY(0); }
.rv.d1 { transition-delay: .1s; }
.rv.d2 { transition-delay: .2s; }
.rv.d3 { transition-delay: .3s; }
.rv.d4 { transition-delay: .4s; }

/* ---------- Page Transitions ---------- */
#page { min-height: 100vh; }
.pg-in  { animation: pageIn  .4s var(--ease) forwards; }
.pg-out { animation: pageOut .25s var(--ease) forwards; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}
