/* Konrai — site styles */
:root {
  --ink: #16131f;
  --ink-soft: #4a4560;
  --muted: #6e6984;
  --paper: #fbf8f3;
  --card: #ffffff;
  --line: #e9e3d8;
  --coral: #ff5a4e;
  --violet: #5b4bff;
  --teal: #12a99b;
  --sun: #ffc53d;
  --shadow: 0 1px 2px rgba(22, 19, 31, .06), 0 12px 32px -12px rgba(22, 19, 31, .18);
  --radius: 20px;
  --maxw: 1160px;
  --head: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f0ff;
    --ink-soft: #c9c4dd;
    --muted: #9c97b3;
    --paper: #100e18;
    --card: #1a1726;
    --line: #2b2740;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 22px/1 var(--head); letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--card); color: var(--ink); }
.nav a.cta { background: var(--ink); color: var(--paper); }
.nav a.cta:hover { background: var(--violet); color: #fff; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 26px; height: 26px; }
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 10px 16px 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 17px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--body); text-decoration: none;
  background: var(--ink); color: var(--paper);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--violet); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -10px var(--violet); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 25%, transparent); }
.hero h1 { font-size: clamp(64px, 11vw, 132px); font-weight: 800; letter-spacing: -0.045em; margin-bottom: .12em; }
.hero h1 .dot { color: var(--coral); }
.tagline { font: 500 clamp(21px, 2.6vw, 28px)/1.3 var(--head); color: var(--ink-soft); max-width: 18em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 520px; width: 100%; justify-self: end; }
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; z-index: -1; }
.blob.a { width: 420px; height: 420px; background: var(--violet); top: -120px; right: -80px; opacity: .25; }
.blob.b { width: 320px; height: 320px; background: var(--coral); bottom: -120px; right: 22%; opacity: .2; }
.blob.c { width: 260px; height: 260px; background: var(--sun); top: 30%; left: -140px; opacity: .2; }
@media (max-width: 860px) {
  .hero { padding: 28px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { justify-self: center; max-width: 420px; order: -1; }
}

/* floating / equalizer animation */
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes pop { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.08); } }
.float-1 { animation: floatY 6s ease-in-out infinite; transform-box: fill-box; }
.float-2 { animation: floatY 7s ease-in-out -2s infinite; transform-box: fill-box; }
.float-3 { animation: floatY 5s ease-in-out -1s infinite; transform-box: fill-box; }
.eq rect { transform-box: fill-box; transform-origin: 50% 100%; animation: eq 1.1s ease-in-out infinite; }
.eq rect:nth-child(2) { animation-delay: -.3s; } .eq rect:nth-child(3) { animation-delay: -.6s; }
.eq rect:nth-child(4) { animation-delay: -.15s; } .eq rect:nth-child(5) { animation-delay: -.45s; }
.eq rect:nth-child(6) { animation-delay: -.75s; } .eq rect:nth-child(7) { animation-delay: -.2s; }
.tile-pop { transform-box: fill-box; transform-origin: center; animation: pop 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 76px; }
.section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.kicker { font: 600 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--coral); margin-bottom: 14px; display: block; }
.section h2 { font-size: clamp(36px, 5vw, 56px); font-weight: 750; }
@media (max-width: 720px) { .section { padding: 64px 0; } }

