/* =====================================================================
   Maxie the Spooky — v2
   Brand portfolio · editorial · warm white · lots of air
   Cute kept soft; structure made minimal & refined.
   ===================================================================== */

:root {
  /* color — warm, restrained */
  --paper:   #FBFAF5;   /* warm white base   */
  --ivory:   #F3EEE2;   /* ivory             */
  --cream:   #FEFCF7;   /* soft cream (cards)*/
  --ink:     #2B2723;   /* warm near-black   */
  --ink-2:   #6E665E;   /* muted body        */
  --ink-3:   #A79E92;   /* faint / captions  */
  --line:    #E7E0D1;   /* hairline          */
  --line-2:  #EFEADD;

  --orange:  #ED9F49;   /* Maxie orange      */
  --orange-d:#D9842B;
  --yellow:  #F2D484;   /* soft yellow       */
  --green:   #A4C79A;   /* lucky green       */
  --green-d: #82AC78;
  --blush:   #EEC2C5;   /* whisper accent    */

  /* type */
  --serif:    'Cormorant Garamond', 'Gowun Batang', Georgia, serif;
  --serif-ko: 'Gowun Batang', 'Cormorant Garamond', serif;
  --sans:     'Jost', 'Gowun Dodum', system-ui, sans-serif;
  --body:     'Gowun Dodum', 'Jost', system-ui, sans-serif;
  --script:   'Sacramento', cursive;

  --maxw: 1280px;
  --gut: clamp(22px, 6vw, 96px);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 4px; }

/* very subtle paper grain — premium texture, no visible pattern */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared atoms ---------- */
.kicker {
  font-family: var(--sans); font-weight: 400;
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-3);
}
.kicker--accent { color: var(--orange); }
.kicker--mini { font-size: .62rem; letter-spacing: .24em; color: var(--ink-3); }

.section-head { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: baseline; gap: clamp(14px, 3vw, 30px); margin-bottom: clamp(40px, 6vw, 72px); }
.section-head__title {
  font-family: var(--serif-ko); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; color: var(--ink);
  letter-spacing: .01em;
}

.link-arrow {
  margin-top: clamp(26px, 4vw, 40px);
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 4px;
}
.link-arrow__line { display: inline-block; width: 46px; height: 1px; background: var(--ink); transition: width .35s ease; }
.link-arrow:hover .link-arrow__line { width: 70px; }
.link-arrow span:last-child { transition: transform .35s ease; }
.link-arrow:hover span:last-child { transform: translateX(5px); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: .92rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper); background: var(--ink);
  padding: 16px 32px; border-radius: 999px;
  transition: background .35s ease, transform .35s ease, gap .35s ease;
}
.btn:hover { background: var(--orange-d); transform: translateY(-2px); gap: 16px; }

