/* ==========================================================================
   Charmie - coming soon
   Swap the hero photograph in one place: --hero-image below.
   Alternates live in assets/img/alternates/.
   ========================================================================== */

:root {
  --hero-image: url("../img/hero.jpg");

  --ink:        #06070c;
  --ink-soft:   #0d1018;
  --cream:      #f4f1ea;
  --cream-dim:  rgba(244, 241, 234, .62);
  --cream-faint:rgba(244, 241, 234, .38);
  --gold:       #e6c99d;
  --coral:      #ff6f5c;
  --aqua:       #52c6ea;

  --glass-bg:     rgba(255, 255, 255, .055);
  --glass-edge:   rgba(255, 255, 255, .16);
  --glass-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85);

  --shell-pad-x: clamp(1.4rem, 5vw, 4.5rem);
  --shell-pad-y: clamp(1.4rem, 4vh, 3.2rem);

  --ease: cubic-bezier(.22, 1, .36, 1);

  /* set by JS from pointer position */
  --px: 0;
  --py: 0;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--cream);
  font-family: "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --------------------------------------------------------------- stage --- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.stage__photo {
  position: absolute;
  inset: -6%;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: 58% 45%;
  filter: saturate(.82) contrast(1.06) brightness(.72);
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -14px), 0) scale(1.06);
  transition: transform .9s var(--ease);
  animation: drift 34s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  from { background-position: 55% 42%; }
  to   { background-position: 63% 52%; }
}

/* Layered scrim: keeps the photo readable behind type without flattening it. */
.stage__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(6, 7, 12, .18) 0%, rgba(6, 7, 12, .72) 58%, rgba(6, 7, 12, .95) 100%),
    linear-gradient(to bottom, rgba(6, 7, 12, .78) 0%, rgba(6, 7, 12, .34) 30%, rgba(6, 7, 12, .4) 62%, rgba(6, 7, 12, .9) 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .38;
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--px) * 34px), calc(var(--py) * 34px), 0);
  transition: transform 1.4s var(--ease);
  will-change: transform;
}

.orb--coral {
  width: 42vmax; height: 42vmax;
  top: -12vmax; right: -10vmax;
  background: radial-gradient(circle, var(--coral) 0%, transparent 68%);
  animation: float-a 22s ease-in-out infinite alternate;
}

.orb--aqua {
  width: 38vmax; height: 38vmax;
  bottom: -14vmax; left: -12vmax;
  background: radial-gradient(circle, var(--aqua) 0%, transparent 68%);
  animation: float-b 27s ease-in-out infinite alternate;
}

@keyframes float-a {
  from { translate: 0 0; }
  to   { translate: -5vmax 4vmax; }
}
@keyframes float-b {
  from { translate: 0 0; }
  to   { translate: 6vmax -5vmax; }
}

/* Fine film grain, animated so it never reads as a static texture. */
.stage__grain {
  position: absolute;
  inset: -120px;
  opacity: .5;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='.42'/></svg>");
  animation: grain 700ms steps(4) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-14px, 8px); }
  50%  { transform: translate(9px, -12px); }
  75%  { transform: translate(-7px, -6px); }
  100% { transform: translate(11px, 5px); }
}

/* --------------------------------------------------------------- frame --- */

.frame {
  position: fixed;
  inset: clamp(.7rem, 1.6vw, 1.4rem);
  z-index: 3;
  border: 1px solid rgba(244, 241, 234, .1);
  pointer-events: none;
}

.frame__tick {
  position: absolute;
  width: 9px; height: 9px;
  border: 0 solid var(--gold);
  opacity: .55;
}
.frame__tick--tl { top: -1px; left: -1px;  border-top-width: 1px; border-left-width: 1px; }
.frame__tick--tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; }
.frame__tick--bl { bottom: -1px; left: -1px;  border-bottom-width: 1px; border-left-width: 1px; }
.frame__tick--br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* --------------------------------------------------------------- shell --- */

.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.5rem, 4vh, 3rem);
  min-height: 100svh;
  padding: var(--shell-pad-y) var(--shell-pad-x);
}

/* -------------------------------------------------------------- topbar --- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.mark__glyph {
  width: 30px; height: 30px;
  color: var(--gold);
  transition: transform .6s var(--ease);
}
.mark:hover .mark__glyph { transform: rotate(-18deg); }

.mark__word {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.22rem;
  letter-spacing: .05em;
}

.topbar__meta {
  margin: 0;
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cream-faint);
}
.topbar__meta .dot { color: var(--gold); }

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vh, 3rem) 0;
}

/* ------------------------------------------------------------ the glass --- */

.glass {
  position: relative;
  width: min(680px, 100%);
  padding: clamp(2.2rem, 5vw, 3.6rem) clamp(1.6rem, 5vw, 3.6rem) clamp(2rem, 4.5vw, 3.2rem);
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .22);
  backdrop-filter: blur(26px) saturate(1.25);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
  overflow: hidden;
  text-align: center;
  transform: perspective(1200px)
             rotateX(calc(var(--py) * -2.2deg))
             rotateY(calc(var(--px) * 2.2deg));
  transition: transform 1s var(--ease);
  will-change: transform;
  animation: rise 1.1s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; }
}

