/* Perkaa.fi — shared stylesheet */

:root {
  --color-bg: #f7f9fb;
  --color-surface: #ffffff;
  --color-border: #e2e8ef;
  --color-text: #1b2733;
  --color-text-muted: #5b6b7c;
  --color-primary: #0b3b5c;
  --color-primary-dark: #082a42;
  --color-accent: #14b8a6;
  --color-accent-dark: #0e9488;
  --color-gold: #f4b942;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(16, 42, 67, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 42, 67, 0.12);
  --container: 1140px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--color-primary-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-top: 2.2em; }
h3 { font-size: 1.15rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }

.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 68ch;
}

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .3em .7em;
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: var(--color-accent-dark);
}
.badge.gold { background: rgba(244, 185, 66, .18); color: #92650a; }

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: .95rem;
  padding: .7em 1.3em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-surface); border-color: var(--color-primary); }
.btn-sm { font-size: .85rem; padding: .5em 1em; }

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-primary-dark);
  letter-spacing: -.01em;
}
.logo span { color: var(--color-accent); }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-primary-dark);
  line-height: 1;
}

.site-nav { display: flex; align-items: center; gap: 1.6em; }
.site-nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--color-primary); text-decoration: none; }
.site-nav a.current { color: var(--color-accent-dark); }
.site-nav .btn { margin-left: .4em; }

@media (max-width: 860px) {
  .nav-toggle-label { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: .5em 20px 1em;
    box-shadow: var(--shadow-lg);
  }
  .site-nav a { padding: .6em 0; width: 100%; border-bottom: 1px solid var(--color-border); }
  .site-nav .btn { margin: .6em 0 0; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* Hero */
.hero {
  padding: 3.2em 0 2.6em;
  background: linear-gradient(180deg, #eef4f7 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}
.hero .badge { margin-bottom: .9em; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5em; align-items: center; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }

.stat-row { display: flex; gap: 2em; margin-top: 1.6em; flex-wrap: wrap; }
.stat { }
.stat .num { font-size: 1.5rem; font-weight: 800; color: var(--color-primary-dark); display: block; }
.stat .label { font-size: .85rem; color: var(--color-text-muted); }

/* Category cards (home) */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3em;
  margin: 2em 0;
}
.category-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6em;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.category-card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(11,59,92,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: .8em;
}
.category-card h3 { margin-top: 0; }
.category-card p { color: var(--color-text-muted); font-size: .95rem; }
.category-card a.card-link { font-weight: 700; font-size: .9rem; }

/* Sections */
section.block { padding: 2.6em 0; }
section.block.alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4em; }
@media (max-width: 760px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.4em 1.6em;
}

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border-radius: var(--radius); border: 1px solid var(--color-border); }
table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  font-size: .95rem;
  min-width: 640px;
}
table.compare th, table.compare td {
  padding: .9em 1em;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
table.compare thead th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  position: sticky;
  top: 0;
}
table.compare tbody tr:nth-child(even) { background: #fbfcfd; }
table.compare tbody tr:hover { background: #f1f6f8; }
table.compare td.brand { font-weight: 700; color: var(--color-primary-dark); white-space: nowrap; }
table.compare td .btn { white-space: nowrap; }

/* Brand profile card (used instead of logos) */
.brand-row {
  display: flex;
  align-items: center;
  gap: .7em;
}
.brand-mark {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .95rem;
}

/* FAQ */
details.faq {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .9em 1.1em;
  margin-bottom: .7em;
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary-dark);
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; float: right; font-size: 1.2rem; color: var(--color-accent-dark); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: .7em; color: var(--color-text-muted); }

/* Callout / disclosure box */
.callout {
  background: #eef4f7;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1.1em 1.3em;
  margin: 1.6em 0;
  font-size: .95rem;
  color: var(--color-text-muted);
}
.callout strong { color: var(--color-text); }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--color-text-muted); margin-bottom: 1em; }
.breadcrumb a { color: var(--color-text-muted); }

/* Footer */
.site-footer {
  background: var(--color-primary-dark);
  color: #c7d4de;
  padding: 3em 0 1.6em;
  margin-top: 3em;
  font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .9em; }
.site-footer a { color: #c7d4de; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-brand .logo { color: #fff; }
.footer-brand .logo span { color: var(--color-accent); }
.footer-brand p { color: #9fb1c0; max-width: 32ch; margin-top: .8em; }
.footer-disclosure {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 2.2em;
  padding-top: 1.6em;
  color: #9fb1c0;
  font-size: .82rem;
  line-height: 1.7;
}
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5em;
  margin-top: 1.4em; padding-top: 1.2em;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #7f93a4; font-size: .8rem;
}

/* Utility */
.mt-0 { margin-top: 0; }
.text-muted { color: var(--color-text-muted); }
.center { text-align: center; }
