/*
  KRIVA Design System v3
  ─────────────────────────────────────────────────────────────────────
  Palette extracted from the Kriva K logo:
    Brand Orange:   #E07B2A  (vivid amber-orange)
    Dark ground:    #16110E  (near-black espresso)
    Mid ground:     #241C15  (dark walnut)
    Surface:        #2E2319  (rich umber card)
    Surface hi:     #3A2D1F  (lifted umber)
    Parchment text: #F5EFE7  (warm white)
    Muted text:     #9C8470  (dusty rose-tan)
    Divider:        rgba(255,255,255,0.07)

  This is a DARK, WARM site — mid-range between jet black and milk.
  ─────────────────────────────────────────────────────────────────────
*/

:root {
  --bg:           #16110E;
  --bg-mid:       #241C15;
  --surface:      #2E2319;
  --surface-hi:   #3A2D1F;
  --border:       rgba(255,255,255,0.07);
  --border-warm:  rgba(224,123,42,0.25);

  --brand:        #E07B2A;
  --brand-dim:    rgba(224,123,42,0.15);
  --brand-glow:   rgba(224,123,42,0.35);

  --ink:          #F5EFE7;
  --ink-sec:      #C5B8A8;
  --ink-muted:    #9C8470;

  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Inter', 'DM Sans', sans-serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  --max-w: 1380px;
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-slow: cubic-bezier(0.16, 1, 0.3, 1);

  --section-py: clamp(5rem, 10vw, 9rem);
  --gap-xs:  0.75rem;
  --gap-sm:  1.5rem;
  --gap-md:  2.5rem;
  --gap-lg:  5rem;
  --gap-xl:  9rem;
}

/* ── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
a, button, [role="button"], input, label, select { cursor: none; }
::selection { background: var(--brand); color: #fff; }
img, svg { max-width: 100%; display: block; }

/* ── CUSTOM CURSOR ──────────────────────────────────────────────── */
.k-cursor-dot {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  background: var(--brand); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--spring), height .25s var(--spring), background .25s;
  will-change: transform;
}
.k-cursor-ring {
  position: fixed; top: 0; left: 0; width: 44px; height: 44px;
  border: 1.5px solid var(--brand); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .4s var(--spring), height .4s var(--spring), border-color .4s;
  will-change: transform;
}
body.cursor-hover .k-cursor-dot  { width: 56px; height: 56px; background: var(--brand-dim); }
body.cursor-hover .k-cursor-ring { width: 0; height: 0; border-color: transparent; }
@media (max-width: 768px) {
  .k-cursor-dot, .k-cursor-ring { display: none; }
  body, a, button { cursor: auto; }
}

/* ── LAYOUT ─────────────────────────────────────────────────────── */
.wrap {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 2rem;
}
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 900px) {
  .grid-12, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-12 > *, .grid-3 > *, .grid-2 > * { grid-column: 1 / -1 !important; }
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────── */
.d1 { font-family: var(--font-head); font-size: clamp(3.2rem,7.5vw,7rem); font-weight:500; line-height:1.05; letter-spacing:-0.03em; text-wrap:balance; }
.d2 { font-family: var(--font-head); font-size: clamp(2.4rem,4.5vw,4.5rem); font-weight:500; line-height:1.1;  letter-spacing:-0.025em; text-wrap:balance; }
.d3 { font-family: var(--font-head); font-size: clamp(1.8rem,3vw,3rem);   font-weight:500; line-height:1.15; letter-spacing:-0.02em; text-wrap:balance; }
.body-lg  { font-size: clamp(1.1rem,1.6vw,1.35rem); line-height:1.65; color: var(--ink-sec); }
.body-md  { font-size: clamp(1rem,1.2vw,1.15rem);   line-height:1.65; color: var(--ink-sec); }
.eyebrow  { font-family: var(--font-mono); font-size:.8rem; text-transform:uppercase; letter-spacing:.15em; color:var(--brand); }
.it-brand { font-style:italic; color:var(--brand); }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 1.1rem 2.2rem; text-decoration: none; font-weight: 500;
  position: relative; overflow: hidden; border: 1px solid transparent;
  transition: color .4s var(--spring);
}
.btn::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 100%; height: 0; background: var(--brand);
  transition: height .4s var(--spring); z-index: 0;
}
.btn span { position: relative; z-index: 1; }
.btn svg  { position: relative; z-index: 1; transition: transform .4s var(--spring); }
.btn:hover::after { height: 100%; }
.btn:hover svg { transform: translateX(4px); }

