/* ============================================================
   klokin — shared styles for secondary pages
   Tokens, nav, footer, layout, legal article typography.
============================================================ */
:root {
  --bg:       #eef1fb;
  --bg-2:     #e5eaf7;
  --bg-3:     #d9e0f2;
  --card:     #ffffff;
  --card-2:   #f7f9ff;
  --dark:     #05112b;
  --dark-2:   #0b1d3e;

  --accent:   #4361ee;
  --accent-lt:#667eea;
  --accent-dk:#3451d1;
  --glow:     rgba(67,97,238,.28);
  --glow-dim: rgba(67,97,238,.1);
  --glow-xs:  rgba(67,97,238,.05);

  --text:     #0c1331;
  --muted:    #4a5880;
  --dim:      #8898b8;
  --border:   rgba(10,30,80,.07);
  --border-a: rgba(67,97,238,.22);
  --warn-bg:  #fff7d6;
  --warn-tx:  #7a5a00;

  --fdisp:'Bricolage Grotesque', sans-serif;
  --fbody:'Figtree', sans-serif;
  --fmono:'JetBrains Mono', monospace;
  --r:12px; --r-lg:20px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fbody);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--glow-dim); border-radius: 3px; }
a { text-decoration: none; color: inherit; }

/* ============================================================
   NAV
============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 62px; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(238,241,251,.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
nav.scrolled {
  background: rgba(238,241,251,.97);
  box-shadow: 0 1px 24px rgba(10,30,80,.08);
}
.logo { display: flex; align-items: center; }
.logo img { height: 32px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-btn {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px; border-radius: 8px; font-weight: 700 !important;
  font-size: 14px; transition: all .2s;
}
.nav-btn:hover { background: var(--accent-dk); box-shadow: 0 4px 18px var(--glow); transform: translateY(-1px); }

/* ============================================================
   PAGE HEADER (sub-page hero)
============================================================ */
.page-hero {
  position: relative; overflow: hidden;
  padding: 130px 48px 60px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(10,30,80,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,30,80,.04) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black, transparent);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black, transparent);
}
.page-hero::after {
  content: ''; position: absolute; top: -160px; left: -80px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(67,97,238,.13), transparent 65%);
  filter: blur(80px); pointer-events: none;
}
.page-hero-inner {
  position: relative; z-index: 1;
  max-width: 880px; margin: 0 auto;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); margin-bottom: 18px;
  letter-spacing: .03em;
}
.crumbs a { color: var(--accent); font-weight: 600; transition: color .2s; }
.crumbs a:hover { color: var(--accent-dk); }
.crumbs .sep { color: var(--dim); }
.page-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px;
}
.page-tag::before { content:''; width:16px; height:2px; background: var(--accent); border-radius:1px; }
.page-h1 {
  font-family: var(--fdisp);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 800; line-height: 1.05; letter-spacing: -1.8px;
  color: var(--text); margin-bottom: 18px;
}
.page-lead {
  font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 660px;
}
.page-meta {
  margin-top: 22px; display: flex; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--dim);
}
.page-meta strong { color: var(--muted); font-weight: 600; }

