/* ================================================================
   sunayna.com — retro-celestial personal site
   palette drawn from the "Personal Brand" deck:
   deep chocolate brown, cream, coral, peach
   ================================================================ */

:root {
  --brown-900: #3a2e1f;
  --brown-800: #463926;
  --brown-700: #54452e;
  --brown-600: #64533a;
  --cream: #f4e4cf;
  --cream-dim: #e0cdb2;
  --peach: #f3c39e;
  --coral: #e2836a;
  --coral-deep: #c96a55;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, serif;

  --max: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--brown-800);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-x: hidden;
}

/* subtle page-wide grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

::selection { background: var(--coral); color: var(--brown-900); }

a { color: inherit; }

/* ============ nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(58, 46, 31, 0.92), rgba(58, 46, 31, 0));
}

.nav-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
  align-items: center;
  font-size: 1rem;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.nav-cta {
  border: 1px solid var(--cream-dim);
  border-radius: 999px;
  padding: 0.25rem 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--cream); color: var(--brown-900); }

/* ============ hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 0;
  overflow: hidden;
}

.hero-eyebrow {
  font-size: 1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--peach);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.hero-pill {
  margin-top: 2.2rem;
  background: rgba(58, 46, 31, 0.82);
  border: 1px solid rgba(244, 228, 207, 0.25);
  border-radius: 999px;
  padding: 0.65rem 1.6rem;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cream-dim);
  position: relative;
  z-index: 3;
}

.hero-sun {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: min(1100px, 130vw);
  z-index: 1;
  pointer-events: none;
}
.hero-sun svg { display: block; width: 100%; }

.sun-rays { animation: raysPulse 7s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes raysPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.hero-scroll {
  position: absolute;
  bottom: 1.6rem;
  z-index: 3;
  text-decoration: none;
  font-size: 1.4rem;
  color: var(--brown-900);
  background: var(--cream);
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============ about ============ */
.about {
  background: var(--brown-900);
  padding: clamp(4.5rem, 9vw, 8rem) 1.5rem;
}

.about-inner { max-width: 46rem; margin: 0 auto; text-align: center; }

.about-lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.45;
}
.about-lede em { color: var(--peach); }

.about-note {
  margin-top: 2rem;
  color: var(--cream-dim);
  font-style: italic;
}
.about-note a { color: var(--coral); text-decoration-color: rgba(226, 131, 106, 0.5); }

/* ============ chapters ============ */
.chapter {
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 3rem);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}

.chapter-head { position: relative; margin-bottom: 3rem; }

.chapter-num {
  font-family: var(--font-display);
  color: var(--coral);
  letter-spacing: 0.3em;
  font-size: 1rem;
}

.chapter-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: 0.14em;
  line-height: 1.05;
}

.chapter-quote {
  margin-top: 1.2rem;
  max-width: 34rem;
  color: var(--cream-dim);
  font-size: 1.15rem;
}
.chapter-quote em { color: var(--peach); }

.chapter-art {
  position: absolute;
  right: 0; top: -1rem;
  width: clamp(140px, 22vw, 240px);
  opacity: 0.95;
  pointer-events: none;
}
.chapter-art svg { width: 100%; display: block; }

/* ============ cards ============ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.2rem);
}
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  margin: 1.1rem 0 0.4rem;
}

.card p { color: var(--cream-dim); font-size: 1.05rem; }
.card p em { color: var(--peach); }

/* photo placeholders — swap these for real photos */
.ph {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  border: 1px dashed rgba(244, 228, 207, 0.35);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.ph figcaption {
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(244, 228, 207, 0.55);
  background: rgba(58, 46, 31, 0.55);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
}
.ph-a::before { background: radial-gradient(circle at 25% 20%, var(--coral-deep), var(--brown-700) 70%); }
.ph-b::before { background: radial-gradient(circle at 75% 30%, var(--brown-600), var(--brown-700) 75%); }
.ph-c::before { background: radial-gradient(circle at 50% 80%, var(--coral), var(--brown-700) 72%); opacity: 0.8; }
.ph-d::before { background: radial-gradient(circle at 30% 70%, var(--peach), var(--brown-700) 75%); opacity: 0.75; }
.ph-e::before { background: radial-gradient(circle at 70% 25%, var(--coral-deep), var(--brown-700) 70%); }
.ph-f::before { background: radial-gradient(circle at 20% 30%, var(--brown-600), var(--brown-700) 80%); }
.ph-g::before { background: radial-gradient(circle at 80% 75%, var(--coral), var(--brown-700) 70%); opacity: 0.8; }

/* real photos, when added: <figure class="ph"><img src="..." alt="..."></figure> */
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ph:has(img) { border-style: solid; }
.ph:has(img) figcaption { display: none; }

/* ============ footer ============ */
.footer {
  position: relative;
  margin-top: 4rem;
  padding: clamp(6rem, 12vw, 9rem) 1.5rem 3rem;
  text-align: center;
  background: var(--brown-900);
  overflow: hidden;
}

.footer-sun {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(900px, 120vw);
  pointer-events: none;
  opacity: 0.9;
}
.footer-sun svg { width: 100%; display: block; }

.footer-title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: 0.06em;
}

.footer-line {
  position: relative;
  margin-top: 0.8rem;
  font-style: italic;
  color: var(--cream-dim);
}

.footer-links {
  position: relative;
  margin-top: 2rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  border: 1px solid rgba(244, 228, 207, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1.4rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.footer-links a:hover { background: var(--cream); color: var(--brown-900); }

.footer-fine {
  position: relative;
  margin-top: 3.5rem;
  font-size: 0.9rem;
  color: rgba(244, 228, 207, 0.5);
}

/* ============ reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sun-rays, .hero-scroll { animation: none; }
}

/* ============ responsive ============ */
@media (max-width: 820px) {
  .cards, .cards-2 { grid-template-columns: 1fr; }
  .chapter-art { display: none; }
  .nav-links { font-size: 0.95rem; }
}
