/* =============================================
   Mental Hälsa – Landing Page Styles
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --clr-green-dark: #4a6b50;
  --clr-green: #6b8f71;
  --clr-green-light: #a3bfa8;
  --clr-cream: #f5f0eb;
  --clr-cream-dark: #e8dfda;
  --clr-sand: #d4c4b0;
  --clr-sand-light: #e2d5c7;
  --clr-blush: #d6c4b6;
  --clr-white: #ffffff;
  --clr-text: #2e3a2f;
  --clr-text-light: #5e6b5f;

  --ff-heading: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50%;

  --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 12px 48px rgba(0,0,0,0.14);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  color: var(--clr-text);
  background: var(--clr-cream);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: var(--space-sm) var(--space-lg);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo-icon {
  width: 28px;
  height: 36px;
}

.logo-text {
  font-family: var(--ff-heading);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--clr-text);
  letter-spacing: -0.02em;
}

.main-nav ul {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--clr-text-light);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-green);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 100px;
  overflow: hidden;
}

/* Decorative shapes */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
}

.shape--top-right {
  top: -40px;
  right: -60px;
  width: 320px;
  height: 200px;
  background: linear-gradient(135deg, var(--clr-green-light), var(--clr-sand-light));
  border-radius: 0 0 0 60%;
  filter: blur(2px);
}

.shape--left {
  top: 30%;
  left: -80px;
  width: 200px;
  height: 350px;
  background: linear-gradient(180deg, var(--clr-sand), var(--clr-blush));
  border-radius: 0 60% 40% 0;
  filter: blur(2px);
}

.shape--bottom-left {
  bottom: 40%;
  left: -40px;
  width: 160px;
  height: 160px;
  background: var(--clr-green-light);
  opacity: 0.3;
  filter: blur(30px);
}

.shape--circle {
  top: 12%;
  right: 8%;
  width: 80px;
  height: 80px;
  background: var(--clr-sand);
  opacity: 0.5;
}

/* Decorative line top-right */
.hero-bg::after {
  content: '';
  position: absolute;
  top: 60px;
  right: 0;
  width: 45%;
  height: 1px;
  background: var(--clr-text);
  opacity: 0.12;
  transform: rotate(-3deg);
  transform-origin: right;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-lg);
  max-width: 800px;
}

.hero-title {
  font-family: var(--ff-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text);
  margin-bottom: var(--space-sm);
}

.hero-title em {
  font-style: normal;
  position: relative;
}

.hero-title em::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 4px;
  height: 8px;
  background: var(--clr-green-light);
  opacity: 0.35;
  border-radius: 4px;
  z-index: -1;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--clr-text-light);
  font-weight: 300;
  margin-bottom: var(--space-xl);
  letter-spacing: 0.01em;
}

/* ---------- Cards ---------- */
.cards {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 270px;
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

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

.card:focus-visible {
  outline: 3px solid var(--clr-green);
  outline-offset: 4px;
}

/* Dark card (Soundbuzz) */
.card--dark {
  background: linear-gradient(160deg, #6b8f71, #5a7d60);
  color: var(--clr-white);
}

/* Light card (ColorPainting) */
.card--light {
  background: var(--clr-white);
  color: var(--clr-text);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.85;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-title {
  font-family: var(--ff-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.card-desc {
  font-size: 0.88rem;
  font-weight: 300;
  opacity: 0.85;
  margin-bottom: var(--space-md);
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  transition: transform var(--transition), background var(--transition);
}

.card--dark .card-arrow {
  background: var(--clr-sand);
  color: var(--clr-text);
}

.card--light .card-arrow {
  background: var(--clr-sand);
  color: var(--clr-text);
}

.card-arrow svg {
  width: 20px;
  height: 20px;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: relative;
  z-index: 2;
  margin-top: var(--space-xl);
  animation: float 2.4s ease-in-out infinite;
  color: var(--clr-text-light);
  opacity: 0.5;
}

.scroll-hint svg {
  width: 28px;
  height: 28px;
}

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

/* ---------- Hero landscape ---------- */
.hero-landscape {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55%;
  z-index: 1;
  pointer-events: none;
}

.hero-landscape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-landscape-fade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, var(--clr-cream), transparent);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-2xl) var(--space-lg);
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-wave {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.section-wave svg {
  width: 80px;
  height: auto;
}

.section-title {
  font-family: var(--ff-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--clr-text);
}

.section-text {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--clr-text-light);
  max-width: 620px;
  margin: 0 auto var(--space-xl);
  line-height: 1.75;
}

/* ---------- About features ---------- */
.about {
  background: var(--clr-cream);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.feature {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.feature h3 {
  font-family: var(--ff-heading);
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  color: var(--clr-text);
}

.feature p {
  font-size: 0.92rem;
  color: var(--clr-text-light);
  font-weight: 300;
  line-height: 1.6;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--clr-cream-dark);
}

.contact-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--clr-green);
  color: var(--clr-white);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background var(--transition), transform var(--transition);
}

.contact-btn:hover {
  background: var(--clr-green-dark);
  transform: translateY(-2px);
}

.contact-btn:focus-visible {
  outline: 3px solid var(--clr-green-dark);
  outline-offset: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: var(--space-lg);
  font-size: 0.85rem;
  color: var(--clr-text-light);
  background: var(--clr-cream);
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ---------- Animations / Fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .site-header {
    padding: var(--space-sm);
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(245, 240, 235, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 80px var(--space-lg) var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    z-index: 105;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-link {
    font-size: 1.15rem;
  }

  .hero {
    padding-top: 80px;
    min-height: 100svh;
  }

  .hero-content {
    padding: 0 var(--space-sm);
  }

  .cards {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

  .card {
    width: 90%;
    max-width: 280px;
    height: auto;
    padding: var(--space-md);
  }

  .hero-landscape {
    height: 45%;
  }

  .shape--top-right {
    width: 200px;
    height: 140px;
  }

  .shape--circle {
    width: 50px;
    height: 50px;
    top: 8%;
    right: 5%;
  }

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .card {
    width: 100%;
  }
}
