/*
Theme Name: Samulin Kakku
Theme URI: https://samulin-kakku.morko.posso.fi
Description: Räikevä ja leikkisä teema Samulin Kakku -erikoiskakkuyritykselle
Version: 1.0.0
Author: AutoWP
Text Domain: samulin-kakku
*/

/* ===== CSS VARIABLES ===== */
:root {
  --pink: #FF1493;
  --pink-light: #FF69B4;
  --yellow: #FFE000;
  --turquoise: #00D4FF;
  --coral: #FF6B35;
  --lime: #AAFF00;
  --purple: #8B2FC9;
  --purple-dark: #5B1A9A;
  --dark: #1A0A2E;
  --cream: #FFFBF0;
  --white: #FFFFFF;
  --gray-light: #F5F0FF;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --shadow-pink: 0 8px 32px rgba(255,20,147,0.25);
  --shadow-purple: 0 8px 32px rgba(139,47,201,0.2);
  --shadow-card: 0 4px 24px rgba(26,10,46,0.1);
  --transition: 0.3s ease;
  --font-heading: 'Fredoka', cursive;
  --font-body: 'Nunito', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--purple); }

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

@media print {
  header, footer, nav, .site-footer, .hero-scroll-indicator, .cta-banner, .mobile-menu-toggle { display: none !important; }
}

/* ===== CONTAINERS ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--pink);
  color: var(--white);
  box-shadow: var(--shadow-pink);
}
.btn-primary:hover {
  background: var(--purple);
  box-shadow: var(--shadow-purple);
  color: var(--white);
}

.btn-secondary {
  background: var(--yellow);
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(255,224,0,0.4);
}
.btn-secondary:hover {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(255,107,53,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--pink);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ===== MOBILE NAV (outside header!) ===== */
.main-nav {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

body.nav-open .main-nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.nav-open { overflow: hidden; }

.nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.main-nav .nav-menu {
  list-style: none;
  text-align: center;
}

.main-nav .nav-menu li {
  margin: 1rem 0;
}

.main-nav .nav-menu a {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--white);
  font-weight: 600;
  transition: color var(--transition);
}

.main-nav .nav-menu a:hover { color: var(--yellow); }

/* ===== SITE HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,251,240,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255,20,147,0.1);
  box-shadow: 0 2px 20px rgba(26,10,46,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pink);
  text-decoration: none;
}

.site-logo img {
  height: 48px;
  width: auto;
}

.site-logo:hover { color: var(--purple); }

/* Desktop nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.desktop-nav a {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--dark);
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--pink);
  transition: width var(--transition);
}

.desktop-nav a:hover { color: var(--pink); }
.desktop-nav a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: all var(--transition);
  border-radius: 2px;
}

@media (max-width: 820px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 60%, var(--dark) 100%);
  color: var(--white);
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,224,0,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content { }

.hero-badge {
  display: inline-block;
  background: rgba(255,224,0,0.2);
  border: 1px solid var(--yellow);
  color: var(--yellow);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: linear-gradient(90deg, var(--yellow), var(--turquoise));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.hero-wave svg { display: block; }

@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-image { order: -1; }
  .hero-image img { max-height: 280px; width: 100%; object-fit: cover; }
  .hero-section { padding: 4rem 0 3rem; }
}

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.section-alt { background: var(--gray-light); }

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

.section-pink {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  color: var(--white);
}

.section-turquoise {
  background: linear-gradient(135deg, #00B4D8 0%, #0077B6 100%);
  color: var(--white);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  opacity: 0.75;
  margin-bottom: 3rem;
  max-width: 600px;
}

.section-header { margin-bottom: 3rem; }
.section-header.text-center { text-align: center; }
.section-header.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid var(--pink);
  position: relative;
  overflow: hidden;
}

.service-card:nth-child(2) { border-top-color: var(--yellow); }
.service-card:nth-child(3) { border-top-color: var(--turquoise); }
.service-card:nth-child(4) { border-top-color: var(--coral); }
.service-card:nth-child(5) { border-top-color: var(--lime); }
.service-card:nth-child(6) { border-top-color: var(--purple); }

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-pink);
}

.service-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.service-card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.service-card-text {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ===== FEATURE LIST ===== */
.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.section-dark .feature-item { background: rgba(255,255,255,0.05); }
.section-dark .feature-item:hover { background: rgba(255,255,255,0.1); }

.feature-item-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}

.feature-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-item-text {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 640px) {
  .features-list { grid-template-columns: 1fr; }
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.about-content .section-title { margin-bottom: 1rem; }
.about-content p { margin-bottom: 1rem; color: #555; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== GALLERY STRIP ===== */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

@media (max-width: 640px) {
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--coral) 50%, var(--pink) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '🎂 🎉 ✨ 🌈 🎂 🎉 ✨ 🌈 🎂 🎉 ✨ 🌈';
  position: absolute;
  top: 0.5rem;
  left: 0;
  right: 0;
  font-size: 1.5rem;
  opacity: 0.15;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 2rem;
}

.cta-banner-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.cta-banner-text {
  font-size: 1.15rem;
  color: var(--dark);
  opacity: 0.8;
  margin-bottom: 2rem;
}

.cta-banner-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== PROCESS STEPS ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.process-step {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-pink);
}

.step-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255,20,147,0.05);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.contact-item-icon { font-size: 1.5rem; }
.contact-item-text { font-size: 0.95rem; }
.contact-item-text a { color: var(--pink); font-weight: 600; }

.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(255,20,147,0.15);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark);
  background: var(--cream);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--pink);
}

.form-group textarea { height: 120px; resize: vertical; }

.form-success {
  display: none;
  background: rgba(0,212,255,0.1);
  border: 2px solid var(--turquoise);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--dark);
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--pink);
}

.pricing-card.featured {
  border-color: var(--pink);
  background: linear-gradient(to bottom, #FFF0FA, var(--white));
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pink);
  color: var(--white);
  padding: 0.25rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.pricing-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pink);
  margin: 0.75rem 0;
}
.pricing-price small { font-size: 0.9rem; color: #888; }
.pricing-desc { font-size: 0.9rem; color: #666; margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.85);
  padding: 4rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .site-logo { color: var(--yellow); margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; opacity: 0.7; max-width: 280px; }

.footer-links h4 {
  font-size: 1rem;
  color: var(--yellow);
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links ul a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color var(--transition);
  text-decoration: underline;
  text-decoration-color: transparent;
}
.footer-links ul a:hover {
  color: var(--yellow);
  text-decoration-color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.page-hero .section-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.page-hero p { opacity: 0.85; font-size: 1.1rem; }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  @keyframes float { from, to { transform: none; } }
}

/* ===== 404 PAGE ===== */
.error-404 { text-align: center; padding: 8rem 0; }
.error-404-number {
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-404 h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-404 p { color: #666; margin-bottom: 2rem; }

/* ===== ADMIN NOTICE (STAGING) ===== */
/* handled via admin_notices hook */

/* ===== WP BLOCKS OVERRIDES ===== */
.wp-block-paragraph { line-height: 1.7; margin-bottom: 1rem; }
.wp-block-heading { font-family: var(--font-heading); }
