/* ══════════════════════════════════════
   Serah Diaries — styles.css
   Cosmic immersive scroll landing page
   ══════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #0d1020;
  --text:     #f0e6c8;
  --text-dim: #8b89a0;
  --purple:   #9b6bb0;
  --teal:     #4a8b8c;
  --pink:     #c06090;
  --glow:     #fff5e0;
  --max-w:    720px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Layout Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Section Spacing ── */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--glow);
  text-shadow: 0 0 30px rgba(192, 96, 144, 0.3);
}

/* ══════════════════════════════════════
   1. HERO / HEADER
   ══════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}

/* ══════════════════════════════════════
   2. PROFILE
   ══════════════════════════════════════ */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -4rem;
  position: relative;
  z-index: 2;
  padding-bottom: 1rem;
}

.profile__photo-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--purple), var(--pink), var(--teal));
  box-shadow: 0 0 30px rgba(155, 107, 176, 0.4), 0 0 60px rgba(192, 96, 144, 0.2);
  margin-bottom: 1.25rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.profile__photo-wrap:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(155, 107, 176, 0.6), 0 0 80px rgba(192, 96, 144, 0.3);
}

.profile__photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  background: var(--bg);
}

.profile__name {
  font-size: 1.6rem;
  color: var(--glow);
  text-shadow: 0 0 20px rgba(255, 245, 224, 0.3);
  margin-bottom: 0.25rem;
}

/* ══════════════════════════════════════
   3. ABOUT
   ══════════════════════════════════════ */
.about {
  text-align: center;
  padding: 2rem 0 3rem;
}

.about__text {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.85;
  opacity: 0.9;
}

/* ══════════════════════════════════════
   4. PRIMARY CTA
   ══════════════════════════════════════ */
.cta-primary {
  text-align: center;
  padding: 1rem 0 3rem;
}

.cta-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 3.5rem;
  font-size: 1.6rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(255, 245, 224, 0.4), 0 0 40px rgba(192, 96, 144, 0.2);
  color: var(--glow);
  background: linear-gradient(135deg, rgba(155, 107, 176, 0.3), rgba(192, 96, 144, 0.3));
  border: 1px solid rgba(155, 107, 176, 0.5);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(155, 107, 176, 0.2), 0 0 60px rgba(192, 96, 144, 0.1);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.cta-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.cta-btn:hover {
  background: linear-gradient(135deg, rgba(155, 107, 176, 0.4), rgba(192, 96, 144, 0.4));
  box-shadow: 0 0 35px rgba(155, 107, 176, 0.3), 0 0 60px rgba(192, 96, 144, 0.15);
  transform: translateY(-2px);
  border-color: rgba(155, 107, 176, 0.6);
}

.cta-btn:active {
  transform: translateY(0);
}

/* ══════════════════════════════════════
   5. SOCIAL LINKS
   ══════════════════════════════════════ */
.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0 3rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(139, 137, 160, 0.25);
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--glow);
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(155, 107, 176, 0.25);
  transform: translateY(-2px);
}

.social-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ══════════════════════════════════════
   6. DIVIDER
   ══════════════════════════════════════ */
.divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  margin: 0 auto;
  opacity: 0.5;
}

/* ══════════════════════════════════════
   7. MY FAVORITE THINGS
   ══════════════════════════════════════ */
.favorites__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.favorites__category h3 {
  font-size: 1.3rem;
  color: var(--glow);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 15px rgba(192, 96, 144, 0.2);
}

.favorites__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.favorites__item {
  font-size: 0.92rem;
  color: var(--text-dim);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(139, 137, 160, 0.1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.favorites__item:last-child { border-bottom: none; }

.favorites__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.6;
}

.favorites__icon svg {
  width: 100%;
  height: 100%;
}

/* ══════════════════════════════════════
   8. PHOTO GALLERY
   ══════════════════════════════════════ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(155, 107, 176, 0.1), rgba(74, 139, 140, 0.1));
  border: 1px solid rgba(139, 137, 160, 0.1);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

/* Placeholder gallery items */
.gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139, 137, 160, 0.3);
  font-size: 2rem;
}

/* ══════════════════════════════════════
   9. DIARY ENTRIES
   ══════════════════════════════════════ */
.diary__entries {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.diary__entry {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(139, 137, 160, 0.1);
}

.diary__entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.diary__date {
  font-size: 0.78rem;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.diary__title {
  font-size: 1.4rem;
  color: var(--glow);
  margin-bottom: 0.75rem;
  text-shadow: 0 0 15px rgba(255, 245, 224, 0.15);
}

.diary__text {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ══════════════════════════════════════
   10. EMAIL SIGNUP
   ══════════════════════════════════════ */
.signup {
  text-align: center;
}

.signup__form {
  display: flex;
  gap: 0.75rem;
  max-width: 420px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.signup__input {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: rgba(139, 137, 160, 0.08);
  border: 1px solid rgba(139, 137, 160, 0.2);
  border-radius: 50px;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.signup__input::placeholder {
  color: rgba(139, 137, 160, 0.5);
}

.signup__input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 15px rgba(155, 107, 176, 0.15);
}

.signup__btn {
  padding: 0.85rem 1.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--bg);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup__btn:hover {
  box-shadow: 0 0 25px rgba(155, 107, 176, 0.3);
  transform: translateY(-1px);
}

.signup__success {
  display: none;
  color: var(--teal);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.signup__success.show {
  display: block;
}

/* ══════════════════════════════════════
   11. FOOTER
   ══════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 3rem 0 2rem;
}

.footer__cta {
  font-family: 'Dancing Script', cursive;
  font-size: 1.1rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.3s;
  display: inline-block;
  margin-bottom: 1.5rem;
  border: none;
  background: none;
}

.footer__cta:hover {
  color: var(--glow);
  text-shadow: 0 0 15px rgba(255, 245, 224, 0.2);
}

.footer__copy {
  font-size: 0.75rem;
  color: rgba(139, 137, 160, 0.4);
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

/* Tablet */
@media (min-width: 640px) {
  .container { max-width: 640px; }

  .favorites__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-title {
    font-size: 2.3rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container { max-width: var(--max-w); }

  .hero__img {
    max-height: 50vh;
  }

  .section-title {
    font-size: 2.5rem;
  }
}

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-in-1 { animation-delay: 0.1s; }
.fade-in-2 { animation-delay: 0.2s; }
.fade-in-3 { animation-delay: 0.3s; }
.fade-in-4 { animation-delay: 0.4s; }
