/* ============================================
   Tuovin hautajaissivusto — Finnish Funeral Site
   Warm, dignified, respectful design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500&display=swap');

:root {
  --cream: #faf7f2;
  --cream-warm: #f5efe6;
  --surface: #fffefb;
  --text: #3d3226;
  --text-muted: #6b5e4f;
  --text-dim: #9b8d7e;
  --accent: #5a7d5a;
  --accent-light: #e8f0e6;
  --accent-dark: #3d5a3d;
  --gold: #b8976e;
  --gold-light: #f0e6d8;
  --rose: #d4a9a0;
  --rose-light: #f5eae7;
  --shadow-sm: 0 2px 8px rgba(61, 50, 38, 0.06);
  --shadow-md: 0 4px 20px rgba(61, 50, 38, 0.10);
  --shadow-lg: 0 8px 40px rgba(61, 50, 38, 0.14);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1080px;
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle background texture - gentle linen feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

/* ============================================
   Navigation
   ============================================ */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(154, 141, 126, 0.15);
  padding: 0.75rem 1.5rem;
}

nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.4s ease, border-color 0.4s ease;
  letter-spacing: 0.02em;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ============================================
   Layout
   ============================================ */

.page {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 0.75rem auto 0;
}

p { margin-bottom: 1rem; color: var(--text-muted); }

.lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

/* ============================================
   Hero / Invitation Card
   ============================================ */

.hero {
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
}

.hero-cross {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 2.5rem;
  color: var(--gold);
  opacity: 0.7;
  line-height: 1;
  font-family: serif;
}

.hero-flower {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: var(--rose);
  opacity: 0.7;
}

.hero-photo-frame {
  display: inline-block;
  position: relative;
  margin: 1.5rem auto 2.5rem;
}

.hero-photo-frame img {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--surface);
  outline: 1px solid rgba(184, 151, 110, 0.25);
  outline-offset: 6px;
}

.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 0.75rem;
  font-style: italic;
}

.hero h1 {
  margin-bottom: 0.35rem;
}

.hero .dates {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.hero .star {
  display: inline-block;
  margin: 0 0.3rem;
  color: var(--gold);
  font-size: 0.6rem;
  vertical-align: middle;
}

.invitation-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  margin: 3rem auto 0;
  max-width: 640px;
  position: relative;
  border: 1px solid rgba(184, 151, 110, 0.2);
}

.invitation-card .card-cross {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0.6;
}

.invitation-card .card-lily {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 1.8rem;
  color: var(--rose);
  opacity: 0.5;
}

.invitation-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.invitation-card .detail {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
  color: var(--text);
}

.invitation-card .detail strong {
  font-weight: 500;
  color: var(--text);
}

.invitation-card .detail-note {
  font-size: 0.95rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(154, 141, 126, 0.2);
}

/* ============================================
   Cards & Info Blocks
   ============================================ */

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(154, 141, 126, 0.1);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--accent-dark);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   Map
   ============================================ */

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(154, 141, 126, 0.15);
  margin-bottom: 1rem;
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.map-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.map-label .icon {
  font-size: 1.2rem;
}

/* ============================================
   Details list
   ============================================ */

.details-list {
  list-style: none;
  padding: 0;
}

.details-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(154, 141, 126, 0.12);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.details-list li:last-child { border-bottom: none; }

.details-list .detail-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--accent);
  width: 1.5rem;
  text-align: center;
}

.details-list .detail-text {
  color: var(--text-muted);
  line-height: 1.5;
}

.details-list .detail-text strong {
  color: var(--text);
  font-weight: 500;
}

/* ============================================
   Photo Upload / Gallery Page
   ============================================ */

.photo-cta {
  text-align: center;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  margin: 2rem 0;
  border: 1px solid rgba(90, 125, 90, 0.15);
}

.photo-cta .icon-large {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.photo-cta h2 {
  margin-bottom: 0.75rem;
}

.photo-cta p {
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.4s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61, 58, 61, 0.15);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 4px 16px rgba(61, 58, 61, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Gallery placeholder
   ============================================ */

.gallery-placeholder {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--cream-warm);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(154, 141, 126, 0.25);
  margin: 2rem 0;
}

.gallery-placeholder .icon {
  font-size: 2.5rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.gallery-placeholder p {
  color: var(--text-dim);
  font-style: italic;
}

/* ============================================
   Memory Verse / Quote
   ============================================ */

.memory-block {
  background: var(--gold-light);
  border-left: 3px solid var(--gold);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
}

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

footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(154, 141, 126, 0.15);
  position: relative;
  z-index: 1;
}

/* ============================================
   Entrance animations
   ============================================ */

.fade-in {
  animation: fadeIn 0.7s ease-out forwards;
}

.fade-in-delay-1 { animation-delay: 0.15s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.45s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.6s; opacity: 0; }

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

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

@media (max-width: 768px) {
  html { font-size: 16px; }

  nav .nav-inner { gap: 1.25rem; }

  nav a { font-size: 1rem; }

  .hero { padding: 2rem 1rem; }

  .hero-cross,
  .hero-flower { font-size: 1.8rem; }

  .hero-photo-frame img { max-width: 220px; }

  .invitation-card { padding: 1.75rem 1.25rem; }

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

  .card { padding: 1.5rem; }

  .map-container iframe { height: 250px; }

  .btn-group { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .page { padding: 1rem 1rem 3rem; }

  .hero { padding: 1.5rem 0.75rem; }

  .hero-cross,
  .hero-flower { font-size: 1.5rem; top: 0.5rem; }

  .hero-cross { left: 0.5rem; }
  .hero-flower { right: 0.5rem; }

  .invitation-card { padding: 1.5rem 1rem; }

  .invitation-card .card-cross,
  .invitation-card .card-lily { top: 0.75rem; }

  .invitation-card .card-cross { left: 0.75rem; }
  .invitation-card .card-lily { right: 0.75rem; }
}