/* ==========================================================================
   JSL Finance OÜ — stylesheet
   Palette: warm paper, ink black, single deep-pine accent.
   ========================================================================== */

:root {
  --paper:      #FBFAF7;
  --paper-warm: #F4F1EA;
  --paper-deep: #EDE9E0;
  --ink:        #0D0E0D;
  --ink-80:     #33352F;
  --ink-60:     #5C5F57;
  --ink-40:     #8B8D85;
  --line:       rgba(13, 14, 13, .13);
  --line-soft:  rgba(13, 14, 13, .07);
  --accent:     #15594A;
  --accent-dk:  #0D3F34;
  --accent-tint:rgba(21, 89, 74, .07);

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

  --wrap: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --head-h: 68px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--paper); }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section { padding-block: clamp(84px, 11vw, 168px); }

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.h2 {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.033em;
  max-width: 17ch;
}

.prose p {
  color: var(--ink-60);
  font-size: clamp(16px, 1.25vw, 18.5px);
  line-height: 1.68;
  max-width: 62ch;
  margin-top: 22px;
}
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- header ---------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--head-h);
  background: rgba(251, 250, 247, .72);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--line-soft); }

.head-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.035em;
  display: inline-flex;
  align-items: baseline;
  gap: .32em;
  white-space: nowrap;
}
.wordmark-jsl { color: var(--accent); }
.wordmark-fin { color: var(--ink); font-weight: 450; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 14.5px;
  color: var(--ink-60);
}
.nav a { transition: color .22s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav-cta {
  color: var(--paper) !important;
  background: var(--ink);
  padding: 8px 17px;
  border-radius: 100px;
  font-weight: 500;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

@media (max-width: 640px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding-inline: 30px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.btn-primary { background: var(--btn-bg); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ---------- hero ---------- */
.hero {
  padding-top: calc(var(--head-h) + clamp(56px, 12vh, 130px));
  padding-bottom: clamp(48px, 7vw, 90px);
}
.hero-eyebrow { margin-bottom: clamp(26px, 4vw, 44px); }

.hero-title {
  font-size: clamp(44px, 9.6vw, 132px);
  line-height: .94;
  font-weight: 600;
  letter-spacing: -0.045em;
  margin-bottom: clamp(40px, 6vw, 76px);
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  padding-bottom: clamp(44px, 7vw, 96px);
}
.hero-lead {
  max-width: 46ch;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink-60);
  letter-spacing: -0.012em;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-rule {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 13.5px;
  color: var(--ink-40);
  letter-spacing: -0.004em;
}
.hero-rule span { position: relative; padding-left: 16px; }
.hero-rule span::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 860px) {
  .hero-foot { grid-template-columns: 1fr; align-items: start; }
  .hero-rule { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- split (about / contact) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(240px, 3fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 110px);
}
.split-aside > .eyebrow { margin-bottom: 30px; }

@media (min-width: 981px) {
  .split-aside { position: sticky; top: calc(var(--head-h) + 56px); align-self: start; }
}
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
}

/* stats */
.stats { display: grid; gap: 30px; }
.stat {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.stat-num {
  display: block;
  font-size: clamp(46px, 5.6vw, 74px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-num-sm { font-size: clamp(38px, 4.4vw, 58px); }
.stat-plus { color: var(--accent); }
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-40);
  max-width: 28ch;
}

/* ---------- section head ---------- */
.section-head { margin-bottom: clamp(48px, 6vw, 84px); }
.section-head-title { max-width: 22ch; }

/* ---------- services ---------- */
.services { background: var(--paper-warm); }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc {
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(26px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  min-height: 268px;
  background: transparent;
  transition: background .35s var(--ease);
}
.svc:hover { background: rgba(255, 255, 255, .6); }

.svc-num {
  position: absolute;
  top: clamp(26px, 3vw, 40px);
  right: clamp(26px, 3vw, 40px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-40);
  opacity: .55;
}
.svc-icon {
  display: block;
  width: 30px; height: 30px;
  color: var(--accent);
  margin-bottom: clamp(34px, 5vw, 54px);
}
.svc-icon svg { width: 100%; height: 100%; }

.svc-title {
  font-size: clamp(17px, 1.4vw, 19.5px);
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: -0.021em;
  margin-bottom: 12px;
  max-width: 24ch;
}
.svc-text {
  font-size: 14.8px;
  line-height: 1.58;
  color: var(--ink-60);
  max-width: 40ch;
}

/* last row fills the empty 8th/9th cells cleanly */
.svc:nth-child(7) { grid-column: span 1; }

@media (max-width: 980px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .svc { min-height: 240px; }
}
@media (max-width: 620px) {
  .svc-grid { grid-template-columns: 1fr; }
  .svc { min-height: 0; }
  .svc-icon { margin-bottom: 26px; }
}

/* ---------- pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(26px, 2.6vw, 38px);
  background: transparent;
  transition: border-color .3s var(--ease), transform .35s var(--ease);
}
.plan:hover { border-color: rgba(13, 14, 13, .28); }
.plan-featured {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.plan-featured:hover { border-color: var(--ink); }

.plan-flag {
  position: absolute;
  top: -11px; left: clamp(26px, 2.6vw, 38px);
  background: var(--accent);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
}

.plan-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  margin-bottom: 22px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  font-size: clamp(38px, 4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plan-from {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-40);
  margin-right: 8px;
}
.plan-featured .plan-from { color: rgba(251, 250, 247, .5); }
.plan-cur { font-size: .62em; font-weight: 500; }
.plan-per {
  font-size: 15px;
  font-weight: 450;
  letter-spacing: -0.01em;
  color: var(--ink-40);
  margin-left: 4px;
}
.plan-featured .plan-per { color: rgba(251, 250, 247, .55); }

.plan-volume {
  margin-top: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-60);
}
.plan-featured .plan-volume {
  color: rgba(251, 250, 247, .68);
  border-bottom-color: rgba(251, 250, 247, .16);
}

.plan-list {
  display: grid;
  gap: 13px;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-80);
}
.plan-featured .plan-list { color: rgba(251, 250, 247, .9); }
.plan-list li { position: relative; padding-left: 26px; }
.plan-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .48em;
  width: 11px; height: 6px;
  border-left: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(-45deg);
}
.plan-featured .plan-list li::before {
  border-color: #6FBFA8;
}

.plan-fit {
  margin-top: auto;
  padding-top: 28px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-40);
}
.plan-featured .plan-fit { color: rgba(251, 250, 247, .55); }

.plan-cta {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.plan-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan-cta-solid {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.plan-cta-solid:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

@media (max-width: 900px) {
  .plans { grid-template-columns: 1fr; gap: 16px; }
  .plan-flag { left: 24px; }
}

.plans-note {
  margin-top: 26px;
  font-size: 14px;
  color: var(--ink-40);
}
.plans-note strong { color: var(--ink); font-weight: 600; }

/* add-ons */
.addons {
  margin-top: clamp(64px, 8vw, 110px);
  border-top: 1px solid var(--line);
  padding-top: clamp(34px, 4vw, 52px);
}
.addons-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: 26px;
}
.addon-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
}
.addon {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.addon dt { color: var(--ink-80); flex: 0 1 auto; }
.addon::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  border-bottom: 1px dotted rgba(13, 14, 13, .26);
  transform: translateY(-3px);
  order: 1;
}
.addon dd {
  order: 2;
  margin: 0;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .addon-list { grid-template-columns: 1fr; }
  .addon { flex-wrap: wrap; }
  .addon::after { display: none; }
  .addon dd { flex-basis: 100%; margin-top: 3px; color: var(--accent); }
}

.pricing-close {
  margin-top: clamp(56px, 7vw, 96px);
  font-size: clamp(20px, 2.5vw, 30px);
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: -0.028em;
  max-width: 24ch;
}

/* ---------- contact ---------- */
.contact { background: var(--paper-warm); }
.contact-title { margin-bottom: 40px; max-width: 12ch; }

.contact-direct { display: grid; gap: 4px; }
.contact-line {
  display: block;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  transition: color .22s var(--ease);
}
.contact-line:hover { color: var(--accent); }
.contact-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: 5px;
}
.contact-value {
  display: block;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  letter-spacing: -0.028em;
}
.contact-meta {
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-40);
  max-width: 30ch;
}

/* ---------- form ---------- */
.form { display: grid; gap: 26px; }

.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.field { display: grid; gap: 8px; }
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-60);
}
.field .req { color: var(--accent); }
.field .opt {
  font-weight: 450;
  letter-spacing: .02em;
  text-transform: none;
  font-size: 12px;
  color: var(--ink-40);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(13, 14, 13, .22);
  border-radius: 0;
  padding: 11px 0;
  font-size: 16.5px;
  letter-spacing: -0.011em;
  transition: border-color .25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 108px; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-40); opacity: .75; }