/* About */
.about { background: var(--card); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: start; }
.about-copy p { font-size: 18px; color: var(--ink-soft); }
.about-copy p:first-of-type::first-letter {
  font: 800 64px/0.8 var(--head); float: left; margin: 6px 10px 0 0; color: var(--violet);
}
.sectors { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: sticky; top: 100px; }
.sectors li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper);
  font: 600 17px/1.2 var(--head);
}
.sectors li span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.sectors li span svg { width: 22px; height: 22px; }
.sectors small { display: block; font: 500 13px/1.3 var(--body); color: var(--muted); margin-top: 2px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .sectors { position: static; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }

/* Solutions */
.solutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sol {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.sol:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sol .art { aspect-ratio: 16 / 10; }
.sol .art svg { width: 100%; height: 100%; }
.sol .body { padding: 24px 24px 28px; }
.sol h3 { font-size: 24px; font-weight: 700; }
.sol p { color: var(--ink-soft); margin: 0; font-size: 16px; }
.sol.featured { grid-column: span 3; display: grid; grid-template-columns: 1.1fr 1fr; }
.sol.featured .art { aspect-ratio: auto; min-height: 300px; }
.sol.featured .body { padding: 40px; align-self: center; }
.sol.featured h3 { font-size: clamp(28px, 3.4vw, 38px); }
.sol.featured p { font-size: 18px; }
.badge { display: inline-block; font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); padding: 7px 11px; border-radius: 999px; margin-bottom: 16px; }
.solutions { grid-template-columns: repeat(2, 1fr); }
.sol.featured { grid-column: span 2; }
@media (max-width: 720px) { .solutions { grid-template-columns: 1fr; } .sol.featured { grid-column: auto; } }
@media (max-width: 860px) { .sol.featured { grid-template-columns: 1fr; } .sol.featured .art { min-height: 220px; } .sol.featured .body { padding: 26px 24px 30px; } }

/* Apps */
.apps-band { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) { .apps-band { background: #1c1830; color: var(--ink); } }
.apps-band .kicker { color: var(--sun); }
.apps-band .section-head p { color: color-mix(in srgb, currentColor 70%, transparent); font-size: 18px; }
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.app-card {
  border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start;
  background: color-mix(in srgb, currentColor 6%, transparent); border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}
.app-icon { width: 96px; height: 96px; border-radius: 24px; overflow: hidden; box-shadow: 0 12px 28px -12px rgba(0,0,0,.6); }
.app-card h3 { font-size: 26px; margin-bottom: .3em; }
.app-card p { color: color-mix(in srgb, currentColor 72%, transparent); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.chips li { font: 500 13px/1 var(--body); padding: 7px 11px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.app-card a.link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; border-bottom: 1.5px solid color-mix(in srgb, currentColor 35%, transparent); padding-bottom: 2px; }
.app-card a.link:hover { border-color: currentColor; }
@media (max-width: 860px) { .apps { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .app-card { grid-template-columns: 1fr; } .app-icon { width: 76px; height: 76px; border-radius: 20px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: stretch; }
.contact-info { display: grid; gap: 14px; align-content: start; }
.info {
  display: flex; gap: 16px; align-items: center; text-decoration: none;
  padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
a.info:hover { border-color: var(--ink); transform: translateX(3px); }
.info span.ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.info span.ic svg { width: 22px; height: 22px; }
.info small { display: block; font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.info strong { font-weight: 600; font-size: 17px; line-height: 1.35; word-break: break-word; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-card h3 { font-size: 26px; margin-bottom: 20px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 18%, transparent); }
.form-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-card { padding: 24px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 36px; font-size: 15px; color: var(--ink-soft); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.site-footer h4 { font: 700 14px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer address { font-style: normal; display: grid; gap: 6px; }
.copy { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 56px 0 28px; }
.legal-hero .crumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.legal-hero .crumb a { text-decoration: none; }
.legal-hero .crumb a:hover { text-decoration: underline; }
.legal-hero h1 { font-size: clamp(38px, 6vw, 60px); font-weight: 800; }
.legal {
  max-width: 760px; margin: 0 auto 88px; padding: 40px clamp(20px, 5vw, 56px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.legal h1 { display: none; }
.legal h2 { font-size: 26px; margin: 1.8em 0 .55em; padding-top: .2em; }
.legal h3 { font-size: 19px; margin: 1.5em 0 .4em; }
.legal h2:first-child, .legal p:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-soft); font-size: 17px; }
.legal strong { color: var(--ink); }
.legal ul { padding-left: 1.2em; margin: 0 0 1.1em; }
.legal li { margin-bottom: .45em; }
.legal li::marker { color: var(--coral); }
.legal a { color: var(--violet); text-underline-offset: 3px; word-break: break-word; }
@media (prefers-color-scheme: dark) { .legal a { color: #a79fff; } }
.legal code { font-size: .9em; background: var(--paper); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 720px) { .legal { border-radius: 0; border-inline: 0; margin-bottom: 56px; } }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound h1 { font-size: clamp(80px, 16vw, 160px); font-weight: 800; letter-spacing: -0.05em; margin: 0; }
.notfound p { color: var(--ink-soft); font-size: 19px; margin-bottom: 28px; }
