@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("assets/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf7f7;
  --ink: #324b42;
  --muted: #50655b;
  --rose: #a86c7f;
  --frame-inset: clamp(0.75rem, 2.5vw, 2.35rem);
  --font-display: "Cormorant Garamond", Garamond, Georgia, serif;
}

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

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  position: relative;
  min-width: 18rem;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 16% 48%, #fffefe 0%, #fffdfcb5 28%, transparent 62%),
    radial-gradient(ellipse at 88% 43%, #f1dce355 0%, #f7e9ed3d 34%, transparent 67%),
    radial-gradient(ellipse at 3% 100%, #eed4dd80 0%, #f7e8ed48 26%, transparent 53%),
    linear-gradient(115deg, #faf6f7 0%, #fffdfc 53%, #f8eff1 100%);
  font-family: "Manrope", system-ui, sans-serif;
  isolation: isolate;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 77% 15%, #ffffff9c 0 2%, transparent 17%);
  content: "";
}

.frame,
#butterflies {
  position: fixed;
  pointer-events: none;
}

.frame {
  z-index: 1;
  inset: var(--frame-inset);
  border: 1px solid #ab7a8638;
}

#butterflies {
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.48;
  filter: saturate(0.82);
}

.hero {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(21rem, 0.88fr) minmax(28rem, 1.12fr);
  align-items: center;
  gap: clamp(0.5rem, 3vw, 3.5rem);
  width: min(100%, 82rem);
  min-height: 100vh;
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(3.8rem, 7svh, 6rem) max(clamp(2.4rem, 5vw, 5.2rem), calc(var(--frame-inset) + 1rem));
}

.identity {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(100%, 33rem);
  text-align: center;
}

.mark-stage {
  position: relative;
  width: clamp(6.7rem, min(19svh, 10vw), 8.6rem);
  margin: 0 auto clamp(0.8rem, 2.2svh, 1.25rem);
}

.brand-mark,
.brand-mark img {
  width: 100%;
}

.brand-mark {
  position: relative;
}

.brand-mark img {
  display: block;
  height: auto;
}

.brand-light {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mask: url("assets/identity-mark.png") center / 100% 100% no-repeat;
  -webkit-mask: url("assets/identity-mark.png") center / 100% 100% no-repeat;
  mix-blend-mode: screen;
}

.brand-light::before {
  position: absolute;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffebf2 22%, #ffc7d9a3 40%, transparent 72%);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: line-shine 8.5s 0.8s linear infinite;
  content: "";
}

@keyframes line-shine {
  0%, 8% { left: 78%; top: 66%; opacity: 0; }
  13% { left: 72%; top: 47%; opacity: 0.9; }
  18% { left: 62%; top: 30%; }
  24% { left: 48%; top: 17%; }
  30% { left: 31%; top: 6%; }
  35% { left: 20%; top: 7%; }
  40% { left: 18%; top: 25%; }
  46% { left: 21%; top: 39%; }
  51% { left: 9%; top: 51%; }
  56% { left: 5%; top: 62%; }
  61% { left: 16%; top: 74%; }
  67% { left: 35%; top: 76%; }
  74% { left: 61%; top: 70%; }
  79% { left: 76%; top: 67%; }
  85% { left: 91%; top: 51%; }
  91% { left: 92%; top: 41%; opacity: 0.82; }
  97%, 100% { left: 80%; top: 49%; opacity: 0; }
}

h1 {
  margin: 0;
}

h1 img {
  display: block;
  width: min(100%, 25.5rem);
  height: auto;
  margin-inline: auto;
}