.field input:hover,
.field textarea:hover,
.field select:hover { border-bottom-color: rgba(13, 14, 13, .42); }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 1.6px;
  margin-bottom: -0.6px;
}
.field input.is-invalid,
.field textarea.is-invalid,
.field select.is-invalid { border-bottom-color: #A3341F; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.select-wrap { position: relative; }
.select-wrap select { padding-right: 28px; cursor: pointer; }
.select-arrow {
  position: absolute;
  right: 2px; top: 50%;
  width: 12px; height: 8px;
  transform: translateY(-50%);
  color: var(--ink-40);
  pointer-events: none;
}

/* hCaptcha widget: reserve its height so the form doesn't jump when it loads */
.field-captcha { min-height: 78px; }
.field-captcha.is-invalid iframe {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn-submit { position: relative; min-width: 186px; }
.btn-submit[disabled] { opacity: .62; cursor: progress; }

.spinner {
  display: none;
  width: 15px; height: 15px;
  border: 1.8px solid rgba(251, 250, 247, .35);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.is-sending .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-privacy {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-40);
  max-width: 30ch;
}

.form-status {
  font-size: 15px;
  line-height: 1.5;
  padding: 14px 18px;
  border-radius: 10px;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-ok {
  background: var(--accent-tint);
  color: var(--accent-dk);
  border: 1px solid rgba(21, 89, 74, .2);
}
.form-status.is-err {
  background: rgba(163, 52, 31, .07);
  color: #8A2B18;
  border: 1px solid rgba(163, 52, 31, .2);
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 40px 48px;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.wordmark-foot { font-size: 17px; }
.foot-links {
  display: flex;
  gap: 24px;
  font-size: 14.5px;
  color: var(--ink-60);
}
.foot-links a:hover { color: var(--accent); }
.foot-copy { font-size: 13.5px; color: var(--ink-40); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 75ms);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
