/* ===========================================================
   FiMaTech redesign — alternating white/black bands,
   Clash Grotesk display, Hanken Grotesk body, hero + santa hat + snow.
   Loaded AFTER style.css so it overrides the homepage look.
   =========================================================== */

:root {
    --display: 'Clash Grotesk', 'Hanken Grotesk', sans-serif;
    --body: 'Hanken Grotesk', system-ui, sans-serif;
    --wa: #1faa54;
}

body {
    font-family: var(--body);
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 500;
    letter-spacing: -0.005em;
}

.rwrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- BANDS ---------- */
.band {
    padding: 110px 0;
    position: relative;
}

    .band.dark {
        --text: #f1f1f3;
        --dim: rgba(241,241,243,.62);
        --faint: rgba(241,241,243,.4);
        --line: rgba(255,255,255,.1);
        --card: rgba(255,255,255,.035);
        --card-hi: rgba(255,255,255,.07);
        --tfrom: #fff;
        --tto: #8c8c90;
        --shadow: none;
        background: #0e0e10;
        color: var(--text);
    }

    .band.light {
        --text: #16161a;
        --dim: rgba(22,22,26,.66);
        --faint: rgba(22,22,26,.42);
        --line: rgba(0,0,0,.12);
        --card: #ffffff;
        --card-hi: #ffffff;
        --tfrom: #121214;
        --tto: #55555b;
        --shadow: 0 14px 40px rgba(0,0,0,.08);
        background: #ffffff;
        color: var(--text);
    }

.band .eyebrow {
    font-family: var(--body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 16px;
    display: inline-block;
}

.band .section-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.04;
    background: linear-gradient(180deg, var(--tfrom) 0%, var(--tto) 135%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.band .lead {
    color: var(--dim);
    font-size: 1.08rem;
    max-width: 64ch;
}

.band .band-head {
    max-width: 760px;
    margin-bottom: 54px;
}

/* ---------- BUTTONS ---------- */
.rbtn {
    font-family: var(--display);
    font-weight: 500;
    font-size: .95rem;
    padding: 13px 26px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .2s, background .2s, border-color .2s;
    text-decoration: none;
}

.dark .rbtn-primary { background: linear-gradient(180deg,#fff,#d8d8da); color: #111; }
.light .rbtn-primary { background: #16161a; color: #fff; }
.rbtn-primary:hover { transform: translateY(-2px); }
.rbtn-ghost { background: transparent; border-color: var(--line, rgba(255,255,255,.14)); color: var(--text, #fff); }
.rbtn-ghost:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--text) 40%, transparent); }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.about-copy p { color: var(--dim); margin-bottom: 18px; font-size: 1.06rem; }
.about-copy strong { color: var(--text); font-weight: 600; }
.about-copy .inline-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.slist { margin: 26px 0 0; display: grid; gap: 8px; }
.slist span { color: var(--dim); }
.detail-boxes { display: grid; gap: 16px; }
.dbox { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.dbox .k { font-size: 11px; letter-spacing: .16em; color: var(--faint); text-transform: uppercase; }
.dbox .v { font-family: var(--display); font-weight: 500; font-size: 1.1rem; margin-top: 8px; color: var(--text); }

/* ---------- SERVICES ---------- */
.rcards { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.rcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; box-shadow: var(--shadow); transition: transform .3s, border-color .3s; }
.rcard:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.rcard h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--text); }
.rcard p { color: var(--dim); font-size: .98rem; }
.rcard .num { font-family: var(--display); font-size: .85rem; color: var(--faint); margin-bottom: 18px; display: block; }

/* ---------- PROJECTS ---------- */
.proj-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.proj-sub { color: var(--dim); margin-top: 12px; }
.proj-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1040px; margin: 0 auto; }
.proj-row .pcard:nth-child(n+4) { display: none; }
.proj-row-all { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1040px; margin: 0 auto; }
.pcard { display: block; text-align: center; text-decoration: none; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.03); box-shadow: 0 12px 34px rgba(0,0,0,.35); transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
.pcard:hover { transform: translateY(-6px); border-color: rgba(255,255,255,.42); box-shadow: 0 20px 48px rgba(0,0,0,.5); }
.pcard-img { overflow: hidden; background: #0c0c0e; line-height: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.pcard-img img { width: 100%; height: auto; display: block; filter: grayscale(.4) contrast(1.03); transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s; }
.pcard:hover .pcard-img img { transform: scale(1.05); filter: grayscale(0); }
.pcard-cat { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 18px; padding: 0 14px; }
.pcard-name { font-family: var(--display); font-weight: 500; font-size: 1.18rem; margin-top: 5px; padding: 0 14px 22px; color: var(--text); }
.pcard:hover .pcard-name { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.light .pcard { border-color: rgba(0,0,0,.14); background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.09); }
.light .pcard:hover { border-color: rgba(0,0,0,.32); box-shadow: 0 20px 44px rgba(0,0,0,.13); }
.light .pcard-img { border-bottom-color: rgba(0,0,0,.08); }
.proj-more { text-align: center; margin-top: 46px; }

/* ---------- CMS ---------- */
.rcms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.rcms-mock { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #0c0c0e; box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
.rcms-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
.rcms-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.18); display: block; }
.rcms-mock img { width: 100%; filter: grayscale(.15); }
.rcms-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- FAQ ---------- */
.rfaq-list { max-width: 820px; }
.rfaq-item { border-bottom: 1px solid var(--line); }
.rfaq-item summary { list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative; font-family: var(--display); font-weight: 500; font-size: 1.12rem; color: var(--text); }
.rfaq-item summary::-webkit-details-marker { display: none; }
.rfaq-item summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--faint); transition: transform .25s; }
.rfaq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.rfaq-ans { padding: 0 44px 26px 0; color: var(--dim); }
.rfaq-ans p { color: var(--dim); }

