/* ========================================
   slave to the poultry — coming soon
   ======================================== */

:root {
  --bone:   #F5F0EB;
  --ash:    #E8E2DA;
  --clay:   #C4A882;
  --sage:   #A8B5A0;
  --dusk:   #8B7E74;
  --marrow: #3D3530;
  --blood:  #9C6B5A;
  --smoke:  #6B6560;

  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans:  'Inter', -apple-system, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bone);
  color: var(--marrow);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

::selection {
  background: var(--clay);
  color: var(--bone);
}

/* ---- HEADER ---- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.5rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top));
  background: var(--bone);
  border-bottom: 1px solid var(--ash);
  animation: fadeDown 1.2s ease both;
}

.header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.header__celestial {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__date {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--dusk);
  opacity: 0.6;
  text-transform: lowercase;
}

.header__divider {
  color: var(--clay);
  font-size: 0.6rem;
  opacity: 0.6;
}

/* CSS-rendered moon phase glyph */
.moon-phase {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: default;
  transition: opacity 0.6s ease;
  overflow: hidden;
  flex-shrink: 0;
}

/* New moon — fully dark */
.moon--new {
  background: var(--dusk);
}

/* Full moon — fully lit */
.moon--full {
  background: var(--clay);
  box-shadow: 0 0 6px rgba(196, 168, 130, 0.3);
}

/* First quarter — right half lit */
.moon--first-quarter {
  background: var(--clay);
}
.moon--first-quarter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--dusk);
  border-radius: 7px 0 0 7px;
}

/* Last quarter — left half lit */
.moon--last-quarter {
  background: var(--clay);
}
.moon--last-quarter::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: var(--dusk);
  border-radius: 0 7px 7px 0;
}

/* Waxing crescent — sliver on right */
.moon--wax-crescent {
  background: var(--dusk);
}
.moon--wax-crescent::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -5px 0 0 var(--clay);
}

/* Waxing gibbous — mostly lit, shadow on left */
.moon--wax-gibbous {
  background: var(--clay);
}
.moon--wax-gibbous::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 5px 0 0 var(--dusk);
}

/* Waning gibbous — mostly lit, shadow on right */
.moon--wan-gibbous {
  background: var(--clay);
}
.moon--wan-gibbous::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset -5px 0 0 var(--dusk);
}

/* Waning crescent — sliver on left */
.moon--wan-crescent {
  background: var(--dusk);
}
.moon--wan-crescent::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 5px 0 0 var(--clay);
}

.zodiac-symbol {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--dusk);
  letter-spacing: 0.05em;
  cursor: default;
}

/* ---- HERO ---- */

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 3rem 2rem;
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

.hero__content {
  text-align: center;
  max-width: 480px;
  animation: fadeUp 1.6s ease both;
  animation-delay: 0.3s;
}

.hero__whisper {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--dusk);
  margin-bottom: 1.2rem;
  opacity: 0.7;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--marrow);
  text-transform: lowercase;
}

.hero__line {
  width: 36px;
  height: 1px;
  background: var(--clay);
  margin: 1.25rem auto;
  opacity: 0.5;
  animation: expandLine 2s ease both;
  animation-delay: 1s;
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 300;
  font-style: italic;
  color: var(--smoke);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.hero__status {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 2rem;
}

/* ---- SIGNUP ---- */

.signup {
  display: flex;
  gap: 0;
  max-width: 320px;
  margin: 0 auto;
  border: 1px solid var(--ash);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.5s ease;
}

.signup:focus-within {
  border-color: var(--clay);
}

.signup__input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--marrow);
  background: transparent;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.signup__input::placeholder {
  color: var(--dusk);
  opacity: 0.5;
}

.signup__button {
  padding: 0.7rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--bone);
  background: var(--dusk);
  border: none;
  cursor: pointer;
  transition: background 0.5s ease, color 0.5s ease;
  white-space: nowrap;
}

.signup__button:hover {
  background: var(--marrow);
}

.signup__button:active {
  background: var(--smoke);
}

/* ---- FOOTER ---- */

.footer {
  position: sticky;
  bottom: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ash);
  background: var(--bone);
  animation: fadeUp 1.6s ease both;
  animation-delay: 0.8s;
}

.footer__inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.horoscope {
  margin-bottom: 1rem;
}

.horoscope__sign {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  color: var(--clay);
  margin-bottom: 0.5rem;
}

.horoscope__reading {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.65;
  color: var(--smoke);
  max-width: 400px;
  margin: 0 auto;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--dusk);
  opacity: 0.5;
}

.footer__divider {
  font-size: 0.4rem;
}

/* ---- ANIMATIONS ---- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes expandLine {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 36px;
    opacity: 0.5;
  }
}

/* ---- RESPONSIVE ---- */

@media (max-width: 480px) {
  .header {
    padding: 0.6rem 1rem;
    padding-top: calc(0.6rem + env(safe-area-inset-top));
  }

  .hero {
    padding: 2rem 1.5rem;
  }

  .hero__title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .signup {
    flex-direction: column;
    max-width: 100%;
  }

  .signup__button {
    padding: 0.75rem;
  }

  .horoscope__reading {
    font-size: 0.8rem;
    padding: 0 0.25rem;
  }

  .footer {
    padding: 1.25rem 1.25rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  .footer__bottom {
    flex-wrap: wrap;
    gap: 0.3rem 0.6rem;
  }
}

@media (max-width: 360px) {
  .hero__whisper {
    font-size: 0.5rem;
    letter-spacing: 0.18em;
  }

  .hero__subtitle {
    font-size: 0.85rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
