/* KlipBash public site: the only stylesheet. No inline styles anywhere: the site's
   Content-Security-Policy allows styles from this file only. The page rules below use the
   theme's roles (var(--ink), var(--surface-2) ...), never colour values of their own. */

/* ---------- Core tokens: type, space, radius, sizes, focus, motion ---------- */
:root {
  --font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 800;
  --display-stretch: 78%;
  --type-display-size: 40px;
  --type-display-line: 40px;
  --type-display-weight: 800;
  --type-display-tracking: -0.01em;
  --type-title-size: 36px;
  --type-title-line: 36px;
  --type-title-weight: 800;
  --type-title-tracking: -0.01em;
  --type-heading-size: 18px;
  --type-heading-line: 22px;
  --type-heading-weight: 700;
  --type-body-size: 14px;
  --type-body-line: 21px;
  --type-body-weight: 400;
  --type-small-size: 12.5px;
  --type-small-line: 18px;
  --type-small-weight: 400;
  --type-label-size: 11px;
  --type-label-line: 14px;
  --type-label-weight: 700;
  --type-data-size: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-chip: 6px;
  --radius-control: 10px;
  --radius-panel: 16px;
  --radius-pill: 999px;
  --size-target: 44px;
  --size-gutter-desktop: 28px;
  --size-gutter-phone: 16px;
  --focus-width: 2px;
  --focus-offset: 2px;
  --motion-fast: 150ms;
  --ease-fast: cubic-bezier(0.2, 0, 0, 1);

  /* This site's own layout widths. */
  --site-max: 1120px;
  --frame-width: 240px;
}

/* ---------- KlipBash light theme (the default) ---------- */
:root {
  color-scheme: light;
  --ground: #F2F3F5;
  --surface-1: #F8F9FB;
  --surface-2: #FFFFFF;
  --surface-3: #E8EAEE;
  --line: #D9DCE3;
  --line-strong: #6F7684;
  --ink: #0C0D10;
  --ink-2: #4A5160;
  --ink-3: #5B6372;
  --accent: #FF7A2E;
  --accent-ink: #0C0D10;
  --accent-text: #A33E05;
  --accent-soft: rgba(255, 122, 46, 0.14);
  --caption: #FFE14D;
  --frame-ground: #0C0D10;
  --frame-card: #FFFFFF;
}

/* ---------- KlipBash dark theme, for visitors whose device is set to dark ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0C0D10;
    --surface-1: #111317;
    --surface-2: #13151A;
    --surface-3: #1B1E25;
    --line: #22262E;
    --line-strong: #6B7382;
    --ink: #F2F3F5;
    --ink-2: #B4BAC5;
    --ink-3: #8A91A0;
    --accent: #FF7A2E;
    --accent-ink: #0C0D10;
    --accent-text: #FF7A2E;
    --accent-soft: rgba(255, 122, 46, 0.14);
    --caption: #FFE14D;
    --frame-ground: #0C0D10;
    --frame-card: #FFFFFF;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: var(--type-body-weight) var(--type-body-size)/var(--type-body-line) var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1 0 auto; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }

h1, h2 {
  font-stretch: var(--display-stretch);
  text-wrap: balance;
}

h1 {
  font: var(--type-display-weight) var(--type-display-size)/var(--type-display-line) var(--font-ui);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--type-display-tracking);
}

h2 {
  font: var(--type-title-weight) var(--type-title-size)/var(--type-title-line) var(--font-ui);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--type-title-tracking);
}

h3 {
  font: var(--type-heading-weight) var(--type-heading-size)/var(--type-heading-line) var(--font-ui);
}

a {
  color: var(--accent-text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

/* The focus ring: the same everywhere, never removed. */
:where(a, button, [tabindex]):focus-visible {
  outline: var(--focus-width) solid var(--ink);
  outline-offset: var(--focus-offset);
}

[id] { scroll-margin-top: var(--space-4); }

.wrap {
  width: 100%;
  max-width: calc(var(--site-max) + 2 * var(--size-gutter-desktop));
  margin: 0 auto;
  padding: 0 var(--size-gutter-phone);
}

@media (min-width: 640px) {
  .wrap { padding: 0 var(--size-gutter-desktop); }
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  z-index: 10;
  left: var(--space-4);
  top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--ground);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-4)));
}