/* ============================ NAV ============================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.4vw, 26px) var(--gut);
  transition: background .4s ease, padding .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(251, 250, 245, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.nav__logo { display: inline-flex; align-items: center; padding: 2px 4px; }
.nav__logo img {
  height: clamp(24px, 2.5vw, 31px); width: auto; display: block;
  transition: transform .45s cubic-bezier(.34,1.5,.64,1), opacity .3s ease;
}
.nav__logo:hover img { transform: rotate(-2deg) scale(1.05); }

.nav__menu { display: none; gap: clamp(22px, 2.6vw, 44px); }
.nav__menu a {
  font-family: var(--sans); font-size: .86rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); position: relative; padding: 4px 0;
  transition: color .25s ease;
}
.nav__menu a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--orange); transition: right .3s ease;
}
.nav__menu a:hover { color: var(--ink); }
.nav__menu a:hover::after { right: 0; }

.nav__right { display: flex; align-items: center; gap: 16px; }
.lang { display: flex; align-items: center; gap: 7px; }
.lang__btn {
  font-family: var(--sans); font-size: .82rem; letter-spacing: .1em;
  color: var(--ink-3); transition: color .25s ease;
}
.lang__btn.is-active { color: var(--ink); }
.lang__btn:hover { color: var(--orange-d); }
.lang__sep { color: var(--line); }

.nav__toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 30px; height: 30px;
}
.nav__toggle span { display: block; height: 1.5px; width: 26px; background: var(--ink); transition: transform .35s ease, opacity .25s ease; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; display: flex;
    flex-direction: column; gap: 0;
    background: rgba(254, 252, 247, .98); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 22px;
    opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
  }
  .nav.is-open .nav__menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__menu a { padding: 15px 0; border-bottom: 1px solid var(--line-2); font-size: 1rem; }
  .nav__menu a::after { display: none; }
}
@media (min-width: 900px) { .nav__menu { display: flex; } .nav__toggle { display: none; } }

/* ============================ HERO ============================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: clamp(120px, 16vh, 200px) var(--gut) clamp(40px, 6vh, 64px);
  max-width: var(--maxw); margin: 0 auto;
}
.hero__main {
  flex: 1 1 auto;
  display: grid; align-items: center;
  grid-template-columns: 1fr;
  gap: clamp(20px, 5vw, 60px);
}
.hero__text { position: relative; z-index: 2; }
.hero__title {
  font-family: var(--serif); font-weight: 300; text-transform: uppercase;
  font-size: clamp(3rem, 11vw, 7rem); line-height: 1.04; letter-spacing: .05em;
  color: var(--ink); margin: clamp(20px, 2.6vw, 30px) 0 clamp(26px, 3.2vw, 38px);
}
.hero__slogan {
  font-family: var(--serif-ko); font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.7; color: var(--ink);
  letter-spacing: .01em;
}
.hero__sub {
  font-family: var(--body); font-size: clamp(.95rem, 1.4vw, 1.05rem);
  color: var(--ink-2); margin-top: 18px; max-width: 34ch; line-height: 1.9;
}

.hero__stage {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  min-height: clamp(280px, 42vw, 520px);
  color: var(--line);   /* drives orbit stroke */
}
.hero__orbit {
  position: absolute; width: min(108%, 620px); height: auto; aspect-ratio: 1;
  opacity: .9; animation: spin 80s linear infinite;
}
.hero__char {
  position: relative; z-index: 2;
  width: clamp(190px, 33vw, 388px);
  filter: drop-shadow(0 12px 16px rgba(150, 140, 120, .13));
  animation: floatY 7s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__scroll {
  margin-top: clamp(28px, 5vh, 56px); align-self: flex-start;
  display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: .68rem; letter-spacing: .3em; color: var(--ink-3);
}
.hero__scroll-line { width: 1px; height: 46px; background: linear-gradient(var(--ink-3), transparent); }
@media (max-width: 899px) { .hero__scroll { display: none; } }

@media (min-width: 900px) {
  .hero__main { grid-template-columns: 1.02fr 1fr; }
  .hero__title { font-size: clamp(3.4rem, 6vw, 6.6rem); }
}

/* ---------- sparkles (tiny twinkles + clover) ---------- */
.sparkles { position: absolute; inset: -6% -2%; pointer-events: none; z-index: 1; }
.spark { position: absolute; opacity: 0; animation: twinkle var(--dur,5s) ease-in-out var(--delay,0s) infinite; }
.spark--sway { animation: sway var(--dur,7s) ease-in-out var(--delay,0s) infinite; }
@keyframes twinkle { 0%,100% { opacity: calc(var(--max,.8) * .5); transform: scale(.92); } 50% { opacity: var(--max,.8); transform: scale(1); } }
@keyframes sway { 0%,100% { transform: rotate(-6deg); opacity: calc(var(--max,.7) * .72); } 50% { transform: rotate(6deg); opacity: var(--max,.7); } }

/* ============================ FEATURE (Story / About) ============================ */
.feature {
  position: relative; margin: clamp(60px, 9vw, 130px) 0;
  display: grid; align-items: center;
}
.feature__art { position: relative; width: 100%; }
.feature__art img {
  width: 100%; height: clamp(360px, 56vw, 600px); object-fit: cover;
}
.feature__panel {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: clamp(30px, 4vw, 52px);
  box-shadow: 0 30px 70px -40px rgba(150, 135, 110, .5);
}
.feature__title {
  font-family: var(--serif-ko); font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.18; color: var(--ink);
  margin: 14px 0 18px;
}
.feature__body { font-size: clamp(.98rem, 1.4vw, 1.08rem); color: var(--ink-2); max-width: 44ch; }

/* mobile: image on top, panel overlapping up */
.feature__panel {
  width: min(90%, 560px); margin: -56px auto 0; position: relative; z-index: 2;
}
@media (min-width: 880px) {
  .feature { grid-template-columns: 1fr; }
  .feature__art img { height: clamp(460px, 50vw, 640px); }
  .feature__panel {
    position: absolute; margin: 0; width: min(440px, 42%);
    left: var(--gut); top: 50%; transform: translateY(-50%);
  }
  .feature--right .feature__panel { left: auto; right: var(--gut); }
}

/* ============================ CHARACTERS ============================ */
.chars { padding: clamp(70px, 11vw, 150px) 0; border-top: 1px solid var(--line); }
.chars__row {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: 1fr; gap: clamp(56px, 7vw, 80px);
}
.figure { text-align: center; }
.figure__art {
  height: 220px; display: grid; place-items: center; margin-bottom: 26px;
  position: relative;
}
.figure__art::after {
  /* soft ground shadow */
  content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 52%; height: 16px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(150,135,110,.22), transparent 70%);
}
.figure__art img {
  max-height: 200px; width: auto; position: relative; z-index: 1;
  transition: transform .55s cubic-bezier(.34,1.4,.64,1);
}
.figure:hover .figure__art img { transform: translateY(-10px) scale(1.04); }
.figure__name {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 2.4vw, 2.1rem);
  line-height: 1; color: var(--ink); text-transform: uppercase; letter-spacing: .1em;
}
.figure__role {
  font-family: var(--serif); font-style: normal; font-size: 1.18rem;
  color: var(--orange-d); margin: 12px 0 24px; letter-spacing: .01em;
}
html[lang="en"] .figure__role { font-style: italic; }
.figure__meta { display: grid; gap: 4px; max-width: 30ch; margin: 0 auto;
  padding-top: 22px; border-top: 1px solid var(--line); }
