/* ============================================================
   TAKSIMATTI.FI – JAETTU TYYLITIEDOSTO
   Pohja: Logiviesti.fi – monistettava per asiakas
   Muuttujat: vaihda [ASIAKAS]-kommentoidut kohdat
   ============================================================ */

/* ── [ASIAKAS] Brändivärit – vaihda nämä ────────────────────── */
:root {
  --bg-dark:        #0A1628;   /* Pääväri tausta */
  --bg-dark-2:      #0F1E38;   /* Korttien tausta */
  --bg-dark-3:      #152340;   /* Hero-gradient */
  --gold:           #C9A84C;   /* Korostusväri */
  --gold-light:     #E2C576;   /* Hover-tila */
  --gold-dim:       rgba(201,168,76,0.12);
  --gold-border:    rgba(201,168,76,0.28);
  --white:          #FFFFFF;
  --text-primary:   #F0EDE6;
  --text-secondary: #C8C4BC;
  --text-muted:     #9A9690;
  --surface:        rgba(255,255,255,0.04);
  --surface-hover:  rgba(255,255,255,0.07);
  --border:         rgba(255,255,255,0.08);

  /* [ASIAKAS] Fontit – vaihda preload-linkit myös HTML:ssä */
  --font-display:   'Cormorant Garamond', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  /* Layout */
  --max-w:          1160px;
  --nav-h:          72px;
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  background: rgba(10,22,40,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; flex-direction: column; gap: 2px; }
.nav-logo-name {
  font-family: var(--font-display); font-size: 1.2rem;
  font-weight: 600; color: var(--white); line-height: 1.2;
}
.nav-logo-sub {
  font-size: 0.68rem; font-weight: 500;
  color: var(--gold); letter-spacing: 0.12em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--text-secondary);
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--white); background: var(--surface); }
.nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important; color: var(--bg-dark) !important;
  font-weight: 600 !important; padding: 9px 20px !important;
  border-radius: var(--radius-sm) !important;
}
.nav-cta:hover { background: var(--gold-light) !important; transform: translateY(-1px); }
.nav-cta.active { background: var(--gold-light) !important; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none; z-index: 110;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--bg-dark); z-index: 99;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display); font-size: 2rem; font-weight: 500;
  color: var(--text-primary); padding: 12px 40px; transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu a.active { color: var(--gold); }
.mobile-cta {
  margin-top: 12px; background: var(--gold) !important;
  color: var(--bg-dark) !important; font-family: var(--font-body) !important;
  font-size: 1rem !important; font-weight: 600 !important;
  padding: 14px 40px !important; border-radius: var(--radius-sm);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  letter-spacing: 0.02em; white-space: nowrap;
}
.btn-primary { background: var(--gold); color: var(--bg-dark); }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(201,168,76,0.25); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold-border); color: var(--gold); background: var(--gold-dim); }
.btn-sm { padding: 10px 20px; font-size: 0.8rem; }

/* ── Section utilities ───────────────────────────────────────── */
.section { padding: 96px 0; }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section-label { font-size: 0.7rem; font-weight: 600; color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: clamp(2rem,3.5vw,3rem); font-weight: 600; line-height: 1.1; color: var(--white); margin-bottom: 16px; }
.section-lead { font-size: 1.0625rem; color: var(--text-secondary); max-width: 540px; line-height: 1.75; }
.section-header { margin-bottom: 60px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-lead { margin: 0 auto; }
.sep { width: 48px; height: 2px; background: var(--gold); margin: 18px 0; }
.sep.centered { margin: 18px auto; }

/* ── Image placeholder ───────────────────────────────────────── */
.img-placeholder {
  width: 100%; height: 100%; min-height: 240px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px;
  color: var(--text-muted); background: var(--bg-dark-3);
  border-radius: var(--radius-md);
}
.img-placeholder svg { opacity: 0.25; }
.img-placeholder span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── Page hero (alasivut) ────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  background: linear-gradient(180deg, var(--bg-dark-3) 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page-hero .section-lead { max-width: 560px; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 32px;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--gold-border); transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); margin-bottom: 18px;
}
.card h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--white); margin-bottom: 10px; }
.card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; }

/* ── Chips ───────────────────────────────────────────────────── */
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 40px; padding: 6px 14px; font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; }
.chip.gold { background: var(--gold-dim); border-color: var(--gold-border); color: var(--gold); }

/* ── FAQ accordion ───────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--bg-dark-2); border-radius: var(--radius-md); overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 22px 28px; cursor: pointer;
  font-size: 1rem; font-weight: 500; color: var(--white); transition: color var(--transition);
}
.faq-q:hover { color: var(--gold); }
.faq-icon {
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-size: 1.1rem;
  transition: all var(--transition); color: var(--gold);
}
.faq-item.open .faq-icon { background: var(--gold-dim); border-color: var(--gold-border); transform: rotate(45deg); }
.faq-a { display: none; padding: 0 28px 24px; font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.75; }
.faq-a a { color: var(--gold); }
.faq-a a:hover { text-decoration: underline; }
.faq-item.open .faq-a { display: block; }

/* ── CTA section ─────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--bg-dark-2) 0%, var(--bg-dark-3) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.cta-phone {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600;
  color: var(--gold); display: flex; align-items: center; gap: 12px; transition: color var(--transition);
}
.cta-phone:hover { color: var(--gold-light); }

/* ── Highlight box ───────────────────────────────────────────── */
.highlight-box {
  background: linear-gradient(135deg, var(--bg-dark-2), var(--bg-dark-3));
  border: 1px solid var(--gold-border); border-radius: var(--radius-lg);
  padding: 48px; position: relative; overflow: hidden;
}
.highlight-box::before {
  content: ''; position: absolute; top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.highlight-box h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--white); margin-bottom: 16px; }