.btn-fill {
  background: var(--brand); color: var(--bg); border-color: var(--brand);
}
.btn-fill::after { background: #fff; }
.btn-fill:hover  { color: var(--bg); }

.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--border-warm);
}
.btn-ghost:hover { color: var(--bg); }

/* ── CARDS ───────────────────────────────────────────────────────── */
.k-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: var(--gap-md);
  transition: transform .6s var(--spring), box-shadow .6s var(--spring), border-color .4s;
  position: relative; overflow: hidden;
}
.k-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 64px -16px rgba(0,0,0,.5);
  border-color: var(--border-warm);
}
.k-card-dark { background: var(--bg-mid); }
.k-card-brand { background: var(--brand); color: var(--bg); }

/* ── NAV ─────────────────────────────────────────────────────────── */
.k-nav {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100; padding: 1.4rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
}
.k-nav.scrolled {
  background: rgba(22,17,14,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.k-nav-logo { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.k-nav-logo img { width: 32px; height: 32px; }
.k-nav-logo-text { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--ink); letter-spacing: -0.04em; }
.k-nav-links { display: flex; gap: 2rem; align-items: center; }
.k-nav-links a { font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-sec); text-decoration: none; transition: color .3s; }
.k-nav-links a:hover { color: var(--brand); }

/* ── SECTION WRAPPER ─────────────────────────────────────────────── */
.section { padding: var(--section-py) 0; }
.section-dark { background: var(--bg-mid); }
.section-brand { background: var(--brand); }

/* ── DIVIDER LINE ────────────────────────────────────────────────── */
.k-divider { width: 100%; height: 1px; background: var(--border); margin: 0; }

/* ── AVATAR ORBIT ────────────────────────────────────────────────── */
.avatar-ring {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center; align-items: center;
}
.avatar-ring img {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--border); object-fit: cover;
  filter: grayscale(20%);
  transition: transform .5s var(--spring), border-color .4s, filter .4s;
}
.avatar-ring img:hover {
  transform: scale(1.15) translateY(-6px);
  border-color: var(--brand);
  filter: none;
}
.avatar-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface-hi); border: 1px solid var(--border);
  border-radius: 999px; padding: .35rem .8rem .35rem .35rem;
}
.avatar-pill img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-pill span { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-sec); }

/* ── FEATURE ITEM ────────────────────────────────────────────────── */
.feat-item {
  display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem;
  align-items: flex-start; padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.feat-icon {
  width: 56px; height: 56px; background: var(--brand-dim);
  border: 1px solid var(--border-warm); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0;
  transition: background .4s, transform .4s var(--spring);
}
.feat-item:hover .feat-icon { background: var(--brand); transform: scale(1.1); }
.feat-title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 500; color: var(--ink); margin-bottom: .4rem; }
.feat-desc  { font-size: 1rem; color: var(--ink-sec); line-height: 1.6; }

/* ── PRICING ─────────────────────────────────────────────────────── */
.price-tag { font-family: var(--font-head); font-size: 3.5rem; line-height: 1; color: var(--ink); }
.price-per { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-muted); margin-left: .5rem; }
.price-list { list-style: none; display: flex; flex-direction: column; gap: .9rem; margin: 1.8rem 0; }
.price-list li { display: flex; align-items: flex-start; gap: .75rem; font-size: .95rem; color: var(--ink-sec); line-height: 1.5; }
.price-list li::before { content: ''; display: inline-block; width: 16px; height: 16px; min-width: 16px; border: 1px solid var(--brand); border-radius: 2px; margin-top: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='%23E07B2A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ── STEP NUMBER ─────────────────────────────────────────────────── */
.step-num {
  font-family: var(--font-head); font-size: 5rem; font-weight: 500;
  color: var(--brand-dim); line-height: 1; letter-spacing: -.04em;
  transition: color .4s;
}
.k-card:hover .step-num { color: var(--brand); }

/* ── SCROLL ANIMATIONS ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translate3d(0, 48px, 0); will-change: opacity, transform; transition: opacity .9s var(--spring), transform 1s var(--spring); }
.reveal.visible { opacity: 1; transform: translate3d(0, 0, 0); }
.reveal-left  { opacity: 0; transform: translate3d(-60px, 0, 0); will-change: opacity, transform; transition: opacity .9s var(--spring), transform 1s var(--spring); }
.reveal-right { opacity: 0; transform: translate3d(60px,  0, 0); will-change: opacity, transform; transition: opacity .9s var(--spring), transform 1s var(--spring); }
.reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translate3d(0, 0, 0); }

.d1 { transition-delay: 0s; }
.dl1 { transition-delay: .1s; }
.dl2 { transition-delay: .2s; }
.dl3 { transition-delay: .3s; }
.dl4 { transition-delay: .4s; }
.dl5 { transition-delay: .5s; }

/* ── NOISE TEXTURE OVERLAY ───────────────────────────────────────── */
.noise::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  background-size: 200px; pointer-events: none; z-index: 1;
}

