/* =========================
   BASE / PAGE STYLES
   Global Dark Theme
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background-color: var(--color-bg-main);
    color: var(--color-text-main);

    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--color-text-main);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent);
}

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

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-text-main);
}

/* Paragraphs */
p {
    margin: 0 0 var(--space-sm);
    color: var(--color-text-muted);
}

/* Lists */
ul, ol {
    margin: 0;
    padding-left: 1.25rem;
}

/* Main content wrapper */
.site-content {
    position: relative;
    z-index: 1;
    background: var(--color-bg-main);
}

/* Sections */
section {
    position: relative;
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: #000;
}

.page-title{    text-align: center;
    padding-top: 6rem;
}
/* =========================
   GRAIN / NOISE OVERLAY
========================= */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;

    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255,255,255,0.02),
            rgba(255,255,255,0.02) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,0.02),
            rgba(255,255,255,0.02) 1px,
            transparent 1px,
            transparent 2px
        );

    mix-blend-mode: overlay;
    opacity: 0.15;
}

/* =========================
   SCROLL REVEAL
========================= */

/* Initial hidden state */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.9s ease,
        transform 0.9s ease;
    will-change: opacity, transform;
}

/* When revealed */
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger helper (optional) */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/*YHTEYSTIEDO SIVU*/
.section-hero-contact {
    min-height: 70vh;
    display: flex;
    align-items: center;
    color: #fff;
    background-image: url("../assets/images/bg-hero-contact.jpg");
    background-size: cover;
    background-position: center;
}

.section-hero-contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

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

.section-hero-contact h1,
.section-hero-contact p {
    text-shadow:
        0 2px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.35);
}

.section-hero-contact .hero-intro,
.section-hero-gear .hero-intro {
    margin-top: var(--space-sm);
    margin-left: auto;
    margin-right: auto;
    max-width: 60ch;
    font-size: var(--fs-lg);
    color: rgba(255, 255, 255, 0.85);
}

/* Stronger centering for Yhteystiedot hero */
.page-slug-yhteystiedot .section-hero-contact .section-inner,
.page-slug-yhteystiedot .section-hero-contact h1,
.page-slug-yhteystiedot .section-hero-contact p {
    text-align: center;
}

.page-slug-yhteystiedot .section-hero-contact .hero-intro {
    margin-left: auto;
    margin-right: auto;
    color:#fff;
}

/* Page-specific hero backgrounds */
.page-slug-yhteystiedot .section-hero-contact {
    background-image: url("../assets/images/bg-hero-contact.jpg");
}

.page-slug-opetus-workshopit .section-hero-contact {
    background-image: url("../assets/images/bg-hero-workshops.jpg");
}

.section-contact-details {
    background: var(--color-bg-secondary);

}

/* ===== CTA Logo (global) ===== */
.cta-logo {
    max-width: 150px;
    margin: 0 auto;
}

/* =========================
   OPETUS & WORKSHOPIT PAGE
========================= */
.page-slug-opetus-workshopit .section-content {
    padding: var(--space-lg) 0;
    background: var(--color-bg-main);
}

.page-slug-opetus-workshopit .section-content + .section-content {
    background: var(--color-bg-secondary);
}

.page-slug-opetus-workshopit .section-content h2 {
    margin-bottom: var(--space-sm);
}

.page-slug-opetus-workshopit .section-content .section-inner {
    max-width: 720px;
    margin: 0 auto;
}

.page-slug-opetus-workshopit .section-content p {
    margin-bottom: var(--space-sm);
}

/* =========================
   YHTEYSTIEDOT PAGE
========================= */
.page-slug-yhteystiedot .section-content {
    padding: var(--space-lg) 0;
    background: var(--color-bg-main);
}

.page-slug-yhteystiedot .section-contact-details {
    padding: var(--space-lg) 0 var(--space-xl);
    background: var(--color-bg-secondary);
    text-align: center;
}

.page-slug-yhteystiedot .contact-label {
    text-align: center;
}

.page-slug-yhteystiedot .section-contact-details .section-inner,
.page-slug-yhteystiedot .contact-email {
    text-align: center;
}

/* Force center for Yhteystiedot email block */
.page-slug-yhteystiedot .section-contact-details .section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-slug-yhteystiedot .contact-label,
.page-slug-yhteystiedot .contact-email {
    margin: 0 auto;
}

/* Center main content on Yhteystiedot */
.page-slug-yhteystiedot .section-content .section-inner {
    max-width: 60ch;
    margin: 0 auto;
    text-align: center;
}

.page-slug-yhteystiedot .section-content p {
    margin-left: auto;
    margin-right: auto;
}
