/* ============================================================
   Aleida — För kandidater. Calm, warm, clear.
   Reuses home-palett tokens, cursor (film.css) and the shared
   header / footer / reveal from about.css. Page specifics here.
   ============================================================ */

/* =========================================================
   1 · HERO — warm, reassuring, with a friendly phone
   ========================================================= */
.kh-hero { position: relative; background: var(--cream); min-height: 90svh; display: flex; align-items: center; overflow: hidden; padding: calc(var(--nav-h) + clamp(56px, 8vw, 104px)) var(--pad) clamp(70px, 9vw, 120px); }
.kh-hero .glow { position: absolute; width: 60vmax; height: 60vmax; right: -14vmax; top: -16vmax; border-radius: 50%; background: radial-gradient(circle, rgba(225,75,71,.16), rgba(225,75,71,.04) 46%, transparent 64%); filter: blur(8px); animation: khGlow 18s ease-in-out infinite alternate; pointer-events: none; }
@keyframes khGlow { from { transform: translate(4%, 4%) scale(.92); } to { transform: translate(-6%, -4%) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .kh-hero .glow { animation: none; } }

.kh-hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.kh-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--straw-deep); font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 26px; white-space: nowrap; }
.kh-eyebrow .tick { width: 26px; height: 1px; background: var(--straw); }
.kh-h1 { margin: 0; font-weight: 600; letter-spacing: -.038em; line-height: 1.02; font-size: clamp(38px, 5vw, 76px); color: var(--ink); max-width: 17ch; text-wrap: balance; opacity: 0; transform: translateY(20px); animation: khSub .95s cubic-bezier(.2,.85,.25,1) .15s both; }
.kh-h1 .em { color: var(--straw); }
@media (prefers-reduced-motion: reduce) { .kh-h1 { animation: none; opacity: 1; transform: none; } }
.kh-sub { margin: clamp(26px, 3vw, 38px) 0 0; max-width: 46ch; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; color: var(--graphite); text-wrap: pretty; opacity: 0; transform: translateY(16px); animation: khSub .9s ease .5s both; }
@keyframes khSub { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kh-sub { animation: none; opacity: 1; transform: none; } }
.kh-cta { margin-top: clamp(30px, 3.5vw, 44px); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; opacity: 0; animation: khSub .9s ease .66s both; }
.kh-meta { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--stone); }
.kh-meta .clock { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--stone); position: relative; }
.kh-meta .clock::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 1px; background: var(--stone); transform-origin: left; transform: rotate(-45deg); }

