/* ============================================================
   KAREKA — kareka.co
   Editorial design: china blue on warm paper, serif display
   ============================================================ */

:root {
  --blue: #365194;
  --blue-deep: #2a4076;
  --blue-dark: #223462;
  --navy: #101b56;            /* logo mark only */
  --ink: #16181f;
  --mute: #6c6f7a;
  --bg: #faf9f6;
  --bg-soft: #f3f1ea;
  --line: #e2dfd6;
  --line-blue: rgba(255, 255, 255, 0.18);
  --gold: #d99e2b;
  --white: #ffffff;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", sans-serif;
  --font-brand: "Archivo", sans-serif;

  --container: 1240px;
  --header-h: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.small-caps {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-brand);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.logo svg { height: 36px; width: 36px; }

.main-nav { display: flex; align-items: center; gap: 34px; }

.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--mute);
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--mute);
  padding: 8px 4px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-switch:hover { color: var(--blue); border-color: var(--blue); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 110;
  color: var(--ink);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; left: 0; }
.nav-toggle span::after { top: 7px; left: 0; }

body.nav-open .nav-toggle { color: var(--white); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 15px 30px;
  background: var(--blue);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.btn:hover { background: var(--blue-dark); transform: translateY(-2px); }

.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-small { padding: 11px 22px; font-size: 14px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.2s ease;
}

.text-link:hover { color: var(--blue); border-color: var(--blue); gap: 14px; }

.text-link.on-dark { color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.text-link.on-dark:hover { color: var(--white); border-color: var(--white); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 76px) 0 0;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-meta::before { content: ""; width: 44px; height: 1.5px; background: var(--blue); }

.hero h1 {
  font-size: clamp(42px, 5.8vw, 78px);
  color: var(--ink);
  margin-bottom: 30px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--blue);
}

.hero-lead {
  font-size: 19px;
  color: var(--mute);
  max-width: 560px;
  margin-bottom: 42px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }

.hero-visual { position: relative; align-self: stretch; min-height: 520px; }

.hero-panel {
  position: absolute;
  inset: 0 -25vw 0 0;
  background: var(--blue);
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-photo.is-active { opacity: 1; }

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(54, 81, 148, 0.32) 0%, rgba(34, 52, 98, 0.62) 100%);
}

.hero-panel .k-outline {
  position: absolute;
  left: -8%;
  bottom: -14%;
  width: 480px;
  height: 480px;
  opacity: 0.2;
  z-index: 1;
}

.hero-panel .gold-sq, .hero-panel .line-v, .hero-quote { z-index: 1; }

.hero-panel .gold-sq {
  position: absolute;
  left: 46px;
  top: 52px;
  width: 74px;
  height: 74px;
  background: var(--gold);
}

.hero-panel .line-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-quote {
  position: absolute;
  left: 46px;
  bottom: 48px;
  max-width: 340px;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: 21px;
  font-style: italic;
  line-height: 1.45;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-quote.is-active { opacity: 1; }

.hero-quote span {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Reference marquee ---------- */

.refs {
  margin-top: 88px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  background: var(--bg);
}

.refs-label {
  text-align: center;
  margin-bottom: 22px;
}

.marquee { overflow: hidden; position: relative; }

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.marquee-track {
  display: flex;
  align-items: center;
  gap: 76px;
  width: max-content;
  animation: marquee 48s linear infinite;
  padding-right: 76px;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-track img {
  height: 30px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.marquee-track img.tall { height: 42px; }

.marquee-track img:hover { filter: none; opacity: 1; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.refs-note { text-align: center; margin-top: 20px; font-size: 13px; color: var(--mute); }

/* ---------- Section scaffolding ---------- */

.section { padding: 130px 0; }
.section.tight { padding: 110px 0; }

.sec-head {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 72px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}

.sec-no {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--blue);
}

.sec-title {
  font-size: clamp(32px, 4.2vw, 52px);
  color: var(--ink);
  max-width: 720px;
}

.sec-title em { font-style: italic; font-weight: 500; color: var(--blue); }

.sec-lead { margin-top: 18px; font-size: 18px; color: var(--mute); max-width: 640px; }

/* ---------- AI & HR feature section ---------- */

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: start;
}

.photo-frame { position: relative; }

.photo-frame::before {
  content: "";
  position: absolute;
  top: -16px;
  left: -16px;
  width: 84px;
  height: 84px;
  background: var(--gold);
}

.photo-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  object-fit: cover;
}

.photo-frame figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.ai-features { display: grid; }

.ai-feature {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
}

.ai-feature:last-child { border-bottom: 1px solid var(--line); }

.ai-feature .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  color: var(--blue);
  line-height: 1.2;
}

.ai-feature h3 { font-size: 22px; color: var(--ink); margin-bottom: 8px; }

.ai-feature p { font-size: 15.5px; color: var(--mute); }

.ai-note {
  margin-top: 28px;
  font-size: 14.5px;
  color: var(--mute);
  padding-left: 18px;
  border-left: 2px solid var(--gold);
}

/* ---------- About photos ---------- */

.about-photos {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
  margin-bottom: 72px;
}

.about-photos img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* ---------- Services (editorial rows) ---------- */

.svc-list { border-top: 1px solid var(--line); }

.svc-row {
  display: grid;
  grid-template-columns: 90px 1.1fr 1.3fr 60px;
  gap: 36px;
  align-items: start;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
  position: relative;
}

.svc-row:hover { background: var(--white); box-shadow: inset 4px 0 0 var(--blue); }

.svc-row:hover .svc-arrow { transform: translateX(6px); color: var(--blue); }

.svc-no {
  font-family: var(--font-display);
  font-size: 30px;
  font-style: italic;
  color: var(--blue);
  padding-left: 20px;
}

.svc-main h3 { font-size: 27px; margin-bottom: 12px; color: var(--ink); }

.svc-main p { font-size: 15.5px; color: var(--mute); max-width: 380px; }

.svc-tags { display: flex; flex-wrap: wrap; gap: 10px; align-content: start; padding-top: 6px; }

.svc-tags span {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.svc-row:hover .svc-tags span { border-color: #cdd3e4; }

.svc-arrow {
  align-self: center;
  justify-self: end;
  padding-right: 20px;
  color: var(--mute);
  transition: transform 0.25s ease, color 0.25s ease;
}

/* ---------- Why (blue band) ---------- */

.why { background: var(--blue); color: var(--white); padding: 120px 0; }

.why .sec-head { border-top-color: var(--line-blue); margin-bottom: 64px; }
.why .sec-no { color: var(--gold); }
.why .sec-title { color: var(--white); }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }

.why-item { padding: 8px 36px 8px 0; }

.why-item + .why-item { border-left: 1px solid var(--line-blue); padding-left: 36px; }

.why-item .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 44px;
  color: var(--gold);
  display: block;
  margin-bottom: 18px;
  line-height: 1;
}

.why-item h3 { font-size: 20px; margin-bottom: 10px; }

.why-item p { font-size: 14.5px; color: rgba(255, 255, 255, 0.72); }

/* ---------- Process (timeline) ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}

.process-step { position: relative; padding-top: 34px; }

.process-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: -48px;
  height: 1px;
  background: var(--line);
}

.process-step:last-child::before { right: 0; }

.process-step::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 11px;
  height: 11px;
  background: var(--blue);
}

.process-step .step-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 14px;
}

.process-step h3 { font-size: 24px; margin-bottom: 12px; color: var(--ink); }

.process-step p { font-size: 15.5px; color: var(--mute); }

/* ---------- About ---------- */

.about { background: var(--bg-soft); }

.about-statement {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  max-width: 900px;
  margin-bottom: 72px;
}

.about-statement em { font-style: italic; color: var(--blue); }

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}