/* ============================================================
   ARTICLE / LEGAL CONTENT
============================================================ */
.page-body {
  padding: 64px 48px 100px;
  background: var(--bg);
}
.article {
  max-width: 820px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 56px 64px;
  box-shadow: 0 2px 8px rgba(10,30,80,.04);
}
.article > * + * { margin-top: 1em; }
.article h2 {
  font-family: var(--fdisp);
  font-size: 26px; font-weight: 800;
  letter-spacing: -.7px; line-height: 1.15;
  margin-top: 2.2em; margin-bottom: .6em;
  color: var(--text);
  padding-top: 8px;
  position: relative;
}
.article h2:first-child { margin-top: 0; padding-top: 0; }
.article h3 {
  font-family: var(--fdisp);
  font-size: 19px; font-weight: 700;
  letter-spacing: -.3px; line-height: 1.3;
  margin-top: 1.8em; margin-bottom: .5em;
  color: var(--text);
}
.article p {
  font-size: 16px; line-height: 1.72; color: var(--muted);
}
.article p strong, .article li strong { color: var(--text); font-weight: 600; }
.article a {
  color: var(--accent); font-weight: 500;
  border-bottom: 1px solid rgba(67,97,238,.25);
  transition: border-color .2s, color .2s;
}
.article a:hover { color: var(--accent-dk); border-bottom-color: var(--accent); }
.article ul, .article ol {
  margin-left: 1.4em;
  color: var(--muted);
  font-size: 16px; line-height: 1.72;
}
.article ul li, .article ol li { margin-bottom: .35em; }
.article ul li::marker { color: var(--accent); }
.article ol li::marker { color: var(--accent); font-weight: 600; }
.article table {
  width: 100%; border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.article thead { background: var(--bg-2); }
.article th {
  text-align: left; padding: 12px 14px;
  font-family: var(--fdisp); font-weight: 700; color: var(--text);
  font-size: 13px; letter-spacing: -.2px;
  border-bottom: 1px solid var(--border);
}
.article td {
  padding: 11px 14px; color: var(--muted);
  border-bottom: 1px solid var(--border); line-height: 1.55;
  vertical-align: top;
}
.article tr:last-child td { border-bottom: none; }
.article code, .article kbd {
  font-family: var(--fmono);
  background: var(--bg-2);
  padding: 2px 6px; border-radius: 4px;
  font-size: 13px; color: var(--text);
  border: 1px solid var(--border);
}
.article blockquote {
  border-left: 3px solid var(--accent);
  background: var(--glow-xs);
  padding: 16px 20px; margin: 1.4em 0;
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--muted); font-style: italic;
}
.article hr {
  border: none; height: 1px;
  background: var(--border); margin: 2em 0;
}
.placeholder {
  display: inline-block;
  background: var(--warn-bg); color: var(--warn-tx);
  padding: 1px 6px; border-radius: 4px;
  font-family: var(--fmono); font-size: 13px;
  border: 1px dashed rgba(122,90,0,.3);
}

/* Meta info block at top of legal articles */
.legal-meta {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 22px;
  margin-bottom: 36px;
  font-size: 14px; color: var(--muted); line-height: 1.7;
}
.legal-meta strong { color: var(--text); font-weight: 600; }
.legal-meta p + p { margin-top: 4px; }

/* TOC sidebar (sticky on desktop) */
.with-toc { display: grid; grid-template-columns: 220px 1fr; gap: 48px; max-width: 1180px; margin: 0 auto; align-items: start; }
.toc {
  position: sticky; top: 88px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 22px 22px;
  box-shadow: 0 2px 8px rgba(10,30,80,.04);
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.toc h4 {
  font-family: var(--fdisp); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin-bottom: 12px;
}
.toc ol { list-style: none; counter-reset: tc; }
.toc li { counter-increment: tc; margin: 6px 0; }
.toc a {
  display: block; font-size: 13px; line-height: 1.4;
  color: var(--muted); padding: 4px 0;
  border-left: 2px solid transparent; padding-left: 10px;
  margin-left: -10px; transition: color .2s, border-color .2s;
}
.toc a::before {
  content: counter(tc) ". ";
  color: var(--dim); font-weight: 600;
}
.toc a:hover { color: var(--text); border-left-color: var(--border-a); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.with-toc .article { padding: 0; background: transparent; border: 0; box-shadow: none; max-width: none; }

/* ============================================================
   CONTACT / ABOUT specific
============================================================ */
.grid-cards {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
  margin: 40px 0;
}
.info-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 28px; transition: all .3s;
  box-shadow: 0 1px 4px rgba(10,30,80,.04);
}
.info-card:hover { border-color: var(--border-a); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(10,30,80,.08); }
.info-ico {
  width: 46px; height: 46px; background: var(--glow-dim); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.info-ico svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.info-card h3 { font-family: var(--fdisp); font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.info-card p { font-size: 14px; line-height: 1.65; color: var(--muted); }
.info-card a.link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-size: 14px; font-weight: 600; color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.info-card a.link:hover { border-bottom-color: var(--accent); }

.about-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px;
  margin: 48px 0;
  align-items: start;
}
.about-text p {
  font-size: 16px; line-height: 1.72; color: var(--muted);
  margin-bottom: 1em;
}
.about-text p strong { color: var(--text); font-weight: 600; }
.about-stats {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: 0 2px 8px rgba(10,30,80,.04);
}
.about-stats h4 {
  font-family: var(--fdisp); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin-bottom: 18px;
}
.about-stats dl { display: flex; flex-direction: column; gap: 14px; }
.about-stats dt { font-size: 12px; color: var(--dim); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .06em; }
.about-stats dd { font-family: var(--fdisp); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -.4px; }

.values {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px;
  margin: 36px 0;
}
.value {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px;
  box-shadow: 0 1px 4px rgba(10,30,80,.04);
}
.value .v-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--glow-dim); color: var(--accent);
  font-family: var(--fdisp); font-weight: 800; font-size: 15px;
  margin-bottom: 14px;
}
.value h4 { font-family: var(--fdisp); font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.value p { font-size: 14px; line-height: 1.65; color: var(--muted); }

.cta-strip {
  background: linear-gradient(135deg, var(--accent), var(--accent-lt));
  border-radius: var(--r-lg); padding: 38px 44px;
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-top: 56px;
  box-shadow: 0 14px 40px rgba(67,97,238,.25);
}
.cta-strip h3 { font-family: var(--fdisp); font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.cta-strip p { font-size: 14px; color: rgba(255,255,255,.85); }
.cta-strip a {
  background: #fff; color: var(--accent);
  padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  transition: all .25s; flex-shrink: 0;
}
.cta-strip a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

/* Contact form */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; margin: 40px 0; align-items: start; }
.contact-form {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: 0 2px 8px rgba(10,30,80,.04);
}
.contact-form h3 { font-family: var(--fdisp); font-size: 20px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 6px; color: var(--text); }
.contact-form p.s { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  font-family: var(--fbody);
  background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 14px; color: var(--text);
  transition: border-color .2s, background .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px var(--glow-xs);
}
.field textarea { resize: vertical; min-height: 110px; }
.field .hint { font-size: 12px; color: var(--dim); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 8px 0 18px; line-height: 1.5; }
.consent input[type="checkbox"] { accent-color: var(--accent); margin-top: 3px; }
.consent a { color: var(--accent); border-bottom: 1px solid rgba(67,97,238,.3); }
.btn-submit {
  background: var(--accent); color: #fff;
  padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .25s;
}
.btn-submit:hover { background: var(--accent-dk); transform: translateY(-1px); box-shadow: 0 8px 22px var(--glow); }
.btn-submit svg { stroke: currentColor; fill: none; }

.contact-side > * + * { margin-top: 28px; }
.contact-block h4 {
  font-family: var(--fdisp); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); margin-bottom: 10px;
}
.contact-block p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.contact-block p strong { color: var(--text); font-weight: 600; }
.contact-block a { color: var(--text); border-bottom: 1px solid var(--border-a); font-weight: 500; }
.contact-block a:hover { color: var(--accent); }