/* Specular highlight that follows the pointer across the panel. */
.glass__sheen {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: radial-gradient(
    38% 38% at calc(50% + var(--px) * 38%) calc(50% + var(--py) * 38%),
    rgba(255, 255, 255, .13) 0%,
    transparent 70%
  );
  transition: background .35s linear;
}

/* Hairline light along the top edge, brighter in the middle. */
.glass::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, .55), transparent);
}

.glass__body { position: relative; }

/* -------------------------------------------------------------- content -- */

.eyebrow {
  margin: 0 0 clamp(1rem, 3vw, 1.6rem);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--gold);
}

.wordmark {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 7.4rem);
  line-height: .95;
  letter-spacing: -.015em;
  color: var(--cream);
}

/* The gradient lives on each letter, not the heading: an inline-block child is
   an atomic box, so a background-clip:text on the parent never reaches it.
   The ramp is near-vertical, so per-letter reads the same as per-word. */
.wordmark .ch {
  display: inline-block;
  background-image: linear-gradient(170deg, #ffffff 8%, var(--cream) 42%, var(--gold) 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(.42em) rotate(3deg);
  animation: letter .9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 70ms + 260ms);
}

@keyframes letter {
  to { opacity: 1; transform: none; }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark .ch { background-image: none; color: var(--cream); }
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: clamp(1.2rem, 3.4vw, 1.9rem) auto clamp(1rem, 2.6vw, 1.4rem);
  width: min(240px, 70%);
}
.rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(244, 241, 234, .3));
}
.rule span:last-child { background: linear-gradient(to left, transparent, rgba(244, 241, 234, .3)); }
.rule i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--cream);
}

.status__pulse {
  position: relative;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px rgba(255, 111, 92, .9);
}
.status__pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--coral);
  animation: ping 2.2s var(--ease) infinite;
}

@keyframes ping {
  0%   { transform: scale(1);   opacity: .85; }
  70%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

.lede {
  max-width: 46ch;
  margin: clamp(1.1rem, 3vw, 1.6rem) auto 0;
  font-size: clamp(.92rem, 1.5vw, 1.02rem);
  color: var(--cream-dim);
  text-wrap: balance;
}

/* ------------------------------------------------------------- actions --- */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .7rem;
  margin-top: clamp(1.6rem, 4vw, 2.3rem);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .78rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 234, .18);
  font-size: .84rem;
  font-weight: 400;
  letter-spacing: .01em;
  overflow: hidden;
  transition: border-color .35s var(--ease), background-color .35s var(--ease),
              color .35s var(--ease), transform .35s var(--ease);
}

.btn svg {
  width: 16px; height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  background: rgba(230, 201, 157, .12);
  border-color: rgba(230, 201, 157, .42);
  color: var(--gold);
}
.btn--primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--cream-dim);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(244, 241, 234, .4);
  color: var(--cream);
  transform: translateY(-2px);
}

/* Light sweep across the button on hover. */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg);
  opacity: 0;
}
.btn:hover::after { animation: sweep .85s var(--ease); }

@keyframes sweep {
  from { left: -60%; opacity: 1; }
  to   { left: 120%; opacity: 0; }
}

/* ------------------------------------------------------------- footbar --- */

.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.social {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.social a {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, .13);
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--cream-dim);
  transition: color .3s var(--ease), border-color .3s var(--ease),
              background-color .3s var(--ease), transform .3s var(--ease);
}

.social a svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social a:hover {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
}

/* Tooltip label on hover. */
.social a::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  translate: -50% 4px;
  padding: .28rem .55rem;
  border-radius: 6px;
  border: 1px solid rgba(244, 241, 234, .12);
  background: rgba(6, 7, 12, .88);
  color: var(--cream-dim);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), translate .25s var(--ease);
}
.social a:hover::after,
.social a:focus-visible::after { opacity: 1; translate: -50% 0; }

.footbar__legal {
  margin: 0;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 760px) {
  .stage__photo {
    background-image: image-set(url("../img/hero-mobile.jpg") 1x, var(--hero-image) 2x);
    background-image: var(--hero-image);
  }
  .frame { display: none; }
  .topbar { justify-content: center; }
  .topbar__meta { display: none; }
  .glass { border-radius: 20px; }
  .footbar { justify-content: center; flex-direction: column-reverse; gap: 1.3rem; }
  .social a { width: 40px; height: 40px; }
  .actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .social { gap: .3rem; }
  .social a { width: 37px; height: 37px; }
}

/* Browsers without backdrop-filter get a solid panel instead of a washed one. */
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .glass { background: rgba(11, 13, 20, .82); }
  .social a { background: rgba(11, 13, 20, .8); }
}

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