.figure__meta dt { margin-top: 12px; }
.figure__meta dt:first-child { margin-top: 0; }
.figure__meta dd { font-size: .95rem; color: var(--ink-2); }

@media (min-width: 760px) { .chars__row { grid-template-columns: repeat(3, 1fr); } }

/* ============================ BRAND IDENTITY ============================ */
.identity { padding: clamp(80px, 12vw, 160px) var(--gut); background: var(--ivory); }
.identity__inner {
  max-width: 760px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); background: var(--cream);
  padding: clamp(44px, 7vw, 88px) clamp(28px, 5vw, 68px);
}
.identity__logo { width: clamp(220px, 42vw, 320px); margin: 22px auto 18px; }
.identity__since {
  font-family: var(--sans); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
}
.identity__statement {
  font-family: var(--serif-ko); font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.7;
  color: var(--ink); margin: clamp(26px, 4vw, 40px) auto; max-width: 30ch;
}
.identity__cast {
  display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(20px, 5vw, 56px);
  padding-top: clamp(24px, 4vw, 38px); border-top: 1px solid var(--line);
}
.identity__cast li { display: flex; flex-direction: column; gap: 4px; }
.identity__cast-name { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; color: var(--ink); }
.identity__cast-role { font-size: .82rem; color: var(--ink-3); }

