/* TerveysNavi.fi — Design System v1.1 */

:root {
    --tv-teal: #0D9488;
    --tv-teal-light: #14B8A6;
    --tv-teal-dark: #0F766E;
    --tv-navy: #1E293B;
    --tv-navy-light: #334155;
    --tv-coral: #F97316;
    --tv-coral-light: #FB923C;
    --tv-sage: #6EE7B7;
    --tv-snow: #F8FAFC;
    --tv-charcoal: #1E293B;
    --tv-muted: #64748B;
    --tv-border: rgba(15, 118, 110, 0.10);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --section-pad: clamp(64px, 9vw, 128px);
    --content-max: 1140px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 0.35s var(--ease-out);
}

* { box-sizing: border-box; }
body { font-family: var(--font-body) !important; color: var(--tv-charcoal); background: var(--tv-snow); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* Scroll reveal */
.js-loaded .scroll-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.js-loaded .scroll-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Sticky header */
.site-header { position: sticky !important; top: 0; z-index: 999; background: rgba(248,250,252,0.92) !important; backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid rgba(15,118,110,0.06) !important; box-shadow: none !important; transition: all 0.4s var(--ease-out) !important; }
.site-header.header-scrolled { background: rgba(248,250,252,0.97) !important; box-shadow: 0 1px 24px rgba(0,0,0,0.06) !important; }
.site-branding .site-title, .site-branding .site-title a { font-family: var(--font-body) !important; font-size: 1.2rem !important; font-weight: 700 !important; color: var(--tv-teal-dark) !important; text-decoration: none !important; letter-spacing: -0.01em !important; }
.primary-menu-container .menu > li > a { font-family: var(--font-body) !important; font-size: 0.85rem !important; font-weight: 500 !important; color: var(--tv-muted) !important; transition: var(--transition) !important; }
.primary-menu-container .menu > li > a:hover { color: var(--tv-teal) !important; }

/* Kill wrappers on ALL pages */
.page .entry-content, .page .site-container .content-area, .page .site-container .site-main, .page .site-container .content-wrap, .page .content-area article, .page .entry-content-wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
.page .site-main { margin: 0 !important; }

/* Hide page title on pages with hero */
.terveys-page .entry-header, .terveys-page .page-header { display: none !important; }
.terveys-section-page .entry-header, .terveys-section-page .page-header { display: none !important; }
.page:has(.tv-hero) .entry-header, .page:has(.tv-hero) .page-header { display: none !important; }

/* Hero */
.tv-hero { position: relative; min-height: min(88vh, 680px); display: flex; align-items: center; padding: 40px 24px 72px; background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(13,148,136,0.05) 0%, transparent 60%), radial-gradient(ellipse 50% 40% at 20% 70%, rgba(249,115,22,0.03) 0%, transparent 60%), linear-gradient(180deg, var(--tv-snow) 0%, #f0fdf4 30%, #f0f9ff 60%, var(--tv-snow) 100%); overflow: hidden; }
.tv-hero::before { content: ''; position: absolute; top: 15%; right: 8%; width: 360px; height: 360px; border: 1.5px solid rgba(13,148,136,0.06); border-radius: 50%; pointer-events: none; animation: floatSlow 24s ease-in-out infinite; }
@keyframes floatSlow { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-15px,20px) scale(1.02); } }

.tv-hero-inner { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; z-index: 2; }
.tv-hero-content .hero-label { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tv-teal); background: rgba(13,148,136,0.06); padding: 8px 20px; border-radius: 100px; margin-bottom: 24px; border: 1px solid rgba(13,148,136,0.08); }
.tv-hero-content h1 { font-family: var(--font-display) !important; font-size: clamp(2rem, 4.5vw, 3.2rem) !important; font-weight: 400 !important; line-height: 1.2 !important; color: var(--tv-charcoal) !important; margin: 0 0 20px 0 !important; }
.tv-hero-content h1 strong { color: var(--tv-teal); font-weight: 400; }
.tv-hero-content .hero-subtitle { font-size: 1.05rem; line-height: 1.8; color: var(--tv-muted); margin-bottom: 32px; max-width: 480px; }
.tv-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.tv-btn-primary { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; color: white !important; background: var(--tv-teal); padding: 15px 32px; border-radius: 10px; text-decoration: none !important; transition: var(--transition); box-shadow: 0 4px 20px rgba(13,148,136,0.2); }
.tv-btn-primary:hover { background: var(--tv-teal-light); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(13,148,136,0.3); }
.tv-btn-outline { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; color: var(--tv-teal) !important; background: white; padding: 15px 32px; border-radius: 10px; text-decoration: none !important; transition: var(--transition); border: 1px solid var(--tv-border); }
.tv-btn-outline:hover { background: var(--tv-snow); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.05); }

