/* =========================================================
   CIS133DA Final Project - Virtual Wishing Fountain
   Global Styles, Layout, and Responsive Design
   ========================================================= */

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

/* Global Body Styles */
body {
  background: #050814;
  color: #f5f7ff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

/* Links */
a {
  color: #7dd3fc;
}

/* =========================================================
   Header and Navigation
   ========================================================= */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(5, 8, 20, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

nav a {
  color: #cbd5f5;
  margin-left: 1rem;
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
}

nav a.active,
nav a:hover {
  background: rgba(125, 211, 252, 0.2);
}

/* =========================================================
   Hero Section with Layered Fountain Effect
   ========================================================= */

.fountain-hero {
  position: relative;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

/* Background image layer */
.fountain-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/background.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.45; /* medium transparency */
  filter: blur(2px);
  z-index: 0;
}

/* Dark overlay for contrast */
.fountain-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.9));
  z-index: 1;
}

/* Content inside hero */
.fountain-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.fountain-text h1 {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.fountain-text p {
  max-width: 32rem;
  color: #e5e7f5;
}

/* Fountain image container */
.fountain-image-wrap {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 255, 0.5);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.fountain-image {
  width: 100%;
  display: block;
  opacity: 0.8; /* see-through effect */
}

/* =========================================================
   Generic Section Layout
   ========================================================= */

.section {
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.section h1,
.section h2 {
  margin-bottom: 1rem;
}

.section p {
  margin-bottom: 1rem;
}

/* Story Image */
.story-image {
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 1rem;
  display: block;
}

/* Figure Caption */
figcaption {
  font-size: 0.9rem;
  color: #9ca3c7;
}

/* =========================================================
   Form Styles (Guestbook / Wish Form)
   ========================================================= */

.wish-form {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.wish-form label {
  font-weight: 500;
}

textarea,
input {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 255, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: #f9fafb;
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.help-text {
  font-size: 0.8rem;
  color: #9ca3c7;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
}

/* Button */
.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  border: none;
  color: #050814;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

.btn:hover {
  filter: brightness(1.05);
}

/* Form Messages */
.form-message {
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.error {
  color: #fecaca;
}

.success {
  color: #bbf7d0;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #9ca3c7;
}

/* =========================================================
   Responsive Design
   ========================================================= */

@media (max-width: 800px) {
  .fountain-hero-inner {
    grid-template-columns: 1fr;
  }

  .fountain-text h1 {
    font-size: 2rem;
  }

  nav a {
    font-size: 0.9rem;
  }
}

@media (max-width: 500px) {
  .site-header {
    flex-direction: row;
    gap: 0.75rem;
  }

  nav a {
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
  }

  .section {
    padding: 2.5rem 1rem;
  }
}