/* ════════════════════════════════════════════════════════════
   bekah.ai — base.css
   CSS 변수 · Reset · 공통 Typography · 배경 효과 · Keyframes
   ════════════════════════════════════════════════════════════ */

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

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  --ink:         #080C14;
  --ink-deep:    #040609;
  --navy:        #0D1B2E;
  --gold:        #C9924A;
  --gold-lt:     #E8B87A;
  --gold-dim:    rgba(201, 146, 74, 0.15);
  --white:       #F5F0E8;
  --white-dim:   rgba(245, 240, 232, 0.55);
  --white-faint: rgba(245, 240, 232, 0.12);
  --slate:       rgba(245, 240, 232, 0.38);
  --line:        rgba(245, 240, 232, 0.08);

  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'DM Sans', system-ui, sans-serif;

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Base ───────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--ink-deep);
  color: var(--white);
  font-family: var(--f-body);
  min-height: 100svh;
  overflow-x: hidden;
  cursor: default;
}

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

/* ─── Radial Glow Background ─────────────────────────────── */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-glow::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse at center,
    rgba(201, 146, 74, 0.06) 0%,
    rgba(13, 27, 46, 0.15) 40%,
    transparent 70%
  );
  animation: pulse-glow 8s ease-in-out infinite alternate;
}
.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(37, 99, 235, 0.04) 0%,
    transparent 60%
  );
}
@keyframes pulse-glow {
  from { opacity: 0.7; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* ─── Cursor Glow ────────────────────────────────────────── */
.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 146, 74, 0.05) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  z-index: 998;
  opacity: 0;
}

/* ─── Layout ─────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  to { opacity: 1; }
}
@keyframes rule-expand {
  to { width: min(480px, 85vw); }
}
@keyframes scroll-drop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40%           { opacity: 1; }
}
@keyframes blink-hint {
  0%, 80%, 100% { opacity: 0.6; }
  40%           { opacity: 1; }
}

/* ─── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out-expo),
              transform 0.9s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.32s; }
.reveal-delay-4 { transition-delay: 0.46s; }

/* ─── Section Base ───────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 8rem 3.5rem;
  border-top: 1px solid var(--line);
}
.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

/* ─── Section Eyebrow ────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

/* ─── Section Title ──────────────────────────────────────── */
.section-title {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: italic;
  color: var(--gold);
}
.section-body {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--white-dim);
  max-width: 540px;
  margin-top: 1.4rem;
}

/* ─── Hebrew Background Decoration ──────────────────────── */
.section-hebrew {
  font-family: var(--f-display);
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 300;
  color: rgba(201, 146, 74, 0.05);
  line-height: 1;
  position: absolute;
  top: 2rem;
  right: 2rem;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
  z-index: 0;
}

/* ─── Scroll Hint ────────────────────────────────────────── */
.scroll-hint {
  position: fixed;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fade-in 1s ease 3.2s forwards;
  pointer-events: none;
}
.scroll-hint span {
  font-family: var(--f-body);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-drop 2s ease-in-out 3.5s infinite;
}

/* ─── Responsive Base ────────────────────────────────────── */
@media (max-width: 900px) {
  .section { padding: 5rem 1.8rem; }
}