/* Hero stats */
.tv-hero-stats { display: flex; flex-direction: column; gap: 16px; }
.tv-hero-stat { background: white; border: 1px solid rgba(0,0,0,0.05); border-radius: 16px; padding: 24px 28px; display: flex; align-items: center; gap: 16px; transition: var(--transition); box-shadow: 0 2px 12px rgba(0,0,0,0.03); }
.tv-hero-stat:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.06); }
.tv-hero-stat .stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.tv-hero-stat:nth-child(1) .stat-icon { background: rgba(13,148,136,0.08); }
.tv-hero-stat:nth-child(2) .stat-icon { background: rgba(249,115,22,0.08); }
.tv-hero-stat:nth-child(3) .stat-icon { background: rgba(110,231,183,0.15); }
.tv-hero-stat .stat-text strong { display: block; font-size: 0.92rem; font-weight: 700; color: var(--tv-charcoal); margin-bottom: 2px; }
.tv-hero-stat .stat-text span { font-size: 0.82rem; color: var(--tv-muted); }

/* Services */
.tv-services { padding: var(--section-pad) 24px; background: white; }
.tv-services .section-header { text-align: center; max-width: 520px; margin: 0 auto 56px; }
.tv-services .section-label { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--tv-teal); margin-bottom: 14px; }
.tv-services h2 { font-family: var(--font-display) !important; font-size: clamp(1.8rem, 3.5vw, 2.4rem) !important; font-weight: 400 !important; color: var(--tv-charcoal) !important; margin-bottom: 12px !important; }
.tv-services .section-desc { color: var(--tv-muted); font-size: 1rem; line-height: 1.75; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: var(--content-max); margin: 0 auto; }

.service-card { background: var(--tv-snow); border-radius: 16px; padding: 36px 28px; border: 1px solid rgba(0,0,0,0.05); transition: all 0.4s var(--ease-out); text-decoration: none !important; color: inherit !important; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.service-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; transition: height 0.4s var(--ease-out); }
.service-card:hover { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,0.08); border-color: transparent; }
.service-card:hover::after { height: 4px; }
.service-card.tieto::after { background: var(--tv-teal); }
.service-card.ohjelmat::after { background: var(--tv-coral); }
.service-card.klinikka::after { background: var(--tv-navy); }

.service-card .service-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 20px; }
.service-card.tieto .service-icon { background: rgba(13,148,136,0.08); }
.service-card.ohjelmat .service-icon { background: rgba(249,115,22,0.08); }
.service-card.klinikka .service-icon { background: rgba(30,41,59,0.06); }
.service-card h3 { font-family: var(--font-display) !important; font-size: 1.3rem !important; font-weight: 400 !important; margin-bottom: 10px !important; }
.service-card p { color: var(--tv-muted); line-height: 1.7; font-size: 0.9rem; flex-grow: 1; margin-bottom: 18px; }
.service-link { font-size: 0.83rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; transition: var(--transition); }
.service-card.tieto .service-link { color: var(--tv-teal); }
.service-card.ohjelmat .service-link { color: var(--tv-coral); }
.service-card.klinikka .service-link { color: var(--tv-navy); }
.service-card:hover .service-link { gap: 12px; }