/* ---------- CONTACT ---------- */
.rcontact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; }
.rcmeta { display: grid; gap: 16px; margin-top: 30px; }
.rcmeta a, .rcmeta div.rcmeta-item { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; transition: border-color .25s, background .25s; text-decoration: none; }
.rcmeta a:hover { border-color: rgba(255,255,255,.3); background: var(--card-hi); }
.rcmeta .rico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); flex: none; }
.rcmeta .rico svg { width: 20px; height: 20px; }
.rcmeta .k { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.rcmeta .v { font-weight: 600; color: var(--text); }
.rcmeta .wa .rico { background: rgba(31,170,84,.16); color: var(--wa); }
.rcmeta .wa .v { color: #35c46d; }
.rform { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px; }
.rform .rrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rfg { margin-bottom: 16px; }
.rfg label { display: block; font-size: 13px; color: var(--faint); margin-bottom: 7px; }
.rfg input, .rfg textarea { width: 100%; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: #fff; font-family: var(--body); font-size: .96rem; transition: border-color .2s; }
.rfg input:focus, .rfg textarea:focus { outline: none; border-color: rgba(255,255,255,.4); }
.rfg textarea { min-height: 120px; resize: vertical; }
.rform .rbtn-primary { width: 100%; justify-content: center; }
.rform .rbtn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- HERO: floating logo + santa hat + snow ---------- */
.hero-subtitle { font-family: 'Syne', sans-serif; }
.logo-float { position: relative; display: inline-block; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.santa-hat { position: absolute; width: 234px; height: auto; top: -18px; left: 50%; transform: translateX(-10%) rotate(7deg); transform-origin: 35% 40%; z-index: 5; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); display: none; pointer-events: none; }
.xmas .santa-hat { display: block; }
@media (prefers-reduced-motion: reduce) { .logo-float { animation: none; } }

.snow { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.flake { position: absolute; top: -12px; background: #fff; border-radius: 50%; box-shadow: 0 0 3px rgba(255,255,255,.6); animation-name: snowfall; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes snowfall { 0% { transform: translateY(-6vh) translateX(0); } 100% { transform: translateY(106vh) translateX(28px); } }

/* ---------- COOKIE widget (grayish-white, no auto popup) ---------- */
#klaro .cookie-notice:not(.cookie-modal-notice) { display: none !important; }
.cookie-widget-minimal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #dadad8 !important;
}
/* site.css hides the widget while the Klaro notice exists in the DOM; the notice is hidden above,
   so keep the widget visible and hide it only while the settings modal is open */
body:has(.klaro .cookie-notice):not(:has(.klaro .cm-modal)) .cookie-widget-minimal { display: flex !important; }
.cookie-widget-minimal i { color: #dadad8; font-size: 22px; }
.cookie-widget-minimal:hover i { color: #fff; }

/* ---------- FOOTER: light ---------- */
.studio-footer { background: #f4f4f2 !important; color: #16161a !important; }
.studio-footer .footer-credits span,
.studio-footer .footer-copy { color: rgba(22,22,26,.6) !important; }
.studio-footer .footer-links a { color: rgba(22,22,26,.62) !important; }
.studio-footer .footer-links a:hover { color: #000 !important; }
.studio-footer .footer-brand img, .studio-footer .logo-top-img { filter: invert(1) grayscale(1); }

/* ---------- Language switcher: globe icon ---------- */
.lang-globe { width: 16px; height: 16px; margin-right: 7px; vertical-align: -3px; opacity: .85; }

/* ---------- NAV: full-screen mobile menu ---------- */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        height: 100dvh !important;
        align-items: center !important;
        padding-top: 70px !important;
        padding-bottom: 40px !important;
    }
    .hero-center { margin-top: 0 !important; }

    nav .logo-top-wrapper, nav .mobile-menu-btn { position: relative; z-index: 1100; }

    nav ul {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 72px 0 40px !important;
        flex-direction: column;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        background: #0e0e10 !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 1050;
        overflow-y: auto;
    }

        nav ul li { width: 100%; text-align: center; }

        nav ul li a {
            color: rgba(255, 255, 255, 0.88) !important;
            font-size: 19px !important;
            letter-spacing: 1.5px;
            padding: 16px 0 !important;
            transition: color .25s ease, letter-spacing .25s ease;
        }

        nav ul li a:hover { color: #fff !important; letter-spacing: 3.5px; }

        nav ul .nav-item-lang { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
        nav ul .fima-dropbtn,
        nav ul .fima-dropdown > a,
        nav ul .fima-dropdown span { color: rgba(255,255,255,.88) !important; justify-content: center; }
        nav ul .fima-dropdown-content a { color: rgba(255,255,255,.7) !important; }
        nav ul .fima-dropdown-content a:hover { color: #fff !important; }

        /* Language dropdown: open on tap only (no :hover on touch), and float it below the
           button so opening it doesn't shift the centered menu under the user's finger */
        nav ul .fima-dropdown:not(.active):hover .fima-dropdown-content { display: none !important; }
        nav ul .fima-dropdown { position: relative; }
        nav ul .fima-dropdown-content {
            position: absolute !important;
            top: 100% !important;
            left: 50%;
            transform: translateX(-50%);
            width: 140px !important;
            padding-top: 4px !important;
        }
        nav ul .fima-dropdown .chevron { transition: transform .25s ease; }
        nav ul .fima-dropdown.active .chevron { transform: rotate(180deg); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
    .about-grid { grid-template-columns: 1fr; gap: 34px; }
    .rcms-grid { grid-template-columns: 1fr; gap: 30px; }
    .rcms-mock { order: 2; }
    .rcontact-grid { grid-template-columns: 1fr; gap: 34px; }
    .proj-row, .proj-row-all { grid-template-columns: 1fr; max-width: 380px; }
    .santa-hat { width: 158px; top: -12px; }
}

@media (max-width: 720px) {
    .rcards { grid-template-columns: 1fr; }
    .rform .rrow { grid-template-columns: 1fr; }
    .band { padding: 80px 0; }
}

/* ---------- PROJECT DETAIL (/projekti/{slug}) ---------- */
.pd-top { padding-top: 140px; overflow: hidden; }
.pd-crumbs { font-size: 13px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.pd-crumbs a { color: var(--dim); text-decoration: none; }
.pd-crumbs a:hover { color: var(--text); }
.pd-head { max-width: 760px; }
.pd-head .lead { margin-top: 16px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.pd-shots { position: relative; margin-top: 64px; padding-right: 150px; }
.pd-browser { margin: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; overflow: hidden; background: #1a1a1d; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.pd-browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.pd-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.pd-browser-bar span { margin-left: 12px; font-size: 12px; color: rgba(255,255,255,.5); background: rgba(255,255,255,.06); padding: 4px 14px; border-radius: 6px; }
.pd-browser img { display: block; width: 100%; height: auto; }
.pd-phone { position: absolute; right: 0; bottom: -40px; width: 230px; margin: 0; padding: 9px; border-radius: 34px; background: #0b0b0d; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.pd-phone img { display: block; width: 100%; height: auto; border-radius: 26px; }

.pd-h2 { font-size: clamp(1.5rem, 2.6vw, 2rem) !important; margin: 4px 0 18px; }
.pd-h2-gap { margin-top: 46px; }
.pd-text { color: var(--dim); font-size: 1.06rem; line-height: 1.7; }
.pd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pd-list li { position: relative; padding-left: 30px; color: var(--dim); line-height: 1.6; }
.pd-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 9px; border-left: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(-45deg); transform-origin: 25% 50%; opacity: .75; }
.pd-link { color: var(--text); text-decoration: none; }
.pd-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 820px) {
    .pd-shots { padding-right: 0; padding-bottom: 0; }
    .pd-phone { position: relative; right: auto; bottom: auto; width: 62%; max-width: 260px; margin: -90px auto 0; }
}