/* friendly phone, gently floating */
.kh-phone-wrap { display: flex; justify-content: center; opacity: 0; transform: translateY(26px) rotate(-3deg); animation: khPhone 1s cubic-bezier(.2,.8,.2,1) .35s both; }
@keyframes khPhone { to { opacity: 1; transform: translateY(0) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .kh-phone-wrap { animation: none; opacity: 1; transform: rotate(-3deg); } }
.kh-phone { position: relative; width: clamp(236px, 22vw, 268px); background: linear-gradient(155deg, #2A2620, #0E0C0B); border-radius: 46px; padding: 6px; box-shadow: 0 50px 100px -34px rgba(26,24,20,.5), inset 0 0 0 1px rgba(250,247,242,.1); animation: khFloat 6s ease-in-out infinite; }
.kh-phone::before { content: ""; position: absolute; right: -2px; top: 112px; width: 3px; height: 58px; border-radius: 0 2px 2px 0; background: #0E0C0B; }
.kh-phone::after { content: ""; position: absolute; left: -2px; top: 94px; width: 3px; height: 30px; border-radius: 2px 0 0 2px; background: #0E0C0B; box-shadow: 0 42px 0 #0E0C0B; }
@keyframes khFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .kh-phone { animation: none; } }
.kh-screen { background: var(--cream); border-radius: 40px; overflow: hidden; display: flex; flex-direction: column; min-height: 506px; }
.kh-status { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px 0; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.kh-batt { width: 22px; height: 11px; border-radius: 3px; border: 1.5px solid var(--ink); position: relative; }
.kh-batt::before { content: ""; position: absolute; inset: 1.5px; right: 5px; background: var(--ink); border-radius: 1px; }
.kh-batt::after { content: ""; position: absolute; right: -3px; top: 3px; bottom: 3px; width: 1.5px; background: var(--ink); border-radius: 1px; }
.kh-island { width: 84px; height: 24px; background: #0E0C0B; border-radius: 14px; margin: 8px auto 2px; }
.kh-ph-top { display: flex; align-items: center; gap: 9px; padding: 16px 16px 13px; border-bottom: 1px solid var(--border); }
.kh-ph-top .mk { width: 28px; height: 28px; border-radius: 8px; background: rgba(225,75,71,.1); display: grid; place-items: center; }
.kh-ph-top .nm { font-size: 14px; font-weight: 600; color: var(--ink); }
.kh-ph-top .st { margin-left: auto; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--straw-deep); display: inline-flex; align-items: center; gap: 5px; }
.kh-ph-top .st .d { width: 6px; height: 6px; border-radius: 50%; background: var(--straw); }
.kh-chat { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; justify-content: flex-start; }
.kh-bub { max-width: 84%; padding: 11px 14px; font-size: 13px; line-height: 1.42; border-radius: 16px; }
.kh-bub.ai { align-self: flex-start; background: var(--soft); color: var(--ink); border-bottom-left-radius: 5px; }
.kh-bub.me { align-self: flex-end; background: var(--straw); color: var(--cream); border-bottom-right-radius: 5px; }
/* JS-driven typing chat (hero phone) */
.kh-chat.live .kh-bub { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s cubic-bezier(.2,.7,.2,1); }
.kh-chat.live .kh-bub.show { opacity: 1; transform: none; }
.kh-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--soft); border-radius: 16px; border-bottom-left-radius: 5px; }
.kh-typing.me-side { align-self: flex-end; background: var(--straw); border-bottom-left-radius: 16px; border-bottom-right-radius: 5px; }
.kh-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--stone); animation: khDot 1.2s infinite ease-in-out; }
.kh-typing.me-side i { background: rgba(250,247,242,.85); }
.kh-typing i:nth-child(2) { animation-delay: .18s; }
.kh-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes khDot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.kh-ph-bar { padding: 10px 14px 16px; }
.kh-ph-bar .box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 22px; padding: 10px 10px 10px 15px; color: var(--stone); font-size: 12px; }
.kh-ph-bar .box .send { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-size: 12px; }

@media (max-width: 880px) {
  .kh-hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .kh-phone-wrap { order: -1; }
}

/* =========================================================
   2 · HUR DET FUNKAR — vertical timeline, draws as you scroll
   ========================================================= */
