/* ==========================================================================
   MK Aidat Oy — verkkosivuston tyylit
   Väripaletti johdettu logosta: syvä laivastonsininen + jäänsininen liekki,
   tehostevärinä pinkki.
   ========================================================================== */

:root {
  /* Brändi */
  --navy-900: #1F2733;
  --navy-800: #28303F;
  --navy-700: #33405A;
  --navy:     #3F4D67;
  --navy-400: #6E7C96;

  --ice:      #C1DCE7;
  --ice-soft: #E4F1F7;
  --ice-100:  #F2F8FB;

  --pink:      #D92B68;  /* painikkeet, valkoinen teksti (4.67:1) */
  --pink-600:  #C41E5A;  /* linkit vaalealla (5.71:1) */
  --pink-300:  #FFA0C4;  /* tehoste tummalla (4.56:1) */

  /* Neutraalit */
  --ink:   #1C2430;
  --body:  #4A5568;
  --muted: #6B7688;
  --line:  #E2E8ED;
  --bg:    #FFFFFF;
  --bg-alt:#F5F8FA;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(31,39,51,.06), 0 2px 8px rgba(31,39,51,.05);
  --shadow-md: 0 4px 12px rgba(31,39,51,.07), 0 12px 32px rgba(31,39,51,.08);
  --shadow-lg: 0 8px 24px rgba(31,39,51,.10), 0 24px 60px rgba(31,39,51,.12);

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

/* --- Perusta --------------------------------------------------------------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--pink-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--pink); }

img, svg { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--pink); color: #fff; padding: 10px 18px;
  border-radius: 0 0 8px 8px; font-weight: 600; text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color:#fff; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--bg-alt); }
.section--ice { background: var(--ice-100); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pink-600);
  margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--pink-300); }

.lead { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--body); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* --- Painikkeet ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 650; font-size: 1rem; line-height: 1;
  text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--pink); color: #fff; box-shadow: 0 6px 18px rgba(217,43,104,.30); }
.btn--primary:hover { background: var(--pink-600); color: #fff; box-shadow: 0 10px 26px rgba(217,43,104,.38); }

.btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* --- Ylätunniste ----------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(63,77,103,.96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(194,224,236,.16);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { height: 52px; width: auto; display: block; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { color: #fff; font-weight: 800; font-size: 1.16rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand-tag  { color: var(--ice); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: #E8F2F7; text-decoration: none; font-weight: 550; font-size: .96rem;
  padding: 9px 14px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: rgba(194,224,236,.14); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(194,224,236,.18); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid rgba(194,224,236,.35); border-radius: 999px; padding: 3px;
}
.lang a {
  color: var(--ice); text-decoration: none; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; padding: 5px 10px; border-radius: 999px;
}
.lang a[aria-current="true"] { background: var(--ice); color: var(--navy-800); }
.lang a:not([aria-current="true"]):hover { background: rgba(194,224,236,.18); color:#fff; }

.header-phone {
  color: #fff; text-decoration: none; font-weight: 650; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.header-phone:hover { color: var(--ice); }
.header-phone svg { width: 17px; height: 17px; flex: none; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid rgba(194,224,236,.4);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--ice);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 620px) {
  .brand img { height: 42px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.02rem; }
  .header-inner { gap: 12px; }
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .header-phone span { display: none; }
  .nav {
    position: absolute; inset: 74px 0 auto; flex-direction: column; align-items: stretch;
    background: var(--navy-800); padding: 12px var(--gutter) 24px; gap: 2px;
    border-bottom: 1px solid rgba(194,224,236,.16);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 1.02rem; }
}

/* --- Hero ------------------------------------------------------------------ */

.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 82% 18%, rgba(194,224,236,.16), transparent 62%),
    radial-gradient(620px 420px at 8% 92%, rgba(217,43,104,.20), transparent 66%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 58%, var(--navy-900) 100%);
  color: #E8F2F7;
  padding: clamp(64px, 10vw, 116px) 0 clamp(56px, 8vw, 96px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(194,224,236,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194,224,236,.05) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 72%);
}
.hero > * { position: relative; z-index: 1; }

