/* Kingpin web: layout from the Setpilot web, colours and type from the Kingpin 3 app (src/renderer/tokens.css). */
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-cyrillic-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url('/fonts/inter-vietnamese-wght-normal.woff2') format('woff2-variations'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:lang(ja) h1, :lang(ja) h2 { word-break: auto-phrase; }

:root {
  --bg:        #1e1b20;
  --surface:   #2a262c;
  --surface-2: #363138;
  --border:    rgba(255, 255, 255, .08);
  --border-s:  rgba(255, 255, 255, .16);
  --txt:       #f2eff3;
  --txt-2:     #b4aeb6;
  --txt-3:     #8c858f;
  --yellow:    #f5e852;
  --yellow-hover: #fff27a;
  --yellow-14: rgba(245, 232, 82, .14);
  --r:         10px;
  color-scheme: dark;
}

h1, h2, h3 { font-weight: 600; }

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-size: 15px;
  letter-spacing: -0.011em;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ── LAYOUT ── */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 46px; }
@media(max-width:768px) { .wrap { padding: 0 24px; } }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 56px;
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s, backdrop-filter .2s;
}
nav.solid { background: rgba(30, 27, 32, .92); backdrop-filter: blur(20px); border-color: var(--border); }
nav .wrap { width: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.logo img { height: 32px; width: 32px; display: block; }

.nav-center { display: flex; gap: 2px; }
.nav-center a { font-size: 13px; color: var(--txt-2); padding: 5px 12px; border-radius: 6px; letter-spacing: normal; transition: color .15s, background .15s; }
.nav-center a:hover { color: var(--txt); background: rgba(255, 255, 255, .06); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.btn-nav { background: var(--yellow); color: var(--bg); padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; transition: background .15s, transform .15s; }
.btn-nav:hover { background: var(--yellow-hover); transform: translateY(-1px); }

/* ── HERO ── */
.hero { padding-top: 148px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(40px, 3.8vw, 56px); letter-spacing: -0.03em; line-height: 1.02; max-width: 860px; margin-bottom: 20px; }
.hero-sub { font-size: 16px; color: var(--txt-2); line-height: 1.6; max-width: 480px; margin-bottom: 32px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 60px; }

.btn-primary {
  background: var(--yellow); color: var(--bg);
  padding: 9px 16px 9px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  transition: background .15s, transform .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--yellow-hover); transform: translateY(-1px); }
.btn-apple-icon { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.btn-ghost { color: var(--txt-2); font-size: 14px; padding: 10px 4px; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.btn-ghost:hover { color: var(--txt); border-color: var(--border-s); }

/* ── VISUALS ── */
.hero-visual, .feat-img-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 12px 40px rgba(0, 0, 0, .35), 0 40px 100px rgba(0, 0, 0, .45);
}
.hero-img, .feat-img { width: 100%; height: auto; display: block; }
.feat-img-wrap { margin-bottom: 32px; }
@media(max-width: 768px) {
  .hero-visual, .feat-img-wrap { border-radius: 12px 0 0 12px; border-right: none; margin-right: -24px; position: relative; }
  .hero-img, .feat-img { width: 160vw !important; max-width: none !important; }
  .hero-visual::after, .feat-img-wrap::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
    background: linear-gradient(to right, transparent 0%, var(--bg) 70%, var(--bg) 100%);
    pointer-events: none;
  }
}

/* ── FEATURE SECTIONS ── */
.feat-section { padding: 96px 0; border-top: 1px solid var(--border); }
.feat-header { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 48px; align-items: end; }
.feat-header h2 { font-size: clamp(36px, 3vw, 46px); letter-spacing: -0.03em; line-height: 1.05; }
.feat-header p { font-size: 15px; color: var(--txt-2); line-height: 1.6; }
.feat-header p + p { margin-top: 12px; }

.feat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; list-style: none; border-top: 1px solid var(--border); }
.feat-list li { font-size: 14px; color: var(--txt-2); padding: 14px 0 14px 22px; border-bottom: 1px solid var(--border); position: relative; line-height: 1.5; }
.feat-list li::before { content: ''; position: absolute; left: 0; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.feat-list strong { color: var(--txt); font-weight: 600; }

/* ── CTA ── */
.cta-section { padding: 120px 0; border-top: 1px solid var(--border); }
.cta-inner { max-width: 680px; }
.cta-inner h2 { font-size: clamp(38px, 3.4vw, 52px); letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px; }
.cta-inner p { font-size: 16px; color: var(--txt-2); margin-bottom: 36px; line-height: 1.6; max-width: 440px; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ── TEXT PAGES (legal, contact, blog post) ── */
.legal-page { padding: 120px 0 80px; }
.legal-wrap { max-width: 760px; }
.legal-header { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.legal-header h1 { font-size: clamp(32px, 2.6vw, 42px); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 12px; }
.legal-meta { font-size: 13px; color: var(--txt-3); }
.legal-meta a { color: var(--txt-2); }
.legal-meta a:hover { color: var(--txt); }
.legal-cover { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--border); margin-bottom: 40px; }
.legal-body h2 { font-size: clamp(22px, 2vw, 26px); letter-spacing: -0.02em; line-height: 1.2; margin: 44px 0 16px; }
.legal-body h3 { font-size: 18px; letter-spacing: -0.015em; line-height: 1.3; margin: 32px 0 10px; }
.legal-body h4 { font-size: 15px; margin: 24px 0 8px; }
.legal-body > :first-child { margin-top: 0; }
.legal-body p { font-size: 16px; color: var(--txt-2); line-height: 1.75; margin-bottom: 14px; overflow-wrap: break-word; }
.legal-body ul, .legal-body ol { margin: 4px 0 18px; list-style: none; padding: 0; }
.legal-body ol { counter-reset: n; }
.legal-body li { font-size: 16px; color: var(--txt-2); line-height: 1.7; padding: 4px 0 4px 24px; position: relative; }
.legal-body ul > li::before { content: ''; position: absolute; left: 4px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--txt-3); }
.legal-body ol > li { counter-increment: n; }
.legal-body ol > li::before { content: counter(n) '.'; position: absolute; left: 0; color: var(--txt-3); }
.legal-body strong, .legal-body b { color: var(--txt); font-weight: 600; }
.legal-body a:not([class]) { color: var(--txt); border-bottom: 1px solid var(--border-s); transition: border-color .15s; }
.legal-body a:not([class]):hover { border-color: var(--yellow); }
.legal-body img { max-width: 100%; height: auto; display: block; margin: 20px 0; border-radius: var(--r); border: 1px solid var(--border); }
.legal-body blockquote { border-left: 2px solid var(--yellow); padding: 4px 0 4px 18px; margin: 20px 0; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0 20px; border: 1px solid var(--border); }
.legal-body th { text-align: left; font-weight: 600; color: var(--txt); padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.legal-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--txt-2); vertical-align: top; line-height: 1.5; }
.legal-intro { font-size: 16px; color: var(--txt); line-height: 1.7; padding: 16px 20px; background: var(--yellow-14); border: 1px solid rgba(245, 232, 82, .3); border-radius: var(--r); margin-bottom: 32px; }