/* Evidence */
.tv-evidence { padding: var(--section-pad) 24px; background: var(--tv-navy); color: white; position: relative; overflow: hidden; }
.tv-evidence::before { content: ''; position: absolute; top: -30%; right: -15%; width: 600px; height: 600px; border: 1px solid rgba(255,255,255,0.03); border-radius: 50%; pointer-events: none; }
.evidence-inner { max-width: var(--content-max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; z-index: 2; }
.evidence-content h2 { font-family: var(--font-display) !important; font-size: clamp(1.5rem, 3vw, 2rem) !important; font-weight: 400 !important; margin-bottom: 16px !important; color: white !important; line-height: 1.35 !important; }
.evidence-content p { color: rgba(255,255,255,0.6); line-height: 1.85; font-size: 0.95rem; }
.evidence-cred { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.evidence-cred .cred-avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.evidence-cred .cred-name { font-weight: 700; font-size: 0.88rem; }
.evidence-cred .cred-title { font-size: 0.76rem; color: rgba(255,255,255,0.4); margin-top: 2px; }
.evidence-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.evidence-stat { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 24px 16px; text-align: center; transition: all 0.4s var(--ease-out); }
.evidence-stat:hover { background: rgba(255,255,255,0.07); transform: translateY(-3px); }
.evidence-stat .stat-number { font-family: var(--font-display); font-size: 1.8rem; color: var(--tv-sage); margin-bottom: 4px; line-height: 1; }
.evidence-stat .stat-label { font-size: 0.76rem; color: rgba(255,255,255,0.4); line-height: 1.4; }

/* Articles */
.tv-articles { padding: var(--section-pad) 24px; background: var(--tv-snow); }
.tv-articles .section-header { text-align: center; margin-bottom: 40px; }
.tv-articles h2 { font-family: var(--font-display) !important; font-size: clamp(1.5rem, 3vw, 2rem) !important; font-weight: 400 !important; }
.tv-article-card { max-width: 720px; margin: 0 auto; background: white; border-radius: 16px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05); transition: all 0.4s var(--ease-out); display: block; text-decoration: none !important; color: inherit !important; }
.tv-article-card:hover { transform: translateY(-5px); box-shadow: 0 20px 56px rgba(0,0,0,0.07); }
.tv-article-card .article-body { padding: 36px 40px; }
.tv-article-card .article-cat { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tv-teal); background: rgba(13,148,136,0.06); padding: 6px 14px; border-radius: 100px; margin-bottom: 14px; }
.tv-article-card h3 { font-family: var(--font-display) !important; font-size: 1.35rem !important; font-weight: 400 !important; margin-bottom: 8px !important; }
.tv-article-card p { color: var(--tv-muted); line-height: 1.75; margin-bottom: 18px; font-size: 0.92rem; }
.tv-article-card .read-more { font-weight: 700; font-size: 0.83rem; color: var(--tv-teal) !important; display: inline-flex; align-items: center; gap: 6px; }
.tv-article-card:hover .read-more { gap: 12px; }

/* CTA */
.tv-cta { padding: var(--section-pad) 24px; background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%); text-align: center; }
.tv-cta h2 { font-family: var(--font-display) !important; font-size: clamp(1.8rem, 3.5vw, 2.6rem) !important; font-weight: 400 !important; color: var(--tv-charcoal) !important; margin-bottom: 14px !important; }
.tv-cta p { color: var(--tv-muted); font-size: 1.02rem; max-width: 460px; margin: 0 auto 32px; line-height: 1.75; }
.tv-cta .cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--tv-navy) !important; color: rgba(255,255,255,0.4) !important; border: none !important; }
.site-footer a { color: var(--tv-sage) !important; }

/* Responsive */
@media (max-width: 900px) {
    .tv-hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .tv-hero-content .hero-subtitle { margin-left: auto; margin-right: auto; }
    .tv-hero-ctas { justify-content: center; }
    .tv-hero-stats { max-width: 400px; margin: 0 auto; }
    .services-grid { grid-template-columns: 1fr; max-width: 460px; }
    .evidence-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .tv-hero { min-height: auto; padding: 32px 20px 48px; }
    .evidence-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tv-cta .cta-buttons { flex-direction: column; align-items: center; }
}

/* Hero entry */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.tv-hero-content > * { animation: fadeInUp 0.7s var(--ease-out) both; }
.tv-hero-content .hero-label { animation-delay: 0.05s; }
.tv-hero-content h1 { animation-delay: 0.15s; }
.tv-hero-content .hero-subtitle { animation-delay: 0.3s; }
.tv-hero-ctas { animation: fadeInUp 0.7s var(--ease-out) 0.4s both; }
.tv-hero-stats > * { animation: fadeInUp 0.6s var(--ease-out) both; }
.tv-hero-stats > :nth-child(1) { animation-delay: 0.3s; }
.tv-hero-stats > :nth-child(2) { animation-delay: 0.45s; }
.tv-hero-stats > :nth-child(3) { animation-delay: 0.6s; }

::selection { background: rgba(13,148,136,0.15); color: var(--tv-teal-dark); }