/* Etusivun hero valokuvan paalla ---------------------------------------- */
.hero--photo {
  background: var(--navy-800);
  padding-block: clamp(60px, 9vw, 116px) clamp(52px, 7vw, 96px);
}
.hero--photo::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("kuvat/hero-aita.jpg");
  background-size: cover; background-position: center 62%;
}
.hero--photo::after {
  /* tummennus: teksti pysyy luettavana myos kirkkaan taivaan paalla */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(31,39,51,.94) 0%, rgba(31,39,51,.88) 56%, rgba(31,39,51,.58) 100%),
    linear-gradient(to top, rgba(31,39,51,.45), transparent 62%);
  mask-image: none; -webkit-mask-image: none;
  background-size: auto; /* kumoaa .hero::after -ruudukon */
}
.hero--photo .wrap > * { max-width: 720px; }
.hero--photo h1 { max-width: 16ch; margin-bottom: .35em; }
.hero--photo .lead { max-width: 48ch; color: #DCE7EF; }
.hero--photo .hero-stats { border-top-color: rgba(194,224,236,.28); max-width: none; }

@media (max-width: 900px) {
  /* kapealla naytolla teksti levittyy koko leveydelle, joten tummennus tasaiseksi */
  .hero--photo::after {
    background: linear-gradient(180deg, rgba(31,39,51,.90) 0%, rgba(31,39,51,.93) 100%);
  }
}
@media (max-width: 700px) {
  .hero--photo::before { background-image: url("kuvat/hero-aita-900.jpg"); }
}

.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--ice); }
.hero p { color: #CFDDE8; }
.hero .lead { max-width: 52ch; margin-bottom: 32px; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 40px;
  padding-top: 28px; border-top: 1px solid rgba(194,224,236,.22);
}
.hero-stats div strong {
  display: block; color: #fff; font-size: 1.4rem; font-weight: 750; letter-spacing: -.02em;
}
.hero-stats div span { font-size: .88rem; color: var(--ice); }

/* Sivun otsikko (alasivut) */
.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-800) 100%);
  color: #CFDDE8; padding: clamp(48px, 7vw, 84px) 0;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -60px; top: -40px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(217,43,104,.28), transparent 68%);
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { max-width: 60ch; color: #CFDDE8; }

.crumbs { font-size: .84rem; color: var(--ice); margin-bottom: 18px; }
.crumbs a { color: var(--ice); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color:#fff; }
.crumbs span { opacity: .55; margin: 0 7px; }

/* --- Kortit ---------------------------------------------------------------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CBD8E0; }
.card h3 { margin-bottom: .45em; }
.card p { font-size: .96rem; }
.card ul { margin: .6em 0 0; padding-left: 1.1em; font-size: .94rem; }
.card li { margin-bottom: .3em; }

.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ice-soft); color: var(--navy); margin-bottom: 18px;
}
.icon svg { width: 26px; height: 26px; }
.icon--pink { background: #FDE7EF; color: var(--pink-600); }

.card-num {
  font-size: .78rem; font-weight: 800; letter-spacing: .1em; color: var(--pink-600);
  display: block; margin-bottom: 10px;
}

/* Tunnusluvut / edut */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--pink); color: #fff; display: grid; place-items: center; margin-top: 2px;
}
.feature-list .tick svg { width: 14px; height: 14px; }
.feature-list strong { color: var(--ink); display: block; }
.feature-list span { font-size: .96rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Tumma osio */
.section--dark {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-800) 100%);
  color: #CFDDE8;
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p,
.section--dark .lead,
.section--dark li,
.section--dark .feature-list span,
.section--dark .card p { color: #CFDDE8; }
.section--dark .feature-list strong { color: #fff; }
.section--dark .section-head .lead { color: #CFDDE8; }
.section--dark .card-num { color: var(--pink-300); }
.section--dark .card {
  background: rgba(255,255,255,.06); border-color: rgba(194,224,236,.20);
  color: #CFDDE8; box-shadow: none;
}
.section--dark .card h3 { color: #fff; }
.section--dark .icon { background: rgba(194,224,236,.16); color: var(--ice); }
.section--dark a { color: var(--pink-300); }

/* CTA-palkki */
.cta-band {
  background: linear-gradient(120deg, var(--pink) 0%, #A8195A 100%);
  color: #fff; border-radius: 20px; padding: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: rgba(255,255,255,.92); margin: 0; max-width: 52ch; }
.cta-band .btn--white { background: #fff; color: var(--pink-600); }
.cta-band .btn--white:hover { background: var(--ice-soft); color: var(--pink-600); }
@media (max-width: 780px) { .cta-band { grid-template-columns: 1fr; } }

/* Roger Technology -jalleenmyyjamerkki */
.dealer-badge {
  width: 100%; max-width: 250px; height: auto; display: block; margin-bottom: 24px;
}
.section--dark .dealer-badge,
.page-hero .dealer-badge {
  background: #fff; border-radius: 10px; padding: 12px 16px; max-width: 262px;
}

/* Logonauha / luottamus */
.trust { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-size: .89rem; font-weight: 600; color: var(--navy);
  text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
a.pill:hover { border-color: var(--pink); color: var(--pink-600); background: #fff; }
.section--dark .pill { background: rgba(255,255,255,.07); border-color: rgba(194,224,236,.22); color: var(--ice); }

/* Taulukko */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background:#fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
@media (max-width: 560px) { table { min-width: 440px; } }
th, td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); color: var(--ink); font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: none; }

/* --- Lomake ---------------------------------------------------------------- */

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 650; color: var(--ink); margin-bottom: 7px; font-size: .93rem; }
.field .req { color: var(--pink-600); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .97rem; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(217,43,104,.15);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.checkbox { display: flex; gap: 11px; align-items: flex-start; font-size: .9rem; }
.checkbox input { width: auto; margin-top: 4px; flex: none; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 16px; }

/* Mihin lomake lahetetaan */
.form-dest {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--ice-100); border: 1px solid #D5E6EE; border-radius: var(--radius-sm);
  padding: 15px 17px; margin: 4px 0 22px; font-size: .93rem; color: var(--body);
}
.form-dest svg { width: 20px; height: 20px; flex: none; color: var(--pink-600); margin-top: 2px; }
.form-dest strong { display: block; color: var(--ink); margin-bottom: 2px; }
.form-dest a { font-weight: 700; text-decoration: none; }
.form-dest a:hover { text-decoration: underline; }

/* Yhteystietolaatikko */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .icon { margin-bottom: 0; width: 44px; height: 44px; }
.contact-list strong { display: block; color: var(--ink); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.contact-list a { font-size: 1.06rem; font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* --- Alatunniste ----------------------------------------------------------- */

.site-footer { background: var(--navy-900); color: #A9B7C6; padding: clamp(48px, 6vw, 72px) 0 32px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #A9B7C6; text-decoration: none; }
.site-footer a:hover { color: var(--ice); text-decoration: underline; }
.footer-brand img { height: 74px; width: auto; margin-bottom: 18px; display: block; border-radius: 10px; }
.footer-brand p { max-width: 34ch; }
.partner-logo {
  display: block; width: 100%; max-width: 168px; height: auto;
  margin-top: 22px; border-radius: 6px;
}
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(194,224,236,.14);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: .85rem; color: #8493A5;
}