/* ============================================================
   FOOTER
============================================================ */
footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,.06); padding: 64px 48px 40px; }
.foot { max-width: 1200px; margin: 0 auto; }
.foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 32px; }
.foot-brand .fl { display: flex; align-items: center; margin-bottom: 14px; }
.foot-brand .fl img { height: 30px; width: auto; display: block; filter: brightness(0) invert(1); }
.foot-brand p { font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.65; max-width: 260px; }
.foot-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; color: rgba(255,255,255,.8); }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 13px; color: rgba(255,255,255,.4); transition: color .2s; }
.foot-col a:hover { color: rgba(255,255,255,.8); }
.foot-btm { display: flex; justify-content: space-between; align-items: center; }
.foot-copy { font-size: 13px; color: rgba(255,255,255,.3); }
.foot-copy span { color: var(--accent-lt); }
.foot-links { display: flex; gap: 24px; }
.foot-links a { font-size: 13px; color: rgba(255,255,255,.3); transition: color .2s; }
.foot-links a:hover { color: rgba(255,255,255,.55); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media(max-width:1080px) {
  .with-toc { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .toc { margin-bottom: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-cards { grid-template-columns: repeat(2,1fr); }
  .values { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr 1fr; }
}
@media(max-width:768px) {
  nav { padding: 0 20px; }
  .logo img { height: 26px; }
  .nav-links { display: none; }
  .page-hero { padding: 110px 20px 48px; }
  .page-h1 { font-size: clamp(30px, 8vw, 42px); letter-spacing: -1px; }
  .page-lead { font-size: 16px; }
  .page-body { padding: 36px 20px 72px; }
  .article { padding: 30px 22px; border-radius: var(--r); }
  .article h2 { font-size: 22px; margin-top: 1.6em; }
  .article h3 { font-size: 17px; }
  .article table { font-size: 13px; }
  .article th, .article td { padding: 9px 10px; }
  .article ul, .article ol { margin-left: 1.1em; }
  .grid-cards { grid-template-columns: 1fr; }
  .cta-strip { padding: 28px; flex-direction: column; align-items: flex-start; }
  .cta-strip h3 { font-size: 19px; }
  .contact-form { padding: 24px; }
  .legal-meta { padding: 14px 16px; }
  footer { padding: 48px 20px 32px; }
  .foot-top { grid-template-columns: 1fr; gap: 28px; }
  .foot-btm { flex-direction: column; gap: 14px; text-align: center; }
}
