/*
Theme Name: Ylikylän Kyläyhdistys
Theme URI: https://ylikylatalo.fi
Author: Ylikylän Kyläyhdistys ry
Description: Lämmin, maanläheinen teema Ylikylän kyläyhdistykselle. Metsänvihreä ja amber-aksentti.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: ylikyla
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ===== Design Tokens ===== */
:root {
  --color-bg: hsl(40, 33%, 96%);
  --color-fg: hsl(30, 10%, 20%);
  --color-primary: hsl(145, 35%, 28%);
  --color-primary-fg: hsl(40, 33%, 96%);
  --color-accent: hsl(25, 70%, 50%);
  --color-accent-fg: hsl(40, 33%, 96%);
  --color-muted: hsl(30, 8%, 50%);
  --color-border: hsl(35, 20%, 85%);
  --color-card: hsl(40, 30%, 98%);
  --color-section-warm: hsl(35, 30%, 94%);
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --radius: 0.5rem;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 234, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-fg);
  font-family: var(--font-heading);
  font-size: 1.125rem;
}

.site-logo span {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-fg);
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  background: var(--color-primary);
  color: var(--color-primary-fg);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-fg);
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav { display: none; }
  .main-nav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 0.5rem 1rem 1rem;
  }
  .main-nav.is-open ul {
    flex-direction: column;
  }
  .main-nav.is-open a {
    padding: 0.75rem 1rem;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-small {
  height: 40vh;
  min-height: 300px;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, hsla(30,10%,10%,0.5) 0%, hsla(30,10%,10%,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1rem;
  max-width: 48rem;
  animation: fadeInUp 0.6s ease-out forwards;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  color: var(--color-primary-fg);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1.125rem, 2.5vw, 1.25rem);
  color: rgba(244,241,234,0.9);
  margin-bottom: 2rem;
  font-weight: 300;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}

.btn:hover { opacity: 0.9; }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-fg);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-accent-fg);
}

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

@media (min-width: 768px) {
  .section { padding: 6rem 0; }
}

.section-warm { background: var(--color-section-warm); }

.section-title {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  max-width: 36rem;
  margin: 0 auto 3rem;
}

/* ===== Feature Cards ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: box-shadow 0.3s;
}

.feature-card:hover {
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(58,107,72,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-muted);
  font-size: 0.875rem;
}

/* ===== Two Column ===== */
.two-col {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.two-col img {
  border-radius: var(--radius);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.2);
}

.two-col h2 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.two-col p {
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ===== Price List ===== */
.price-list { max-width: 48rem; margin: 0 auto; }

.price-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.price-item h3 { font-size: 1.125rem; }
.price-item .note { color: var(--color-muted); font-size: 0.875rem; }
.price-item .price { font-weight: 600; color: var(--color-accent); white-space: nowrap; }

/* ===== Info Box ===== */
.info-box {
  background: var(--color-section-warm);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 3rem;
}

.info-box h2 { font-size: 1.5rem; margin-bottom: 1rem; }

.info-box ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.info-box li { margin-bottom: 0.5rem; }

/* ===== Amenity List ===== */
.amenity-list { list-style: none; }

.amenity-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.amenity-list li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: bold;
  flex-shrink: 0;
}

/* ===== Prose (Historia) ===== */
.prose { max-width: 48rem; margin: 0 auto; }
.prose h2 { font-size: 1.875rem; margin-bottom: 1.5rem; }
.prose h3 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.prose p { color: var(--color-muted); line-height: 1.7; margin-bottom: 1.5rem; }

/* ===== Kuvapankki / Gallery ===== */
.gallery-placeholder {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.gallery-embed {
  aspect-ratio: 16/9;
  background: hsl(35, 20%, 92%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-embed h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.gallery-embed p { font-size: 0.875rem; color: var(--color-muted); }

/* ===== CTA Box ===== */
.cta-box {
  background: var(--color-section-warm);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.cta-box h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.cta-box p { color: var(--color-muted); margin-bottom: 1rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary);
  color: var(--color-primary-fg);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.site-footer h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: rgba(244,241,234,0.8);
  font-size: 0.875rem;
}

.site-footer a:hover { color: var(--color-primary-fg); }

.footer-contact {
  list-style: none;
}

.footer-contact li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(244,241,234,0.2);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(244,241,234,0.6);
}

/* ===== Text center utility ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