.about-col .small-caps { color: var(--blue); display: block; margin-bottom: 14px; }

.about-col p { font-size: 16.5px; color: var(--ink); max-width: 460px; }

/* ---------- CTA ---------- */

.cta { background: var(--blue); color: var(--white); padding: 130px 0; position: relative; overflow: hidden; }

.cta .k-outline {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 460px;
  height: 460px;
  opacity: 0.12;
  pointer-events: none;
}

.cta .small-caps { color: rgba(255, 255, 255, 0.6); display: block; margin-bottom: 22px; }

.cta h2 {
  font-size: clamp(36px, 5vw, 64px);
  max-width: 760px;
  margin-bottom: 36px;
  position: relative;
}

.cta h2 em { font-style: italic; font-weight: 500; color: var(--gold); }

.cta-mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 30px);
  font-style: italic;
  color: var(--white);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
  transition: gap 0.25s ease, color 0.2s ease;
  position: relative;
}

.cta-mail:hover { gap: 22px; color: var(--gold); }

/* ---------- Footer ---------- */

.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 72px 0 44px; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 56px; }

.footer-brand p { font-size: 14.5px; color: var(--mute); max-width: 300px; margin-top: 18px; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a, .footer-col li { font-size: 15px; color: var(--ink); }
.footer-col a:hover { color: var(--blue); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--mute);
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 50px;
  height: 50px;
  border: none;
  background: var(--blue);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(54, 81, 148, 0.35);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--blue-dark); transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Legal pages ---------- */

.legal { padding: calc(var(--header-h) + 60px) 0 90px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(32px, 4vw, 46px); color: var(--ink); margin-bottom: 10px; }
.legal .updated { color: var(--mute); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 23px; color: var(--ink); margin: 40px 0 12px; }
.legal p { margin-bottom: 14px; }
.legal ul { margin: 0 0 14px; padding-left: 24px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--blue); text-decoration: underline; }
.legal .site-header { background: rgba(250, 249, 246, 0.94); box-shadow: 0 1px 0 var(--line); }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .ai-grid { grid-template-columns: 1fr; gap: 48px; }
  .photo-frame img { min-height: 320px; max-height: 420px; }
  .about-photos { grid-template-columns: 1fr; }
  .about-photos img { height: 300px; }
  .hero-visual { min-height: 340px; }
  .hero-panel { inset: 0 -32px 0 -32px; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .why-item + .why-item { border-left: none; padding-left: 0; }
  .why-item:nth-child(even) { border-left: 1px solid var(--line-blue); padding-left: 36px; }
  .svc-row { grid-template-columns: 60px 1fr; }
  .svc-tags { grid-column: 2; }
  .svc-arrow { display: none; }
  .process-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-step::before { right: 0; }
  .about-cols { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--blue-dark);
    color: var(--white);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 105;
  }

  .main-nav a { font-size: 22px; color: rgba(255, 255, 255, 0.88); }
  .main-nav a::after { display: none; }
  body.nav-open .main-nav { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .header-actions .btn { display: none; }

  .section, .section.tight, .why, .cta { padding: 80px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-item:nth-child(even) { border-left: none; padding-left: 0; }
  .why-item + .why-item { border-top: 1px solid var(--line-blue); padding-top: 28px; margin-top: 8px; }
  .svc-row { grid-template-columns: 1fr; gap: 20px; padding: 34px 0; }
  .svc-no { padding-left: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
  .to-top { right: 18px; bottom: 18px; width: 46px; height: 46px; }
}
