/* ============================================================
   Nordic Books Oy — LIGHT THEME (buhgalter.rf style)
   Base language: Finnish (fi). sv / en / uk — JS i18n.js
   ============================================================ */

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Light palette — white bg, blue accent */
  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;
  --bg-card:     #ffffff;
  --bg-input:    #f0f2f5;
  --white:       #ffffff;
  --ink:         #1c1f24;
  --ink-soft:    #5b6470;
  --line:        #e0e4ea;
  --line-soft:   #eceff3;

  /* Accent — blue like buhgalter.rf */
  --primary:     #1b3a6b;
  --primary-hover: #15305a;
  --primary-soft: rgba(27, 58, 107, .06);
  --primary-mid: #2c5aa0;
  --accent:      #ff9900;

  --radius:      10px;
  --shadow-sm:   0 1px 3px rgba(20,30,50,.06);
  --shadow-md:   0 6px 20px rgba(20,30,50,.10);
  --shadow-lg:   0 16px 40px rgba(20,30,50,.15);

  --sans:        'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif:       'Roboto Slab', Georgia, 'Times New Roman', serif;
  --maxw:        1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 2. Layout ---------- */
.container,
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- 3. Header / topbar ---------- */
.topbar {
  background: var(--primary);
  padding: .5rem 0;
  font-size: .82rem;
  color: rgba(255,255,255,.85);
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem .8rem;
}
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  padding-top: .85rem; padding-bottom: .85rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--primary-hover); }

.nav-toggle {
  display: none;
  background: transparent; border: 0;
  cursor: pointer;
  padding: .3rem;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 2px;
  transition: .2s;
}

.main-nav { list-style: none; display: flex; align-items: center; gap: .2rem; }
.main-nav a {
  display: inline-block;
  padding: .45rem .7rem;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.main-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- 4. Hero ---------- */
.hero {
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 50%, #e8eef5 100%);
  padding: 3.5rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.25;
  color: var(--primary);
  margin: 0 0 .8rem;
  letter-spacing: -.01em;
}
.hero .accent { color: var(--accent); }
.hero .lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.hero-cta {
  display: flex; gap: 1rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap;
}

/* ---------- 5. Section ---------- */
section { padding: 3rem 0; }
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: .3rem;
}
.section-head p { color: var(--ink-soft); max-width: 540px; margin: 0 auto; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1.5rem;
  border: 0; border-radius: 6px;
  font-weight: 600; font-size: .95rem;
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(27,58,107,.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(27,58,107,.35);
  color: #fff;
  text-decoration: none;
}
.btn-secondary {
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: var(--line-soft);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.btn-small {
  display: inline-block;
  margin-top: .8rem;
  padding: .45rem .9rem;
  font-size: .85rem;
  text-decoration: none;
}

/* ---------- 7. Department blocks (buhgalter.rf style) ---------- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.dept-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.dept-card:hover { box-shadow: var(--shadow-md); }
.dept-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.dept-card-body { padding: 1.3rem; }
.dept-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: .6rem;
}
.dept-card ul {
  list-style: none;
  margin-bottom: 1rem;
}
.dept-card ul li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: .3rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.dept-card ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.dept-card .btn {
  font-size: .85rem;
  padding: .5rem 1rem;
}
@media (max-width: 880px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dept-grid { grid-template-columns: 1fr; } }

/* ---------- 8. Mini banner grid ---------- */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.banner-mini {
  display: flex; align-items: center; gap: .8rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.banner-mini:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.banner-mini img { width: 48px; height: 48px; border-radius: 8px; }
.banner-mini h4 {
  font-size: .95rem;
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 760px) { .banner-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .banner-grid { grid-template-columns: 1fr; } }

/* ---------- 9. Benefits 3-column (buhgalter.rf style) ---------- */
.benefits-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.benefit-col {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.benefit-col h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: .8rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary-soft);
}
.benefit-col ul { list-style: none; }
.benefit-col ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .5rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.benefit-col ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
@media (max-width: 760px) { .benefits-3col { grid-template-columns: 1fr; } }

/* ---------- 10. Industries (buhgalter.rf style) ---------- */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.industry-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.industry-card:hover { box-shadow: var(--shadow-md); }
.industry-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.industry-card-body { padding: 1.2rem; }
.industry-card h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: .4rem;
}
.industry-card p {
  color: var(--ink-soft);
  font-size: .88rem;
  margin-bottom: .8rem;
}
@media (max-width: 760px) { .industries-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .industries-grid { grid-template-columns: 1fr; } }

/* ---------- 11. Price table ---------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.price-table th,
.price-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.price-table th {
  background: var(--bg-alt);
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.price-table td { color: var(--ink); font-size: .93rem; }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr.highlight { background: var(--primary-soft); }
.price-table tr.highlight td { color: var(--primary); font-weight: 600; }

/* ---------- 12. Lang switch ---------- */
.lang-switch {
  display: inline-flex; gap: 2px;
  background: var(--primary);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  border: 0; background: transparent;
  color: #fff;
  font: 600 11px/1 var(--sans);
  letter-spacing: .04em;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  opacity: .7;
  transition: .15s;
}
.lang-btn:hover { opacity: 1; }
.lang-btn.active {
  background: #fff;
  color: var(--primary);
  opacity: 1;
}
@media (max-width: 760px) { .lang-switch { margin-top: .4rem; } }

/* ---------- 13. Footer ---------- */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.85);
  padding: 2rem 0 1.5rem;
  margin-top: 3rem;
  font-size: .9rem;
}
footer .wrap {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
footer a { color: rgba(255,255,255,.85); }
footer a:hover { color: #fff; text-decoration: none; }
footer h4 {
  color: #fff;
  font-size: .95rem;
  margin-bottom: .6rem;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: .3rem; }
.footer-brand .word {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: .4rem;
}
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .82rem;
  color: rgba(255,255,255,.65);
}
.footer-note { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: .3rem; }

/* ---------- 14. Mobile nav ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    list-style: none;
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding: .5rem 0;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem 1.3rem; }
}

/* ---------- 15. Misc ---------- */
.text-center { text-align: center; }
.muted { color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: .5rem;
}
mark, .mark {
  background: var(--primary-soft);
  color: var(--primary);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-weight: 700;
}
