/* ============================================================
   KING ADVISORS — Bold & Refined (KORA family, light theme)
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Palette (shared with KORA) */
  --charcoal:    #2F3D46;
  --slate:       #345053;
  --deep-teal:   #547971;   /* deep teal accent */
  --muted-teal:  #547971;   /* deep teal accent */
  --ash:         #CBD1C5;
  --white:       #FFFFFF;

  /* Derived tones */
  --ink:          #232E35;
  --charcoal-700: #3B4A53;
  --text-2:       #5C6B72;   /* secondary body on light */
  --offwhite:     #F6F5F1;
  --offwhite-2:   #EFEEE8;
  --teal-tint:    rgba(84, 121, 113, 0.12);
  --hairline:     rgba(47, 61, 70, 0.10);
  --hairline-2:   rgba(47, 61, 70, 0.16);
  --hairline-dark:rgba(203, 209, 197, 0.16);

  /* Type */
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(4.5rem, 11vh, 9.5rem);
  --radius: 12px;
  --radius-sm: 10px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
::selection { background: var(--muted-teal); color: var(--charcoal); }

/* ---------- Type scale ---------- */
h1, h2, h3 { font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; color: var(--charcoal); }
.display-xl { font-size: clamp(2.9rem, 7.5vw, 6rem); }
.display-l  { font-size: clamp(2.2rem, 5vw, 4rem); }
.display-m  { font-size: clamp(1.7rem, 3.2vw, 2.7rem); }
.em { color: var(--muted-teal); }
.on-dark .em { color: var(--muted-teal); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--deep-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 4.4em; height: 3.9em; flex-shrink: 0;
  background: url("../assets/ka-logo.png") center/contain no-repeat;
}
.eyebrow.on-dark { color: var(--muted-teal); }

/* Logo divider — recurring brand motif */
.crown-rule { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 0 auto; }
.crown-rule::before, .crown-rule::after { content: ""; height: 1px; width: clamp(40px, 12vw, 120px); background: var(--hairline-2); }
.on-dark .crown-rule::before, .dark .crown-rule::after, .on-dark .crown-rule::after { background: var(--hairline-dark); }
.crown-rule i {
  width: 30px; height: 28px; display: inline-block;
  background: url("../assets/ka-logo.png") center/contain no-repeat;
}

.lead { font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.65; color: var(--text-2); }
.on-dark .lead { color: var(--ash); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section.dark { background: var(--charcoal); color: var(--offwhite); }
.section.ink { background: var(--ink); color: var(--offwhite); }
.section.dark h1, .section.dark h2, .section.dark h3,
.section.ink h1, .section.ink h2, .section.ink h3,
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--offwhite); }
.section.soft { background: var(--offwhite); }
.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0;
  padding: 1rem 1.7rem; border-radius: var(--radius-sm);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn .arr { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary { background: var(--charcoal); color: var(--white); }
.btn-primary:hover { background: var(--slate); transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(47,61,70,0.5); }
.on-dark .btn-primary { background: var(--white); color: var(--charcoal); }
.on-dark .btn-primary:hover { background: var(--ash); }

.btn-ghost { background: var(--white); border: 1px solid var(--hairline-2); color: var(--charcoal); }
.btn-ghost:hover { border-color: var(--deep-teal); color: var(--deep-teal); transform: translateY(-2px); }
.on-dark .btn-ghost { background: transparent; border-color: var(--hairline-dark); color: var(--offwhite); }
.on-dark .btn-ghost:hover { border-color: var(--muted-teal); color: var(--muted-teal); }

/* ---------- Trust bullets ---------- */
.bullets { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.bullets li { display: flex; align-items: center; gap: 0.8rem; font-size: 0.98rem; color: var(--text-2); }
.bullets li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-teal); flex-shrink: 0; }
.on-dark .bullets li { color: var(--ash); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  padding-block: 0.75rem;
  border-bottom-color: var(--hairline);
  box-shadow: 0 4px 24px -16px rgba(47,61,70,0.4);
}
.nav-brand { display: flex; align-items: center; gap: 0.8rem; }
.nav-brand img { width: 60px; height: auto; transition: width 0.4s ease; }
.nav.scrolled .nav-brand img { width: 50px; }
.nav-brand .name {
  font-weight: 800; font-size: 1.28rem; color: #B9BCAD;
  letter-spacing: -0.02em; line-height: 1;
}
.nav-brand .name small { display: block; font-size: 0.56rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--deep-teal); margin-top: 5px; }
.nav-links { display: flex; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-size: 0.92rem; font-weight: 600; color: var(--text-2); letter-spacing: -0.01em;
  position: relative; padding-block: 0.3rem; transition: color 0.3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 0; height: 2px;
  background: var(--muted-teal); transition: width 0.35s cubic-bezier(0.2,0.8,0.2,1);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--charcoal); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
/* Open mobile dropdown (dark panel) — light links, teal for selected page */
.nav-links.open a { color: rgba(255,255,255,0.78); }
.nav-links.open a:hover { color: var(--white); }
.nav-links.open a[aria-current="page"] { color: var(--muted-teal); }
.nav-cta {
  font-size: 0.9rem; font-weight: 700; color: var(--white); background: var(--charcoal);
  padding: 0.7rem 1.4rem; border-radius: var(--radius-sm); transition: all 0.35s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--slate); transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--charcoal); transition: 0.3s; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--ash); padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--hairline-dark); }
