/* =========================================================
   STAGE WORKS — Cinematic Editorial System
   ========================================================= */

@font-face { font-family: 'Paperlogy'; src: url('../../fonts/Paperlogy-4Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Paperlogy'; src: url('../../fonts/Paperlogy-5Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Paperlogy'; src: url('../../fonts/Paperlogy-7Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Paperlogy'; src: url('../../fonts/Paperlogy-8ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Paperlogy'; src: url('../../fonts/Paperlogy-9Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --black:  #0E0E10;
  --black-2:#141416;
  --char:   #1A1A1C;
  --char-2: #222224;
  --line:   #2E2E30;
  --line-2: #3a3a3c;
  --ivory:  #E8E1D4;
  --body:   #D6D3CC;
  --dim:    #7a7874;
  --amber:  #E8863A;
  --amber-2:#F0A460;

  --fs-mega:  clamp(60px, 11.5vw, 220px);
  --fs-hero:  clamp(44px, 7.5vw, 140px);
  --fs-disp:  clamp(32px, 4.4vw, 72px);
  --fs-h1:    clamp(28px, 3.4vw, 52px);
  --fs-h2:    clamp(22px, 2.4vw, 36px);
  --fs-h3:    clamp(18px, 1.4vw, 22px);
  --fs-body:  clamp(15px, 1.05vw, 17px);
  --fs-small: clamp(12px, 0.82vw, 13px);
  --fs-cap:   clamp(10px, 0.72vw, 12px);

  --gutter: clamp(20px, 4vw, 64px);
  --rail: 48px;
  --max: 1440px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: var(--amber); color: var(--black); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--body);
  font-family: 'Paperlogy', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 0.005em;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }

/* ---------- PAPER NOISE + SPOT GLOW ---------- */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232,134,58,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 115%, rgba(232,134,58,0.06) 0%, transparent 50%);
  mix-blend-mode: screen;
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  opacity: 0.06;
  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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}

/* ---------- TYPE CLASSES ---------- */
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-feature-settings: 'tnum' 1; }
.label {
  font-family: 'Inter', 'Paperlogy', sans-serif;
  font-size: var(--fs-cap);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.label-amber { color: var(--amber); }
.rule { height: 1px; background: var(--line); width: 100%; }
.rule-amber { height: 1px; background: var(--amber); width: 48px; }

/* ---------- LEFT VERTICAL RAIL ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--rail);
  border-right: 1px solid var(--line);
  background: var(--black);
  z-index: 100;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 0;
}
.rail-mark {
  font-family: 'Inter', sans-serif; font-weight: 900;
  font-size: 11px; letter-spacing: 0.2em; text-align: center;
  color: var(--ivory);
}
.rail-vert {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--dim);
  margin: 0 auto;
}
.rail-phone {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.18em; color: var(--ivory);
  margin: 0 auto;
}
@media (max-width: 900px) { .rail { display: none; } }

/* ---------- TOP NAV ---------- */
.nav {
  position: fixed; top: 0; left: var(--rail); right: 0;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  z-index: 90;
  border-bottom: 1px solid var(--line);
  background: rgba(14,14,16,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
@media (max-width: 900px) { .nav { left: 0; height: 56px; } }

.nav-brand {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--ivory);
}
.nav-brand .mk { font-family: 'Inter', sans-serif; font-weight: 900; font-size: 15px; letter-spacing: 0.2em; }
.nav-brand .kr { font-weight: 700; font-size: 13px; letter-spacing: 0.08em; color: var(--body); }
.nav-brand .dot { width: 6px; height: 6px; background: var(--amber); border-radius: 50%; box-shadow: 0 0 12px var(--amber); animation: pulse 3.2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--body);
  transition: color 0.18s var(--ease);
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; inset: auto 0 -6px 0; height: 1px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--amber); }
.nav-cta {
  border: 1px solid var(--line);
  padding: 10px 18px !important;
  color: var(--ivory) !important;
  transition: all 0.22s var(--ease);
}
.nav-cta:hover { background: var(--amber); border-color: var(--amber); color: var(--black) !important; }
.nav-cta::after { display: none !important; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- CONTAINER ---------- */
main { padding-left: var(--rail); padding-top: 64px; position: relative; z-index: 5; }
@media (max-width: 900px) { main { padding-left: 0; padding-top: 56px; } }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 11vw, 160px) 0; position: relative; }
.section-sm { padding: clamp(64px, 8vw, 110px) 0; }

