/* ============================================================
   Evelynn Leung — shared styles
   Fonts: Playfair Display (display), Gaegu (handwritten), Space Mono (labels/body)
   ============================================================ */
@import url("fonts.css?v=2");

:root {
  --lilac: #E6E1F9;
  --lilac-2: #DCD4F5;
  --lilac-3: #CFC4EF;
  --violet: #6D5BBA;
  --violet-ink: #4A3D8C;
  --violet-soft: #9F8FD6;
  --grid: rgba(147, 112, 219, .15);
  --cream: #FFFDF0;
  --flower-center: #F2E8CF;
  --stem: #9DB4A9;
  --stem-dark: #84998E;
  --peach: #FFE8D6;
  --mint: #D7F1E1;
  --sky: #E0F2FE;
  --butter: #FFF4C2;
  --rose: #F9D9E3;
  --paper: #FBF9F4;
  --bone: #F6F3EA;
  --ink: #2B2740;
  --ink-soft: #6B6485;
  --brass: #C9A86A;
  --white: #FFFFFF;
  --shadow-violet: rgba(109, 91, 186, .25);
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-hand: 'Gaegu', 'Comic Sans MS', cursive;
  --font-mono: 'Space Mono', ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lilac);
  color: var(--violet-ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
}
::selection { background: #CDBFF5; color: var(--violet-ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
em { font-style: italic; }

.font-display { font-family: var(--font-display); }
.font-hand { font-family: var(--font-hand); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- backdrop grid (from the reference) ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(circle at center, #000 55%, transparent 100%);
  mask-image: radial-gradient(circle at center, #000 55%, transparent 100%);
}
.bg-grid.is-static { position: absolute; }

/* ---------- pixel flowers ---------- */
.flowers { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.flowers.is-static { position: absolute; }
.pf {
  position: absolute;
  will-change: transform;
  filter: drop-shadow(0 4px 6px rgba(109, 91, 186, .15));
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
}
.pf svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; image-rendering: pixelated; }
.pf__float { animation: pf-float var(--dur, 6s) ease-in-out var(--delay, 0s) infinite; }
@keyframes pf-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--amp, -16px)); }
}

/* ---------- top navigation ---------- */
.nav {
  position: relative; z-index: 50;
  height: var(--nav-h);
  padding: 0 clamp(20px, 4vw, 48px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font-weight: 700; letter-spacing: .1em; font-size: 14px;
}
.nav.is-fixed { position: fixed; top: 0; left: 0; right: 0; }
.nav__brand {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: 22px; letter-spacing: 0; color: var(--violet);
  justify-self: start;
}
.nav__links { display: flex; gap: clamp(18px, 3vw, 44px); justify-self: center; }
.nav__links a, .nav__brand { position: relative; padding: 4px 0; white-space: nowrap; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--white); transition: width .35s var(--ease-out);
}
.nav__links a { color: var(--violet-ink); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--white); transition: color .3s; }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { width: 100%; }
.nav__right { justify-self: end; display: flex; gap: 16px; opacity: .7; }
.nav__menu { display: none; justify-self: end; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.nav__menu span { display: inline-block; width: 22px; height: 2px; background: currentColor; margin-left: 10px; vertical-align: middle; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--lilac);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu a { font-family: var(--font-display); font-style: italic; font-size: clamp(34px, 9vw, 56px); color: var(--violet); line-height: 1.3; }
.menu__close { position: absolute; top: 28px; right: 24px; font-weight: 700; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }

@media (max-width: 820px) {
  :root { --nav-h: 68px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__links, .nav__right { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
}

/* ---------- custom cursor ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none;
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1.5px solid var(--violet); border-radius: 50%;
  background: rgba(230, 225, 249, .35);
  display: grid; place-items: center;
  transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0) scale(var(--cs, 1));
  transition: width .25s var(--ease-out), height .25s var(--ease-out), margin .25s var(--ease-out), background .25s, border-color .25s, opacity .3s;
  will-change: transform;
}
.cursor::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--violet); transition: opacity .2s, transform .2s; }
.cursor__glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--cream);
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease-out);
}
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: var(--violet); border-color: var(--violet); }
.cursor.is-hover::before { opacity: 0; transform: scale(0); }
.cursor.is-hover .cursor__glyph { opacity: 1; transform: scale(1); }
.cursor.is-down { --cs: .85; }
.cursor.is-hidden { opacity: 0; }
.cursor.is-light { border-color: var(--cream); }
.cursor.is-light::before { background: var(--cream); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

/* ---------- page veil (transitions) ---------- */
.veil { position: fixed; inset: 0; z-index: 500; background: var(--lilac); pointer-events: none; opacity: 0; transition: opacity .45s var(--ease-soft); }
.veil.is-on { opacity: 1; pointer-events: auto; }
body.is-entering .veil { opacity: 1; }

/* ---------- shared bits ---------- */
.label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--violet);
}
.hand { font-family: var(--font-hand); font-weight: 700; color: var(--violet); }
.page-head { position: relative; z-index: 2; padding: calc(var(--nav-h) + 2vh) clamp(20px, 5vw, 72px) 0; }
.page-head__title {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: clamp(44px, 8vw, 104px); line-height: .95; letter-spacing: -.02em; color: var(--violet);
  filter: drop-shadow(0 10px 20px rgba(109, 91, 186, .18));
}
.page-head__line { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.page-head__hand { font-family: var(--font-hand); font-weight: 700; font-size: clamp(20px, 2.4vw, 28px); color: var(--violet-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 100px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--violet); color: var(--cream);
  transition: transform .35s var(--ease-out), box-shadow .35s, background .3s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(109, 91, 186, .28); }
.btn--ghost { background: transparent; color: var(--violet); box-shadow: inset 0 0 0 1.5px var(--violet); }
.btn--ghost:hover { background: var(--violet); color: var(--cream); }
.btn__circ { width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 12px; }

.site-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 40px clamp(20px, 4vw, 48px) 28px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .6;
}
.site-foot a { text-decoration: underline; text-decoration-color: rgba(109, 91, 186, .5); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--white); }
.site-foot__mail { letter-spacing: .08em; text-transform: none; }

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