/* ── HERO BG GLOW ────────────────────────────────────────────────── */
.hero-glow {
  position: absolute; top: -20%; right: -10%;
  width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(circle, rgba(224,123,42,.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── MARQUEE ─────────────────────────────────────────────────────── */
.marquee-track { overflow: hidden; width: 100%; }
.marquee-inner {
  display: flex; gap: 4rem; align-items: center;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee-inner span { font-family: var(--font-head); font-size: clamp(2rem,4vw,3.5rem); color: var(--surface-hi); font-weight: 500; letter-spacing: -.02em; flex-shrink: 0; }
.marquee-inner .m-dot { color: var(--brand); font-style: italic; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── INBOX MOCKUP ────────────────────────────────────────────────── */
.inbox-mock { background: var(--bg-mid); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.inbox-header { padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.inbox-dot { width: 8px; height: 8px; border-radius: 50%; }
.inbox-row { display: flex; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); align-items: center; transition: background .3s; }
.inbox-row:hover { background: var(--surface); }
.inbox-row-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.inbox-row-name { font-size: .875rem; font-weight: 600; color: var(--ink); }
.inbox-row-msg  { font-size: .8rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-badge { font-family: var(--font-mono); font-size: .7rem; padding: .15rem .5rem; border-radius: 999px; }
.badge-ai   { background: var(--brand-dim); color: var(--brand); }
.badge-live { background: rgba(52,199,89,.15); color: #34C759; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.k-footer { background: var(--bg-mid); border-top: 1px solid var(--border); }
.k-footer-wordmark {
  font-family: var(--font-head);
  font-size: clamp(5rem, 18vw, 14rem);
  line-height: .85; letter-spacing: -.06em;
  color: var(--surface-hi); text-align: center;
  padding: var(--gap-xl) 0 var(--gap-md); display: block;
  transition: color .5s; user-select: none;
}
.k-footer-wordmark:hover { color: var(--brand); }
.k-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--gap-lg); padding: var(--gap-lg) 0 var(--gap-md); border-top: 1px solid var(--border); }
@media (max-width: 768px) { .k-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.footer-col-title { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); margin-bottom: 1.25rem; }
.footer-col a { display: block; color: var(--ink-sec); text-decoration: none; font-size: .95rem; margin-bottom: .6rem; transition: color .3s; }
.footer-col a:hover { color: var(--brand); }
.k-footer-bottom { padding: 1.5rem 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.k-footer-bottom p { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .08em; }

/* ── RESPONSIVE NAV & MOBILE TWEAKS ──────────────────────────────── */
.mobile-only { display: none; }
.desktop-only { display: flex; }
.menu-toggle { background: transparent; border: none; color: var(--ink); cursor: pointer; z-index: 1001; padding: 0.5rem; }

.mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: var(--bg); z-index: 99;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
  opacity: 0; pointer-events: none; transition: opacity .4s var(--spring);
}
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-head); font-size: 2rem; color: var(--ink); text-decoration: none;
  transform: translateY(20px); opacity: 0; transition: transform .4s var(--spring), opacity .4s;
}
.mobile-menu.active a { transform: translateY(0); opacity: 1; }
.mobile-menu.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.4s; }

/* Hamburger animation */
.menu-toggle svg line { transition: transform 0.3s, opacity 0.3s; transform-origin: center; }
.menu-open .menu-toggle .line-mid { opacity: 0; }
.menu-open .menu-toggle .line-top { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle .line-bot { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .wrap { padding: 0 1.5rem; }
  .d1 { font-size: clamp(2.5rem, 10vw, 3.5rem) !important; }
  .k-card { padding: 1.5rem !important; }
  .feat-item { grid-template-columns: 1fr; gap: 1rem; text-align: center; }
  .feat-icon { margin: 0 auto; }
  .price-tag { font-size: 3.5rem !important; }
}

/* ── TABLE ───────────────────────────────────────────────────────── */
.k-table { width: 100%; border-collapse: collapse; }
.k-table th { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border); }
.k-table td { padding: 1.1rem 1.25rem; font-size: .95rem; color: var(--ink-sec); border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.k-table td:first-child { color: var(--ink); font-weight: 500; }
.k-table tr:hover td { background: var(--surface); }
.k-table .yes { color: var(--brand); font-weight: 600; }
.k-table .no  { color: var(--ink-muted); }