.skip-link:focus { transform: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

/* The KlipBash wordmark, as the web app draws it: the mark on ink, then the name in the display face. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--size-target);
  border-radius: var(--radius-chip);
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--ground);
}

.wordmark-mark svg { display: block; }

.wordmark-name {
  font: var(--display-weight) 22px/1 var(--font-ui);
  font-stretch: var(--display-stretch);
  letter-spacing: 0.01em;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-1);
  margin-right: calc(-1 * var(--space-3));
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-target);
  padding: 0 var(--space-3);
  border-radius: var(--radius-control);
  color: var(--ink-2);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-fast), color var(--motion-fast) var(--ease-fast);
}

.site-nav a:hover {
  background: var(--surface-3);
  color: var(--ink);
}

/* ---------- Buttons (the system's: one filled accent button per view) ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-control);
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--ink);
  font: 700 var(--type-body-size)/1.2 var(--font-ui);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-fast), border-color var(--motion-fast) var(--ease-fast);
}

.button:hover { border-color: var(--ink-3); }

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 800;
}

.button-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  border-color: transparent;
}

/* ---------- First screen ---------- */
.hero { padding: var(--space-8) 0 0; }

.hero-inner {
  display: grid;
  align-items: center;
  gap: var(--space-8);
}

.hero-text { max-width: 600px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font: var(--type-label-weight) var(--type-data-size)/1 var(--font-ui);
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.hero h1 { margin-top: var(--space-4); }

.lead {
  margin-top: var(--space-4);
  max-width: 60ch;
  color: var(--ink-2);
  font-size: var(--type-heading-size);
  line-height: 1.5;
}

.hero .actions { margin-top: var(--space-6); }

.note {
  margin-top: var(--space-4);
  color: var(--ink-2);
  font: var(--type-small-weight) var(--type-small-size)/var(--type-small-line) var(--font-ui);
}

/* A clip, drawn plainly: the 9:16 frame keeps its dark look in both themes. Decorative. */
.frame { display: none; }

.frame-ground {
  fill: var(--frame-ground);
  stroke: var(--line);
  stroke-width: 1;
}

.frame-stop-top { stop-color: var(--frame-card); stop-opacity: 0.2; }
.frame-stop-bottom { stop-color: var(--frame-card); stop-opacity: 0.06; }
.frame-caption rect { fill: var(--frame-card); }
.frame-caption .frame-word-on { fill: var(--caption); }

@media (min-width: 900px) {
  .hero { padding-top: calc(var(--space-8) * 2); }
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) var(--frame-width);
    gap: calc(var(--space-8) * 2);
  }
  .frame {
    display: block;
    width: var(--frame-width);
    height: auto;
  }
}

/* ---------- Sections ---------- */
.section { padding-top: calc(var(--space-8) * 1.5); }

@media (min-width: 900px) {
  .section { padding-top: calc(var(--space-8) * 2.5); }
}

.section-intro {
  margin-top: var(--space-3);
  max-width: 64ch;
  color: var(--ink-2);
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

/* How it works */
.steps {
  list-style: none;
  margin-top: var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.step { padding: var(--space-6); }

.step-number {
  display: grid;
  place-items: center;
  width: var(--space-8);
  height: var(--space-8);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--ground);
  font: var(--display-weight) var(--type-heading-size)/1 var(--font-ui);
  font-stretch: var(--display-stretch);
}

.step h3 { margin-top: var(--space-4); }

.step p {
  margin-top: var(--space-2);
  color: var(--ink-2);
}

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Plans and prices */
.plans {
  list-style: none;
  margin-top: var(--space-6);
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.plan { padding: var(--space-6); }

.price {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
}

.price-amount {
  font: var(--type-display-weight) var(--type-display-size)/var(--type-display-line) var(--font-ui);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--type-display-tracking);
  font-variant-numeric: tabular-nums;
}

.price-period { color: var(--ink-2); }

.plan-facts {
  margin-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.plan-facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}

.plan-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.plan-facts dt { color: var(--ink-2); }

.plan-facts dd {
  font-weight: 700;
  text-align: right;
}

.both {
  margin-top: var(--space-4);
  padding: var(--space-6);
}

.bullets {
  list-style: none;
  margin-top: var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.bullets li {
  position: relative;
  padding-left: var(--space-5);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

.bullets li { max-width: 80ch; }

.after {
  margin-top: var(--space-5);
  color: var(--ink-2);
}

/* Billing, cancellation and refunds */
.terms { margin-top: var(--space-6); }

.terms > div {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--line);
}

.terms > div:first-child { border-top: 0; }

.terms dt { font-weight: 700; }

.terms dd { max-width: 70ch; }

@media (min-width: 640px) {
  .terms > div {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-6);
  }
}

/* Contact */
.contact {
  margin-top: var(--space-6);
  font-style: normal;
}

.contact-list {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.contact-list > div { padding: var(--space-5) var(--space-6); }

.contact-list dt {
  color: var(--ink-3);
  font: var(--type-label-weight) var(--type-label-size)/var(--type-label-line) var(--font-ui);
}

.contact-list dd {
  margin-top: var(--space-2);
  font: var(--type-heading-weight) var(--type-heading-size)/var(--type-heading-line) var(--font-ui);
}

.contact-list dd a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-target);
  overflow-wrap: anywhere;
}

.contact-list .postal {
  font: var(--type-body-weight) var(--type-body-size)/var(--type-body-line) var(--font-ui);
  padding-top: var(--space-1);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: calc(var(--space-8) * 2.5);
  background: var(--surface-1);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  color: var(--ink-2);
  font: var(--type-small-weight) var(--type-small-size)/var(--type-small-line) var(--font-ui);
}

.footer-inner p { max-width: 90ch; }

/* ---------- Page not found ---------- */
.not-found { padding-top: calc(var(--space-8) * 2); }
.not-found .lead { margin-top: var(--space-4); }
.not-found .actions { margin-top: var(--space-6); }

/* ---------- Reduced motion: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
