:root {
  --bg: #faf5f1;
  --bg-soft: #f3e7e1;
  --text: #3a2e2c;
  --text-soft: #6b5a56;
  --accent: #9c4a52;
  --border: #e3d0c8;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 78vh;
  min-height: 78dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 40rem; }

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

h1 {
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin: 0 0 1rem;
  letter-spacing: 0.01em;
}

.hero-sub {
  font-style: italic;
  color: var(--text-soft);
  font-size: 1.15rem;
  margin: 0;
}

.hero-heart {
  margin: 2rem 0 0;
  color: var(--accent);
  font-size: 1.3rem;
  opacity: 0.6;
  animation: heartbeat 2.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ---------- Letter ---------- */

.letter {
  padding: 5rem 1.5rem;
}

.letter-inner {
  max-width: 38rem;
  margin: 0 auto;
}

.letter h2,
.gallery h2,
.journal h2 {
  font-weight: 500;
  font-size: 1.9rem;
  text-align: center;
  margin: 0 0 2.5rem;
  position: relative;
}

.letter h2::after,
.gallery h2::after,
.journal h2::after {
  content: "♥";
  display: block;
  color: var(--accent);
  font-size: 0.85rem;
  opacity: 0.7;
  margin: 0.9rem auto 0;
}

.letter p {
  margin: 0 0 1.4rem;
}

.signature {
  text-align: right;
  font-style: italic;
  color: var(--text-soft);
  margin-top: 2rem;
}

/* ---------- Gallery ---------- */

.gallery {
  padding: 2rem 1.5rem 6rem;
  max-width: 60rem;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.photo-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  border: 1px dashed var(--border);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-style: italic;
  letter-spacing: 0.05em;
}

.photo {
  display: block;
  border-radius: 4px;
  overflow: hidden;
}

.photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.25s ease;
}

.photo:hover img {
  opacity: 0.9;
}

/* ---------- Explore cards ---------- */

.explore {
  padding: 1rem 1.5rem 6rem;
}

.explore-grid {
  max-width: 40rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.explore-card {
  display: block;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  background: var(--bg-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.explore-card:hover,
.explore-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -12px rgba(58, 46, 44, 0.25);
}

.explore-icon {
  display: block;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.explore-card h3 {
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.explore-card p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---------- Page nav (subpages) ---------- */

.page-nav {
  padding: 1.5rem 1.5rem 0;
  max-width: 60rem;
  margin: 0 auto;
}

.page-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-style: italic;
  font-size: 0.95rem;
}

.page-nav a:hover {
  color: var(--accent);
}

/* ---------- Journal ---------- */

.journal {
  padding: 2rem 1.5rem 6rem;
  max-width: 38rem;
  margin: 0 auto;
}

.journal-entry {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.journal-entry:first-of-type {
  border-top: none;
}

.journal-date {
  margin: 0 0 0.3rem;
  color: var(--accent);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.journal-entry h3 {
  margin: 0 0 0.6rem;
  font-weight: 500;
  font-size: 1.3rem;
}

.journal-entry p {
  margin: 0;
}

.journal-empty {
  color: var(--text-soft);
  font-style: italic;
  padding: 1rem 0;
}

.entry-form {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.entry-form h3 {
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.entry-form input,
.entry-form textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.9rem;
  resize: vertical;
}

.entry-form input:focus,
.entry-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.entry-form button {
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: 0.55rem 1.8rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.entry-form button:hover {
  background: var(--accent);
  color: var(--bg);
}

.entry-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- Password gate ---------- */

.password-gate[hidden] {
  display: none;
}

.password-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.password-form {
  width: 100%;
  max-width: 22rem;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem 2rem;
}

.password-icon {
  color: var(--accent);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.password-form h2 {
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.password-form > p {
  color: var(--text-soft);
  margin: 0 0 1.5rem;
}

.password-form input {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0.6rem 0.2rem;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: center;
  outline: none;
}

.password-form input:focus {
  border-bottom-color: var(--accent);
}

.password-error {
  color: var(--accent);
  font-size: 0.9rem;
  margin: 0.9rem 0 0;
}

.password-form button {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  padding: 0.6rem 2rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.password-form button:hover {
  background: var(--accent);
  color: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-heart {
    animation: none;
  }
}
