/* CreditLine Finland – ammattimainen sijoitusilme */
:root {
  --bg-deep: #070b12;
  --bg-dark: #0d1420;
  --bg-elevated: #151d2b;
  --bg-light: #f5f7fa;
  --bg-muted: #e8ecf1;
  --text: #0d1420;
  --text-soft: #4a5568;
  --text-on-dark: #f4f6f8;
  --text-muted-dark: #a8b3c4;
  --accent: #1aa6a0;
  --accent-hover: #148f8a;
  --accent-soft: rgba(26, 166, 160, 0.14);
  --border: rgba(15, 23, 42, 0.08);
  --border-dark: rgba(255, 255, 255, 0.1);
  --header-h: 72px;
  --radius: 4px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(7, 11, 18, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2rem, 720px);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dark);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(7, 11, 18, 0.98);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.logo-footer {
  height: 36px;
  margin-bottom: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a[data-nav] {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a[data-nav]:hover,
.site-nav a[data-nav].is-active {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.06);
}

.header-cta {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-on-dark);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  color: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #041214;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #041214;
}

.btn-ghost {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark);
}

.btn-lg {
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Pages / router */
.page[hidden] {
  display: none !important;
}

.page.is-entering {
  animation: pageIn 0.45s var(--ease);
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero – isoilla ~50vh, pienemmillä lähempänä täyttä korkeutta */
.hero {
  position: relative;
  min-height: clamp(26rem, 65vh, 44rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-on-dark);
}

@media (max-width: 1100px) {
  .hero {
    min-height: clamp(26rem, 68vh, 44rem);
  }
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s var(--ease) infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 18, 0.35) 0%, rgba(7, 11, 18, 0.72) 45%, rgba(7, 11, 18, 0.94) 100%),
    linear-gradient(90deg, rgba(7, 11, 18, 0.75) 0%, rgba(7, 11, 18, 0.25) 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 0 5rem;
  max-width: 720px;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  margin-right: auto;
  width: min(100% - 2rem, 720px);
  animation: heroText 0.8s var(--ease) both;
}

@keyframes heroText {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
  max-width: 14ch;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted-dark);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Page hero (inner pages) */
.page-hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(26, 166, 160, 0.18), transparent 50%),
    linear-gradient(160deg, var(--bg-deep), var(--bg-dark) 60%);
  color: var(--text-on-dark);
  padding: 4rem 0 3.5rem;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--text-muted-dark);
  max-width: 52ch;
  margin: 0;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-light {
  background: var(--bg-light);
}

.section-muted {
  background: var(--bg-muted);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-header {
  max-width: 620px;
  margin-bottom: 2.5rem;
}

.section-header p,
.section p {
  color: var(--text-soft);
}

.section-dark p {
  color: var(--text-muted-dark);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature {
  padding: 1.5rem 0;
  border-top: 2px solid var(--accent);
}

.feature h3 {
  margin-bottom: 0.5rem;
}

.feature p {
  margin: 0;
  font-size: 1rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split.reverse .split-text {
  order: 2;
}

.split-media {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.split-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.split-media:hover img {
  transform: scale(1.04);
}

.checklist {
  margin: 1.25rem 0 1.75rem;
}

.checklist li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.55rem;
  color: var(--text-soft);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

.related-service {
  max-width: 640px;
}

.related-service .eyebrow {
  margin-bottom: 0.5rem;
}

.related-service p {
  margin-bottom: 1.5rem;
}

.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-band h2 {
  margin-bottom: 0.5rem;
}

.cta-band p {
  margin: 0;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.process-step {
  background: #fff;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Areas */
.area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.area-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.area-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.area-body {
  padding: 1.75rem;
}

.area-body h2 {
  font-size: 1.5rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-dl {
  margin: 1.5rem 0;
}

.contact-dl > div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-dl dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.25rem;
}

.contact-dl dd {
  margin: 0;
}

.contact-dl a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.contact-note {
  font-size: 0.95rem;
  color: var(--text-soft);
}

.offer-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-title {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.form-intro {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.form-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #c9d1dc;
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  min-height: 1.4em;
}

.form-status.is-success {
  color: #0f7a52;
}

.form-status.is-error {
  color: #b42318;
}

/* FAQ */
.faq-list {
  margin-top: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0.25rem 0;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 500;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-muted-dark);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-dark);
}

.footer-brand p {
  max-width: 28ch;
  font-size: 0.95rem;
}

.site-footer h3 {
  color: var(--text-on-dark);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--text-muted-dark);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer li {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-seo {
  opacity: 0.7;
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img,
  .page.is-entering,
  .hero-content,
  .split-media img {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .feature-row,
  .process-grid,
  .area-grid,
  .split,
  .contact-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-text {
    order: 0;
  }

  .cta-band-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(7, 11, 18, 0.98);
    border-bottom: 1px solid var(--border-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.25s ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a[data-nav] {
    padding: 0.85rem 0.5rem;
    font-size: 1.05rem;
  }

  .header-cta {
    width: 100%;
  }

  .hero {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    align-items: center;
  }

  .hero-content {
    padding: 3rem 0;
  }

  .hero h1 {
    max-width: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.25rem 0;
  }

  .page-hero {
    padding: 3rem 0 2.5rem;
  }
}