/* post CTA box */
.post-cta { margin-top: 56px; padding: 28px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.post-cta h2 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 4px; }
.post-cta p { font-size: 14px; color: var(--txt-2); }

/* ── BLOG LIST ── */
.blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); transition: border-color .15s, transform .15s; }
.blog-card:hover { border-color: var(--border-s); transform: translateY(-2px); }
.blog-card-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card h2 { font-size: 18px; letter-spacing: -0.015em; line-height: 1.3; }
.blog-card p { font-size: 14px; color: var(--txt-2); line-height: 1.55; }
.blog-card time { font-size: 12px; color: var(--txt-3); }

/* ── EXTERNAL LINKS ── */
a[target="_blank"]:not(.btn-nav):not(.btn-primary):not(.btn-ghost):not(.logo)::after { content: ' ↗'; font-size: .85em; opacity: .6; }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
footer .wrap { display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-brand-desc { font-size: 13px; color: var(--txt-2); max-width: 260px; line-height: 1.5; }
.footer-cols { display: flex; gap: 80px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title { font-size: 12px; font-weight: 600; color: var(--txt-3); margin-bottom: 2px; }
.footer-col a { font-size: 13px; color: var(--txt-2); transition: color .15s; }
.footer-col a:hover { color: var(--txt); }
/* language switch: the select from the app (tokens.css .kp-select) */
.lang-select { appearance: none; -webkit-appearance: none; margin-top: 12px; min-width: 200px; height: 40px; padding: 0 36px 0 14px; border: 1px solid var(--border); border-radius: var(--r); color: var(--txt); font: 500 14px 'Inter', sans-serif; cursor: pointer; transition: border-color .15s; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b4aeb6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.lang-select:hover { border-color: var(--border-s); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border); padding-top: 20px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--txt-2); transition: color .15s; }
.footer-links a:hover { color: var(--txt); }
footer .copy { font-size: 13px; color: var(--txt-2); }

/* ── MOBILE MENU ── */
.nav-hamburger { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; cursor: pointer; background: none; border: none; padding: 0; color: var(--txt); }
.nav-hamburger svg { display: block; }
.nav-hamburger .icon-close { display: none; }
.nav-hamburger.open .icon-menu { display: none; }
.nav-hamburger.open .icon-close { display: block; }
.mobile-menu { display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 99; flex-direction: column; padding: 24px 24px 40px; overflow-y: auto; }
.mobile-menu.open { display: flex; }
.mobile-menu-links { display: flex; flex-direction: column; gap: 2px; margin-bottom: 32px; }
.mobile-menu-links a { font-size: 17px; color: var(--txt-2); padding: 12px 0; border-bottom: 1px solid var(--border); transition: color .15s; }
.mobile-menu-links a:first-child { border-top: 1px solid var(--border); }
.mobile-menu-links a:hover { color: var(--txt); }
.mobile-menu-cta { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.mobile-menu-cta .btn-primary { justify-content: center; }

/* ── RESPONSIVE ── */
@media(max-width: 960px) {
  .nav-center { display: none; }
  .nav-right .btn-nav { display: none; }
  .nav-hamburger { display: flex; }
  .feat-header { grid-template-columns: 1fr; gap: 20px; }
  .blog-list { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 640px) {
  .hero { padding-top: 100px; padding-bottom: 32px; }
  .hero-cta { margin-bottom: 36px; }
  .feat-section { padding: 64px 0; }
  .feat-list { grid-template-columns: 1fr; }
  .blog-list { grid-template-columns: 1fr; }
  .legal-page { padding-top: 96px; }
}