.kh-how { position: relative; overflow: hidden; background: var(--ink); padding: clamp(82px, 11vw, 150px) var(--pad); }
.kh-how::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(225,75,71,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(225,75,71,.13) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(130% 110% at 50% 40%, #000 34%, transparent 84%); -webkit-mask-image: radial-gradient(130% 110% at 50% 40%, #000 34%, transparent 84%); }
.kh-how-head, .kh-steps { position: relative; z-index: 2; }
.kh-how-head { max-width: var(--maxw); margin: 0 auto clamp(48px, 6vw, 84px); }
.kh-how-head .eyebrow { color: #FF8A6A; white-space: nowrap; }
.kh-how-head .eyebrow .tick { background: var(--straw); }
.kh-how-head h2 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 54px); font-weight: 600; letter-spacing: -.03em; line-height: 1.0; color: var(--cream); max-width: 16ch; }

.kh-steps { position: relative; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(60px, 8vw, 116px); }
/* the connector line */
.kh-steps::before { content: ""; position: absolute; left: 27px; top: 18px; bottom: 18px; width: 2px; background: rgba(250,247,242,.16); }
.kh-steps::after { content: ""; position: absolute; left: 27px; top: 18px; width: 2px; height: var(--draw, 0); background: var(--straw); }
.kh-steps.drawn::after { height: var(--draw, 0); }
@media (prefers-reduced-motion: reduce) { .kh-steps.drawn::after { transition: none; } }

.kh-step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.kh-step .dot { position: relative; z-index: 2; width: 56px; height: 56px; border-radius: 50%; background: #211d18; border: 1.5px solid rgba(250,247,242,.22); display: grid; place-items: center; font-family: var(--mono); font-size: 15px; font-weight: 500; color: rgba(250,247,242,.6); transition: border-color .6s ease, color .6s ease, background .6s ease; }
.kh-step.in .dot { border-color: var(--straw); color: var(--cream); background: var(--straw); }
.kh-step .body { padding-top: 6px; }
.kh-step .body h3 { margin: 0 0 12px; font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.02em; color: var(--cream); }
.kh-step .body p { margin: 0; font-size: clamp(16px, 1.35vw, 18px); line-height: 1.6; color: rgba(250,247,242,.72); max-width: 50ch; text-wrap: pretty; }
.kh-step .demo { margin-top: 22px; }

/* step 2 mini chat (animates when the step reveals) */
.kh-mini { display: flex; flex-direction: column; gap: 9px; max-width: 420px; padding: 18px; background: rgba(250,247,242,.05); border: 1px solid rgba(250,247,242,.12); border-radius: 16px; }
.kh-mini .b { max-width: 86%; padding: 10px 13px; font-size: 13.5px; line-height: 1.42; border-radius: 15px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.kh-step.in .kh-mini .b { opacity: 1; transform: none; }
.kh-mini .b.ai { align-self: flex-start; background: rgba(250,247,242,.09); color: var(--cream); border-bottom-left-radius: 5px; }
.kh-mini .b.me { align-self: flex-end; background: var(--straw); color: var(--cream); border-bottom-right-radius: 5px; }
.kh-step.in .kh-mini .b:nth-child(2) { transition-delay: .25s; }
.kh-step.in .kh-mini .b:nth-child(3) { transition-delay: .5s; }

/* step 3 feedback chips */
.kh-fb { display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; }
.kh-fb > span { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--cream); background: rgba(250,247,242,.06); border: 1px solid rgba(250,247,242,.14); border-radius: 30px; padding: 9px 16px 9px 11px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.kh-fb > span .ic { width: 18px; height: 18px; border-radius: 50%; background: var(--straw); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kh-fb > span .ic svg { width: 11px; height: 11px; display: block; }
.kh-step.in .kh-fb > span:nth-child(1) { transition-delay: .15s; }
.kh-step.in .kh-fb > span:nth-child(2) { transition-delay: .3s; }
.kh-step.in .kh-fb > span:nth-child(3) { transition-delay: .45s; }
.kh-step.in .kh-fb > span { opacity: 1; transform: none; }

@media (max-width: 600px) {
  .kh-step { grid-template-columns: 44px 1fr; gap: 18px; }
  .kh-step .dot { width: 44px; height: 44px; font-size: 13px; }
  .kh-steps::before, .kh-steps::after { left: 21px; }
}

/* =========================================================
   3 · VANLIGA FRÅGOR — accordion
   ========================================================= */
.kh-faq { background: var(--cream); padding: clamp(82px, 11vw, 150px) var(--pad); }
.kh-faq-inner { max-width: 880px; margin: 0 auto; }
.kh-faq-head { text-align: center; margin-bottom: clamp(40px, 5vw, 66px); }
.kh-faq-head .eyebrow { justify-content: center; color: var(--straw-deep); white-space: nowrap; }
.kh-faq-head h2 { margin: 14px 0 0; font-size: clamp(30px, 4vw, 54px); font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.kh-acc { border-top: 1px solid var(--border); }
.kh-item { border-bottom: 1px solid var(--border); }
.kh-q { width: 100%; background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 20px; padding: clamp(22px, 2.6vw, 30px) 4px; text-align: left; font-family: var(--sans); font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.kh-q .plus { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border); position: relative; transition: border-color .25s ease, background .25s ease; }
.kh-q .plus::before, .kh-q .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink); border-radius: 2px; transition: transform .3s cubic-bezier(.2,.7,.2,1), background .25s ease; }
.kh-q .plus::before { width: 13px; height: 1.8px; transform: translate(-50%, -50%); }
.kh-q .plus::after { width: 1.8px; height: 13px; transform: translate(-50%, -50%); }
.kh-item.open .kh-q .plus { border-color: var(--straw); background: var(--straw); }
.kh-item.open .kh-q .plus::before, .kh-item.open .kh-q .plus::after { background: var(--cream); }
.kh-item.open .kh-q .plus::after { transform: translate(-50%, -50%) scaleY(0); }
.kh-q:hover .plus { border-color: var(--stone); }
.kh-a { overflow: hidden; max-height: 0; transition: max-height .4s cubic-bezier(.3,.6,.3,1); }
.kh-item.open .kh-a { max-height: 240px; }
.kh-a p { margin: 0; padding: 0 56px clamp(24px, 2.6vw, 30px) 4px; font-size: clamp(16px, 1.4vw, 18px); line-height: 1.6; color: var(--graphite); text-wrap: pretty; }
@media (prefers-reduced-motion: reduce) { .kh-a { transition: none; } }