/* ============================ HISTORY ============================ */
.history { padding: clamp(80px, 12vw, 160px) 0; }
.timeline { max-width: 760px; margin: 0 auto; padding: 0 var(--gut); }
.timeline__item {
  display: grid; grid-template-columns: 1fr; gap: 4px;
  padding: clamp(22px, 3vw, 30px) 0; border-top: 1px solid var(--line);
}
.timeline__item:last-child { border-bottom: 1px solid var(--line); }
.timeline__year {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: var(--ink); letter-spacing: .02em;
}
.timeline__body p { color: var(--ink); font-size: 1rem; }
.timeline__sub { color: var(--ink-2) !important; font-size: .92rem !important; }
.timeline__item--next .timeline__year { color: var(--green-d); }
@media (min-width: 680px) {
  .timeline__item { grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline; }
}

/* ============================ UNIVERSE ============================ */
.universe { padding: clamp(70px, 11vw, 150px) 0; border-top: 1px solid var(--line); }
.universe__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line);
}
.tile {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(34px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  transition: background .4s ease;
  min-height: 230px;
}
.tile:last-child { border-bottom: none; }
.tile__index { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; color: var(--orange); }
.tile__title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.1rem); color: var(--ink); margin: 14px 0 10px; }
.tile__desc { font-size: .98rem; color: var(--ink-2); flex: 1; max-width: 34ch; }
.tile__cta {
  margin-top: 22px; font-family: var(--sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); display: inline-flex; align-items: center; gap: 8px; transition: gap .3s ease, color .3s ease;
}
.tile:hover { background: var(--cream); }
.tile:hover .tile__cta { gap: 13px; color: var(--orange-d); }
@media (min-width: 760px) {
  .universe__grid { grid-template-columns: repeat(3, 1fr); }
  .tile { border-bottom: none; border-right: 1px solid var(--line); }
  .tile:last-child { border-right: none; }
}

/* ============================ CONTACT ============================ */
.contact { padding: clamp(80px, 12vw, 170px) var(--gut); background: var(--ivory); }
.contact__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.contact__title {
  font-family: var(--serif-ko); font-weight: 400; font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.12; color: var(--ink); margin: 14px 0 20px;
}
.contact__lead { font-size: clamp(1rem, 1.5vw, 1.1rem); color: var(--ink-2); max-width: 46ch; margin: 0 auto clamp(34px, 5vw, 52px); }
.contact__links {
  display: grid; gap: 0; text-align: left; margin: 0 auto clamp(34px, 5vw, 48px); max-width: 460px;
  border-top: 1px solid var(--line);
}
.contact__links li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 4px; border-bottom: 1px solid var(--line);
}
.contact__label { font-family: var(--sans); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.contact__links a { color: var(--ink); transition: color .25s ease; }
.contact__links a:hover { color: var(--orange-d); }

/* ============================ FOOTER ============================ */
.footer { padding: clamp(56px, 8vw, 92px) var(--gut) clamp(30px, 4vw, 44px); border-top: 1px solid var(--line); text-align: center; }
.footer__inner { max-width: 560px; margin: 0 auto; }
.footer__logo { width: clamp(170px, 40vw, 240px); margin: 0 auto 16px; opacity: .92; }
.footer__slogan { font-family: var(--serif-ko); font-size: 1.05rem; color: var(--ink); margin-bottom: 22px; }
.footer__social { display: flex; justify-content: center; align-items: center; gap: 14px; margin-bottom: 18px;
  font-family: var(--sans); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.footer__social a { color: var(--ink-2); transition: color .25s ease; }
.footer__social a:hover { color: var(--orange-d); }
.footer__copy { font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; color: var(--ink-3); }

/* ============================ reveal ============================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.chars__row .reveal.is-visible:nth-child(2) { transition-delay: .1s; }
.chars__row .reveal.is-visible:nth-child(3) { transition-delay: .2s; }
.universe__grid .reveal.is-visible:nth-child(2) { transition-delay: .1s; }
.universe__grid .reveal.is-visible:nth-child(3) { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
