/* Karmatica's website. Tokens mirror the app (V1_PLAN §3). */

@font-face {
  font-family: 'Comfortaa';
  src: url('/assets/fonts/comfortaa-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --border: #e6eef6;
  --text: #0b1f4b;
  --text-muted: #52607a;
  --action: #0063d6;
  --text-on-action: #ffffff;
  --success: #007a68;
  --halo-one: #e8f6ff;
  --pill-bg: #e8f6ff;
  --tint-health: #ddfaf4;
  --tint-fitness: #e8f6ff;
  --tint-betterment: #ddf6ff;
  --shadow: 0 10px 30px rgba(11, 31, 75, 0.08);

  --font-display: 'Comfortaa', 'Varela Round', system-ui, sans-serif;
  --font-body:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --radius-card: 22px;
  --radius-tile: 12px;
  --gutter: 16px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071b45;
    --surface: #0b1f4b;
    --border: rgba(169, 187, 218, 0.16);
    --text: #ffffff;
    --text-muted: #a9bbda;
    --action: #5db1ff;
    --text-on-action: #071b45;
    --success: #4fe3c9;
    --halo-one: rgba(0, 123, 255, 0.18);
    --pill-bg: rgba(93, 177, 255, 0.16);
    --tint-health: rgba(0, 230, 199, 0.16);
    --tint-fitness: rgba(0, 123, 255, 0.22);
    --tint-betterment: rgba(0, 213, 255, 0.16);
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--action);
}

:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Header */

.site-header {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand img {
  width: 168px;
}

.pill {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

/* Hero */

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 32px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 9vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.lede {
  margin: 20px 0 0;
  max-width: 34rem;
  font-size: clamp(18px, 2.2vw, 20px);
  color: var(--text-muted);
  text-wrap: pretty;
}

.status {
  margin: 24px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--tint-health);
  flex-shrink: 0;
}

/* Cards: the legal pages' draft notice (the home page's cards are in home.css). */

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
}

.tint-health {
  background: var(--tint-health);
}

.tint-fitness {
  background: var(--tint-fitness);
}

.tint-betterment {
  background: var(--tint-betterment);
}

/* Footer */

.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--gutter) 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

/* The company line sits on its own row under the other two (D44). */
.site-footer .site-owner {
  flex-basis: 100%;
}

/* 404 */

.not-found {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  padding: 64px var(--gutter);
}

.not-found h1 {
  font-size: clamp(28px, 6vw, 40px);
  margin-top: 8px;
}

.not-found p {
  margin: 0;
  color: var(--text-muted);
}

.button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  background: var(--action);
  color: var(--text-on-action);
  font-weight: 600;
  text-decoration: none;
}

/* Long-form documents (privacy policy, terms). */

.doc {
  max-width: 46rem;
  padding: 16px 0 72px;
}

.doc h1 {
  font-size: clamp(34px, 7vw, 48px);
}

.doc h2 {
  margin-top: 48px;
  font-size: 24px;
  line-height: 1.25;
}

.doc h3 {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.doc p,
.doc ul,
.doc ol {
  margin: 12px 0 0;
}

.doc ul,
.doc ol {
  padding-left: 1.4em;
}

.doc li + li {
  margin-top: 6px;
}

.doc section {
  scroll-margin-top: 16px;
}

.doc mark {
  background: var(--pill-bg);
  color: var(--text);
  border-radius: 6px;
  padding: 0 2px;
}

.doc-meta {
  color: var(--text-muted);
  font-size: 15px;
}

.notice {
  margin-top: 28px;
}

.doc .notice h2 {
  margin-top: 0;
  font-size: 20px;
}

/* The contact form (M13c): fields like the app's (14 px corners, a strong border). */

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

/* Its grid would otherwise override `hidden` once the message is sent. */
.contact-form[hidden] {
  display: none;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: 400 17px/1.45 var(--font-body);
}

.field textarea {
  resize: vertical;
}

.contact-form .button {
  justify-self: start;
  margin-top: 0;
  border: 0;
  font: 600 17px var(--font-body);
  cursor: pointer;
}

.contact-form .button:disabled {
  opacity: 0.6;
  cursor: default;
}

.contact-status {
  min-height: 1.5em;
  color: var(--text-muted);
}

/* The honeypot: off-screen for people, still in the form for bots. */
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Wider screens */

@media (min-width: 860px) {
  :root {
    --gutter: 32px;
  }

  .brand img {
    width: 192px;
  }

  .hero {
    grid-template-columns: 1.25fr 1fr;
    gap: 48px;
    padding: 56px 0 80px;
  }
}
