/* Kiviki Group — static marketing site.
   Fraunces and Source Sans 3 are self-hosted (SIL OFL). Licenses: assets/fonts/. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../assets/fonts/source-sans-3-latin-italic.woff2") format("woff2");
}

:root {
  --paper: #f3f0e8;
  --paper-deep: #e7e2d6;
  --surface: #faf8f4;
  --ink: #1a1814;
  --ink-soft: #534e46;
  --line: #ddd6c8;
  --teal: #163a42;
  --teal-mid: #1f4e59;
  --cream: #f3f0e8;
  --copper: #8a4630;
  --draft: #6e2c1f;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --header-h: 4.25rem;
  --shadow: 0 20px 40px rgba(22, 58, 66, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img {
  height: auto;
  border: 0;
}

a {
  color: var(--teal-mid);
}

a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  background: var(--surface);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap {
    width: min(1080px, calc(100% - 1.5rem));
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--teal);
  color: var(--cream);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand lang"
    "nav nav";
  gap: 0.35rem 1rem;
  align-items: center;
  min-height: var(--header-h);
  padding: 0.7rem 0 0.85rem;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: #fff;
}

.mark {
  width: 1.75rem;
  height: 1.75rem;
  display: block;
  flex: none;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.05rem;
}

.nav a {
  color: rgba(243, 240, 232, 0.82);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 0.35rem 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 1px;
}

.lang {
  grid-area: lang;
  justify-self: end;
  display: inline-flex;
  border: 1px solid rgba(243, 240, 232, 0.35);
  border-radius: 999px;
  padding: 2px;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  min-width: 2.75rem;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--teal);
}

@media (min-width: 860px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    padding: 0;
  }

  .nav {
    justify-self: end;
    margin-right: 0.75rem;
  }
}

/* Footer */

.site-footer {
  background: var(--teal);
  color: var(--cream);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0 1.5rem;
}

.footer-copy,
.footer-mail {
  margin: 0;
  color: #e4eeef;
  font-size: 0.98rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.footer-nav a,
.footer-mail a {
  color: #fff;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-mail a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.footer-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Type */

.kicker {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
}

.kicker::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 1px;
  margin-top: 0.7rem;
  background: var(--copper);
}

h1,
h2,
.email-display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
}

h2.kicker {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.4vw, 4.75rem);
  line-height: 0.98;
}

.lede {
  margin: 1.15rem 0 0;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.fr-note {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--ink-soft);
}

.page-hero {
  padding: clamp(2.6rem, 6vw, 4.75rem) 0 0.25rem;
}

.section {
  padding: 1.25rem 0 clamp(3rem, 7vw, 5rem);
}

/* Home */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 0;
}

.hero h1 {
  max-width: 11em;
}

.product-grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

@media (min-width: 800px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.5rem 1.45rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: #c9bfb0;
  color: inherit;
}

.card-index {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--copper);
}

.card h2 {
  margin: 1.1rem 0 0.75rem;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card-cta {
  margin-top: 1.6rem;
  font-weight: 600;
  color: var(--teal);
}

.home-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  margin-top: clamp(2.25rem, 6vw, 3.75rem);
  padding: 1.25rem 0 clamp(3rem, 7vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.home-contact p {
  margin: 0;
  color: var(--ink-soft);
}

.home-contact a {
  font-weight: 600;
  color: var(--ink);
}

/* Product pages */

.callout {
  margin: 1.75rem 0 0;
  max-width: 44rem;
  padding: 1.4rem 1.35rem 1.45rem 1.3rem;
  background: #e5eef0;
  border-left: 3px solid var(--teal);
  border-radius: 0 16px 16px 0;
}

.callout p {
  margin: 0;
  max-width: 36rem;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem 2rem;
  align-items: flex-start;
  margin-top: 1.6rem;
}

.action p,
.help {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--teal-mid);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: #cfc6b8;
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

a[data-todo] {
  cursor: not-allowed;
}

.todo-badge {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0.28rem 0.38rem;
  border: 1px solid currentColor;
  border-radius: 4px;
}

.btn-primary .todo-badge {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-ghost .todo-badge {
  color: var(--copper);
  border-color: var(--copper);
}

.feature-list {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  max-width: 68ch;
  border-top: 1px solid var(--line);
}

.feature-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.price-line {
  margin: 1.75rem 0 0;
  font-weight: 600;
}

.shot {
  margin: 1.5rem 0 0;
}

.shot-frame {
  background: #141618;
  border-radius: 16px;
  padding: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: var(--shadow);
}

.shot-frame img {
  display: block;
  width: 100%;
  min-width: 880px;
  height: auto;
}

.shot-frame--video {
  display: flex;
  justify-content: center;
  overflow: hidden;
  background: #0f1214;
}

.shot-frame--video video {
  display: block;
  width: min(100%, 26rem);
  max-height: min(70vh, 42rem);
  height: auto;
  background: #000;
}

.shot-frame--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
}

.shot-frame--logo .product-wordmark {
  width: min(100%, 22rem);
  min-width: 0;
  height: auto;
}

.shot figcaption {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.legal-pointer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  align-items: baseline;
  margin-top: 1.75rem;
  color: var(--ink-soft);
}

.legal-pointer a {
  font-weight: 600;
}

.email-display {
  margin: 1.35rem 0 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.15;
}

.email-display a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.contact-note {
  margin-top: 1rem;
  max-width: 36rem;
  color: var(--ink-soft);
}

/* Legal */

.draft-banner {
  background: var(--draft);
  color: #fff8f3;
  text-align: center;
  padding: 0.95rem 1.25rem;
}

.draft-banner p {
  margin: 0.12rem auto;
  max-width: 46rem;
}

.draft-banner-title {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.prose {
  max-width: 70ch;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.prose h2 {
  margin: 2.4rem 0 0.7rem;
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  line-height: 1.2;
}

.prose h3 {
  margin: 1.45rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
}

.prose p,
.prose li {
  font-size: 1.05rem;
}

.prose p {
  margin: 0.7rem 0 0;
}

.prose ul,
.prose ol {
  margin: 0.7rem 0 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose .lede {
  color: var(--ink);
  font-size: 1.15rem;
}

.note-box {
  margin: 1.1rem 0 0;
  padding: 0.95rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.toc {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem 1rem 1.6rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
}

.toc li {
  margin: 0.2rem 0;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.8rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-weight: 600;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.removed {
  margin-top: 0.8rem;
  padding-left: 1rem;
  border-left: 3px solid var(--paper-deep);
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip,
  .lang {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    display: block;
  }

  .draft-banner {
    background: #fff;
    color: #000;
    border: 2px solid #000;
  }

  a {
    color: #000;
  }

  .card,
  .shot-frame,
  .note-box,
  .callout {
    box-shadow: none;
  }

  .shot-frame--video video {
    max-height: none;
  }
}