.section-head {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 48px; align-items: start;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.section-head .meta { display: flex; flex-direction: column; gap: 12px; }
.section-head .cue {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; color: var(--amber);
}
.section-head h2 {
  font-family: 'Paperlogy', 'Inter', sans-serif;
  font-weight: 800; font-size: var(--fs-disp);
  line-height: 1.2; letter-spacing: -0.02em;
  color: var(--ivory);
  max-width: 18ch;
}
.section-head .kicker {
  font-size: var(--fs-body); color: var(--body); max-width: 54ch;
  margin-top: 28px; line-height: 1.95;
}
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  font-family: 'Inter', 'Paperlogy', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px;
  color: var(--ivory);
  transition: all 0.22s var(--ease);
  position: relative;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn-primary {
  background: var(--amber); border-color: var(--amber); color: var(--black);
}
.btn-primary:hover { background: var(--amber-2); border-color: var(--amber-2); color: var(--black); }
.btn .arr { display: inline-block; transition: transform 0.22s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- CARD (hairline) ---------- */
.card {
  background: var(--char);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 32px;
  transition: border-color 0.25s var(--ease);
}
.card:hover { border-color: var(--line-2); }
.card-amber { border-top: 1px solid var(--amber); }

/* ---------- FOOTER ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 80px var(--gutter) 40px;
  background: var(--black);
  position: relative; z-index: 5;
  margin-left: var(--rail);
}
@media (max-width: 900px) { .foot { margin-left: 0; } }
.foot-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot h4 { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--dim); margin-bottom: 20px; }
.foot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot a { color: var(--body); font-size: 14px; transition: color 0.18s var(--ease); }
.foot a:hover { color: var(--amber); }
.foot-brand .mk { font-family: 'Inter', sans-serif; font-weight: 900; font-size: 22px; letter-spacing: 0.16em; color: var(--ivory); margin-bottom: 8px; }
.foot-brand .kr { font-family: 'Paperlogy', sans-serif; font-weight: 700; font-size: 15px; color: var(--body); margin-bottom: 16px; }
.foot-brand p { font-size: 13px; line-height: 1.65; color: var(--dim); max-width: 32ch; }
.foot-bottom {
  max-width: var(--max); margin: 32px auto 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--dim); letter-spacing: 0.08em;
  flex-wrap: wrap;
}
.foot-bottom .amber-dot { color: var(--amber); }

/* ---------- REVEAL (intersection observer) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.vis { opacity: 1; transform: translateY(0); }
.reveal-slow { transition-duration: 1.3s; }

/* ---------- ENTRY FADE ---------- */
@keyframes entryFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.entry > * { opacity: 0; animation: entryFade 1s var(--ease) forwards; }
.entry > *:nth-child(1) { animation-delay: 0.1s; }
.entry > *:nth-child(2) { animation-delay: 0.25s; }
.entry > *:nth-child(3) { animation-delay: 0.4s; }
.entry > *:nth-child(4) { animation-delay: 0.55s; }
.entry > *:nth-child(5) { animation-delay: 0.7s; }
.entry > *:nth-child(6) { animation-delay: 0.85s; }

/* ---------- PRELOADER ---------- */
.pre {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black); display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
.pre.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre-mk {
  font-family: 'Inter', sans-serif; font-weight: 900;
  font-size: 14px; letter-spacing: 0.4em; color: var(--ivory);
  display: flex; align-items: center; gap: 16px;
}
.pre-bar { width: 0; height: 1px; background: var(--amber); animation: preFill 1.1s 0.2s var(--ease) forwards; }
@keyframes preFill { to { width: 120px; } }