.specialty {
  margin: clamp(0.65rem, 1.8svh, 1rem) 0 0;
  color: var(--muted);
  font-size: clamp(0.86rem, 1.2vw, 1rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.035em;
}

.status-stage {
  margin-top: clamp(1.45rem, 4svh, 2.5rem);
}

.ornament {
  width: clamp(3.8rem, 8vw, 5.8rem);
  height: 1px;
  margin: 0 auto clamp(0.7rem, 1.8svh, 1.05rem);
  background: linear-gradient(90deg, transparent, #985c71b5, transparent);
}

.status {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(4.8rem, min(8.5vw, 12svh), 7.1rem) / 0.84 var(--font-display);
  letter-spacing: -0.045em;
}

.status span {
  display: inline-block;
  padding: 0.06em 0.1em 0.12em;
}

.portrait {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: stretch;
  width: 100%;
  height: clamp(35rem, 80svh, 54rem);
  margin: 0;
  isolation: isolate;
}

.portrait::before {
  position: absolute;
  z-index: -1;
  inset: 8% -6% 3%;
  background: radial-gradient(ellipse 50% 47% at 50% 48%, #fffdfdcc 0 12%, #f7e5eb99 42%, #eacbd557 65%, transparent 100%);
  content: "";
}

.portrait img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 1.6rem 2.2rem #7044521a);
  mask-image: linear-gradient(to bottom, #000 0 77%, #000e 83%, #0009 91%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0 77%, #000e 83%, #0009 91%, transparent 100%);
}

.motion-toggle {
  position: fixed;
  z-index: 5;
  right: calc(var(--frame-inset) + 0.65rem + env(safe-area-inset-right));
  bottom: calc(var(--frame-inset) + 0.65rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid #a86c7f5c;
  border-radius: 50%;
  background: #fffdfcdb;
  color: var(--ink);
  box-shadow: 0 0.45rem 1.4rem #76505d14;
  cursor: pointer;
}

.motion-toggle[hidden] {
  display: none;
}

.motion-toggle:hover {
  background: #fff;
}

.motion-toggle:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

.motion-icon {
  width: 0.58rem;
  height: 0.75rem;
  border-inline: 2px solid currentColor;
}

.motion-toggle[data-paused] .motion-icon {
  width: 0;
  height: 0;
  margin-inline-start: 0.12rem;
  border: solid transparent;
  border-width: 0.38rem 0 0.38rem 0.6rem;
  border-left-color: currentColor;
}

html[data-motion="paused"] .brand-light::before {
  animation-play-state: paused;
}

@media (max-width: 62rem) {
  .hero {
    grid-template-columns: minmax(18rem, 0.82fr) minmax(24rem, 1.18fr);
    gap: 0;
    padding-inline: max(clamp(2rem, 4vw, 3.25rem), calc(var(--frame-inset) + 0.85rem));
  }

  .portrait {
    height: clamp(32rem, 76svh, 47rem);
  }
}

@media (max-width: 50rem) {
  body::before {
    background: radial-gradient(circle at 80% 24%, #ffffff8c 0 2%, transparent 20%);
  }

  #butterflies {
    opacity: 0.4;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(18rem, 1fr);
    align-content: start;
    gap: clamp(0.15rem, 1.2svh, 0.75rem);
    width: 100%;
    padding: max(3.2rem, calc(var(--frame-inset) + 1.4rem)) max(1.65rem, calc(var(--frame-inset) + 0.9rem)) max(2rem, calc(var(--frame-inset) + 0.7rem));
  }

  .identity {
    justify-self: center;
    width: min(100%, 32rem);
  }

  .mark-stage {
    width: clamp(4.8rem, 12.5svh, 6.7rem);
    margin-bottom: clamp(0.45rem, 1.25svh, 0.8rem);
  }

  h1 img {
    width: min(100%, 20rem);
  }

  .specialty {
    margin-top: clamp(0.4rem, 1.1svh, 0.7rem);
    font-size: clamp(0.77rem, 3.3vw, 0.92rem);
    line-height: 1.5;
  }

  .status-stage {
    margin-top: clamp(0.8rem, 2.2svh, 1.4rem);
  }

  .ornament {
    margin-bottom: clamp(0.38rem, 1svh, 0.65rem);
  }

  .status {
    font-size: clamp(4rem, min(19vw, 9svh), 5.5rem);
  }

  .portrait {
    align-self: end;
    justify-self: center;
    width: min(100%, 31rem);
    height: clamp(18rem, 42svh, 30rem);
  }

  .portrait::before {
    inset: 4% -4% 1%;
  }

}

@media (max-width: 50rem) and (max-height: 45rem) {
  .hero {
    grid-template-rows: auto minmax(13.5rem, 1fr);
    gap: 0;
    padding-top: max(2.2rem, calc(var(--frame-inset) + 0.75rem));
    padding-bottom: max(1.4rem, calc(var(--frame-inset) + 0.45rem));
  }

  .mark-stage {
    width: 4rem;
    margin-bottom: 0.3rem;
  }

  h1 img {
    width: min(100%, 15.5rem);
  }

  .specialty {
    margin-top: 0.28rem;
    font-size: 0.75rem;
    line-height: 1.42;
  }

  .status-stage {
    margin-top: 0.55rem;
  }

  .ornament {
    width: 3.4rem;
    margin-bottom: 0.25rem;
  }

  .status {
    font-size: 3.45rem;
  }

  .portrait {
    min-height: 13.5rem;
    height: min(38svh, 16rem);
  }
}

@media (min-width: 50.0625rem) and (max-height: 39rem) {
  .hero {
    padding-block: max(2rem, calc(var(--frame-inset) + 0.75rem));
  }

  .mark-stage {
    width: 4.8rem;
    margin-bottom: 0.45rem;
  }

  h1 img {
    width: min(100%, 19rem);
  }

  .specialty {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .status-stage {
    margin-top: 0.8rem;
  }

  .ornament {
    margin-bottom: 0.35rem;
  }

  .status {
    font-size: 4.25rem;
  }

  .portrait {
    height: min(88svh, 32rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="playing"]) .brand-light::before {
    animation-play-state: paused;
  }
}
