:root {
  color-scheme: light;
  --ink: #22302a;
  --muted: #657169;
  --paper: #fbf4e5;
  --sun: #f0b65f;
  --leaf: #748060;
  --leaf-dark: #48513b;
  --rose: #e98d76;
  --sky: #b8d8d0;
  --night: #18233a;
  --white: #fffaf1;
  --shadow: 0 26px 70px rgba(44, 50, 40, 0.24);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 232, 0.9), transparent 19rem),
    radial-gradient(circle at 12% 80%, rgba(184, 216, 208, 0.65), transparent 24rem),
    linear-gradient(135deg, #fff5df 0%, #f5c982 48%, #c4d8bc 100%);
}

button {
  font: inherit;
}

#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 42px;
}

.hero {
  min-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 48, 42, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.54);
  color: var(--leaf-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.8rem, 14vw, 11.8rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: 0;
  color: var(--ink);
  text-wrap: balance;
}

.intro {
  max-width: 560px;
  margin: 30px 0 0;
  color: #3d493f;
  font-size: clamp(1.06rem, 1.8vw, 1.38rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.quiet-action {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 19px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.primary-action {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 14px 28px rgba(34, 48, 42, 0.2);
}

.quiet-action {
  border: 1px solid rgba(34, 48, 42, 0.2);
  background: rgba(255, 250, 241, 0.58);
  color: var(--ink);
}

.primary-action:hover,
.quiet-action:hover {
  transform: translateY(-2px);
}

.primary-action:active,
.quiet-action:active {
  transform: translateY(0);
}

.portrait-wrap {
  position: relative;
  width: min(430px, 100%);
  justify-self: center;
  margin: 0;
  isolation: isolate;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 11% -9% -8%;
  z-index: -2;
  border-radius: 46% 54% 42% 58%;
  background: rgba(255, 250, 241, 0.5);
  filter: blur(2px);
  transform: rotate(-5deg);
}

.portrait-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1122 / 1402;
  object-fit: cover;
  border: 9px solid rgba(255, 250, 241, 0.82);
  border-radius: 42% 58% 47% 53% / 55% 44% 56% 45%;
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: rotate(1.5deg);
  transition:
    transform 220ms ease,
    filter 220ms ease;
}

.portrait-wrap img:hover {
  transform: rotate(0deg) scale(1.015);
  filter: saturate(1.06);
}

.portrait-wrap figcaption {
  width: fit-content;
  margin: 14px auto 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.56);
  color: var(--leaf-dark);
  font-size: 0.86rem;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.orbit-ring {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(34, 48, 42, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  inset: 7% -15% 8% -15%;
  animation: drift 9s ease-in-out infinite;
}

.orbit-two {
  inset: -2% -8% 16% -9%;
  transform: rotate(24deg);
  animation: drift 11s ease-in-out -2s infinite;
}

.message-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(34, 48, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.84);
  box-shadow: 0 18px 42px rgba(44, 50, 40, 0.16);
  color: var(--leaf-dark);
  font-size: 0.94rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  pointer-events: none;
  backdrop-filter: blur(16px);
}

.message-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.moon-mode {
  --ink: #f8f2dd;
  --muted: #c5c9bd;
  --paper: #18233a;
  --white: #fff8dd;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 245, 195, 0.95), transparent 7rem),
    radial-gradient(circle at 78% 70%, rgba(127, 165, 178, 0.34), transparent 24rem),
    linear-gradient(135deg, #111827 0%, #18233a 54%, #30435a 100%);
}

.moon-mode .intro {
  color: #e4e1d5;
}

.moon-mode .portrait-wrap img {
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.moon-mode .eyebrow,
.moon-mode .quiet-action,
.moon-mode .portrait-wrap figcaption,
.moon-mode .message-panel {
  background: rgba(18, 27, 45, 0.58);
  color: var(--white);
  border-color: rgba(255, 250, 241, 0.18);
}

.moon-mode .primary-action {
  background: var(--white);
  color: #18233a;
}

@keyframes drift {
  0%,
  100% {
    transform: rotate(-8deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(8deg) translate3d(8px, -10px, 0);
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 560px);
    padding-top: 22px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 20px;
  }

  .hero-copy {
    padding-top: 28px;
  }

  .intro {
    margin-top: 22px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .portrait-wrap {
    width: min(330px, 82vw);
  }

}

@media (max-width: 360px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 16px;
  }

  .hero-copy {
    padding-top: 18px;
  }

  h1 {
    font-size: clamp(4rem, 23vw, 4.8rem);
  }

  .intro {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 18px;
    flex-wrap: nowrap;
  }

  .primary-action,
  .quiet-action {
    flex: 1 1 0;
    min-height: 46px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .portrait-wrap {
    width: min(226px, 72vw);
  }
}

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