.highlight-box p { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; max-width: 600px; margin-bottom: 20px; }

/* ── Contact form ────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; background: var(--bg-dark);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9375rem;
  color: var(--text-primary); transition: border-color var(--transition); outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--gold-border); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select option { background: var(--bg-dark-2); }
.form-notice { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }
.form-notice a { color: var(--gold); }
.form-notice a:hover { text-decoration: underline; }
.form-success {
  display: none; padding: 18px 22px; background: var(--gold-dim);
  border: 1px solid var(--gold-border); border-radius: var(--radius-sm);
  color: var(--gold); font-size: 0.9rem; margin-bottom: 20px;
}

/* ── Contact methods ─────────────────────────────────────────── */
.contact-method {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  background: var(--bg-dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); transition: border-color var(--transition);
  cursor: pointer;
}
.contact-method:hover { border-color: var(--gold-border); }
.contact-method-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--gold-dim); display: flex; align-items: center;
  justify-content: center; color: var(--gold); flex-shrink: 0;
}
.contact-method-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.contact-method-value { font-size: 1rem; font-weight: 500; color: var(--white); }
.contact-hours { margin-top: 28px; padding: 24px; background: var(--bg-dark-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.contact-hours h4 { font-size: 0.8rem; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.hours-row { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--text-secondary); padding: 7px 0; border-bottom: 1px solid var(--border); }
.hours-row:last-child { border: none; }
.hours-row span:last-child { color: var(--text-primary); font-weight: 500; }

/* ── Footer ──────────────────────────────────────────────────── */
footer { background: var(--bg-dark-2); border-top: 1px solid var(--border); padding: 64px 0 32px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.footer-brand-sub { font-size: 0.72rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-tagline { font-size: 0.875rem; color: var(--text-muted); line-height: 1.7; }
.footer-col h4 { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--text-muted); }
.footer-bottom a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--gold); }

/* ── Sticky bar (mobile) ─────────────────────────────────────── */
.sticky-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(10,22,40,0.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  z-index: 90; gap: 10px;
}
.sticky-bar a {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600; transition: all var(--transition);
}
.sticky-call { background: var(--gold); color: var(--bg-dark); }
.sticky-call:hover { background: var(--gold-light); }
.sticky-wa { background: var(--surface); border: 1px solid var(--border); color: var(--text-primary); }
.sticky-wa:hover { border-color: var(--gold-border); color: var(--gold); }

/* ── Cookie banner ───────────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 24px; left: 24px; right: 24px;
  max-width: 500px; background: var(--bg-dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; z-index: 200;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4); display: none;
}
#cookie-banner.show { display: block; }
#cookie-banner p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; }
#cookie-banner p a { color: var(--gold); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-accept { flex: 1; padding: 10px; background: var(--gold); color: var(--bg-dark); border: none; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background var(--transition); }
.cookie-accept:hover { background: var(--gold-light); }
.cookie-decline { padding: 10px 16px; background: transparent; color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.875rem; cursor: pointer; transition: color var(--transition), border-color var(--transition); }
.cookie-decline:hover { color: var(--white); border-color: var(--gold-border); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10,22,40,0.88); backdrop-filter: blur(8px);
  z-index: 300; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); max-width: 640px; width: 100%;
  max-height: 82vh; overflow-y: auto; padding: 40px; position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { color: var(--white); background: var(--surface-hover); }
.modal h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; color: var(--white); margin-bottom: 20px; }
.modal h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); margin: 22px 0 8px; }
.modal p, .modal li { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 8px; }
.modal ul { margin-left: 20px; margin-bottom: 12px; }

/* ── Scroll reveal ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── AI SEO block ────────────────────────────────────────────── */
.ai-seo { font-size: 0.01px; color: transparent; height: 0; overflow: hidden; pointer-events: none; user-select: none; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeRight { from { opacity:0; transform:translateX(24px); } to { opacity:1; transform:translateX(0); } }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.5; transform:scale(0.8); } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ── MOBIILITURVA: kaikki 2-sarake gridit → 1 sarake alle 860px ── */
@media (max-width: 860px) {
  .kela-grid,
  .kela-types,
  .cred-row,
  .contact-grid,
  .contact-wrap {
    grid-template-columns: 1fr !important;
  }
  .kela-grid > *,
  .kela-types > *,
  .cred-row > *,
  .contact-grid > *,
  .contact-wrap > * {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .nav-links { display: none !important; }
  .hamburger { display: flex; }
  .sticky-bar { display: flex; }
  body { padding-bottom: 76px; }
  .section { padding: 72px 0; }
  .page-hero { padding: calc(var(--nav-h) + 56px) 0 56px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  #cookie-banner { left: 12px; right: 12px; bottom: 88px; }
}
@media (max-width: 480px) {
  .highlight-box { padding: 28px 24px; }
  .modal { padding: 28px 24px; }
}