.footer-brand img { width: 58px; margin-bottom: 1.2rem; }
.footer-brand p { color: var(--muted-teal); max-width: 32ch; font-size: 0.95rem; }
.footer-col h4 { font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--deep-teal); margin-bottom: 1.1rem; }
.footer-col a { display: block; font-size: 0.94rem; font-weight: 500; color: var(--ash); padding-block: 0.4rem; transition: color 0.3s, padding-left 0.3s; }
.footer-col a:hover { color: var(--white); padding-left: 6px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; font-size: 0.82rem; color: var(--deep-teal); flex-wrap: wrap; gap: 1rem; }

/* ---------- Services list on dark ---------- */
.section.dark .svc-list, .section.dark .svc-item { border-color: var(--hairline-dark); }
.section.dark .svc-body h3 { color: var(--offwhite); }
.section.dark .svc-body p { color: var(--ash); }
.section.dark .svc-arrow { color: var(--deep-teal); }
.section.dark .svc-item:hover .svc-arrow { color: var(--muted-teal); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(8rem, 14vh, 11rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(55% 60% at 50% 0%, var(--teal-tint) 0%, transparent 70%),
    linear-gradient(180deg, var(--white) 0%, var(--offwhite) 100%);
}
.page-hero .watermark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(70vw, 560px); opacity: 0.05; pointer-events: none; filter: grayscale(0.25);
}
.page-hero-inner { position: relative; z-index: 2; max-width: 56rem; margin: 0 auto; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); max-width: 18ch; margin: 1.4rem auto 1.2rem; }
.page-hero p.lead { max-width: 54ch; margin: 0 auto; }

/* ---------- Cards (values / features) ---------- */
.card-grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: clamp(1.6rem, 2.6vw, 2.2rem); transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.4s, border-color 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(47,61,70,0.4); border-color: var(--hairline-2); }
.card .num { font-family: var(--mono); font-size: 0.82rem; font-weight: 600; color: var(--deep-teal); }
.card h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); margin: 0.9rem 0 0.6rem; }
.card p { color: var(--text-2); font-size: 0.97rem; }
.section.soft .card { background: var(--white); }

/* ---------- Detailed service blocks ---------- */
.svc-detail { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--hairline); }
.svc-detail:first-of-type { border-top: none; }
.svc-detail .lead-num { font-family: var(--mono); font-size: 0.9rem; color: var(--deep-teal); font-weight: 600; }
.svc-detail h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); margin: 0.7rem 0 1rem; }
.svc-detail .who { font-size: 0.92rem; color: var(--text-2); }
.svc-detail p.body { color: var(--text-2); margin-bottom: 1.4rem; }

/* ---------- KORA feature list ---------- */
.kora-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: 2.5rem; }
.kfeature { padding: 1.4rem 0; border-top: 1px solid var(--hairline); }
.on-dark .kfeature { border-color: var(--hairline-dark); }
.kfeature h4 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.kfeature p { font-size: 0.94rem; color: var(--text-2); }
.on-dark .kfeature p { color: var(--ash); }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.field { margin-bottom: 1.2rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--deep-teal); margin-bottom: 0.5rem; padding-left: 1rem; }
.field label .req { display: none; font-style: normal; color: #c0392b; margin-left: 0.15rem; }
.field.invalid label .req { display: inline; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; }
.field.invalid .pill span { border-color: #c0392b; }
.pill-select { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.pill span {
  display: inline-block; font-family: var(--sans); font-size: 0.92rem; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--hairline-2); border-radius: 100px;
  padding: 0.6rem 1.1rem; cursor: pointer; transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.pill span:hover { border-color: var(--deep-teal); }
.pill input:checked + span { background: var(--deep-teal); border-color: var(--deep-teal); color: var(--white); }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--teal-tint); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--hairline-2); border-radius: var(--radius-sm);
  padding: 0.9rem 1rem; transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--deep-teal); box-shadow: 0 0 0 3px var(--teal-tint);
}
.field textarea { resize: vertical; min-height: 140px; }
.contact-aside .row { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem 0; border-top: 1px solid var(--hairline); }
.contact-aside .row:first-child { border-top: none; }
.contact-aside .row .k { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--deep-teal); min-width: 90px; padding-top: 0.2rem; }
.contact-aside .row .v { font-size: 1rem; color: var(--charcoal); font-weight: 500; }
.contact-aside .row .v span { display: block; color: var(--text-2); font-weight: 400; font-size: 0.92rem; }

/* Temporarily disabled links (KORA app — coming soon) */
.is-disabled { pointer-events: none; cursor: not-allowed; opacity: 0.45; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.85s cubic-bezier(0.2,0.8,0.2,1), transform 0.85s cubic-bezier(0.2,0.8,0.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Decorative ---------- */
.hairline { height: 1px; background: var(--hairline); border: none; }
.on-dark .hairline, .dark .hairline { background: var(--hairline-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .svc-detail { grid-template-columns: 1fr; gap: 1rem; }
  .kora-features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .nav-cta { font-size: 0.8rem; padding: 0.55rem 1rem; }
}
