/* Kasso marketing site - palette from TimeTracker/Theme */
:root {
  --page: #f6f5f1;
  --content: #ffffff;
  --surface: #ffffff;
  --surface-muted: #efeee9;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #2e70db;
  --accent-hover: #255ec0;
  --accent-soft: #e6f0fb;
  --text: #21201e;
  --text-secondary: #66635f;
  --text-tertiary: #949088;
  --positive: #2e7d45;
  --negative: #a33a33;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --max-width: 1120px;
  --nav-height: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

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

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header & nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 245, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container.nav-bar {
  position: relative;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--content);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text);
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-muted);
  text-decoration: none;
}

.nav-cta {
  margin-left: 0.5rem;
}

.site-nav a.btn-primary,
.site-nav a.btn-primary:hover {
  color: #fff;
  background: var(--accent);
  text-decoration: none;
}

.site-nav a.btn-primary:hover {
  background: var(--accent-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-secondary {
  background: var(--content);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy .eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.hero-copy .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* App preview mock */
.app-preview {
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.traffic-lights {
  display: flex;
  gap: 0.4rem;
}

.traffic-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.traffic-lights span:nth-child(1) { background: #ff5f57; }
.traffic-lights span:nth-child(2) { background: #febc2e; }
.traffic-lights span:nth-child(3) { background: #28c840; }

.app-preview-title {
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.app-preview-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 280px;
}

.app-sidebar {
  padding: 1rem 0.75rem;
  background: var(--page);
  border-right: 1px solid var(--border);
}

.sidebar-item {
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.sidebar-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.app-main {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.kpi-card {
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.kpi-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.kpi-value {
  margin-top: 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.kpi-value.positive {
  color: var(--positive);
}

.chart-bar {
  height: 72px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  position: relative;
  overflow: hidden;
}

.chart-bar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(90deg, transparent, var(--accent));
  opacity: 0.35;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.screenshot-slot {
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--surface-muted);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.screenshot-slot:has(img) {
  border-style: solid;
  padding: 0;
  min-height: 0;
  background: var(--content);
  overflow: hidden;
}

.screenshot-slot img {
  border-radius: calc(var(--radius) - 2px);
  width: 100%;
}

.screenshot-slot code {
  font-size: 0.8125rem;
  background: var(--content);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-header {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.section-alt {
  background: var(--content);
  border-block: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card {
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.card p:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* Feature rows */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
}

.feature-row + .feature-row {
  border-top: 1px solid var(--border);
}

.feature-copy ul {
  color: var(--text-secondary);
}

/* Comparison table */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--content);
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table th {
  background: var(--surface-muted);
  font-size: 0.875rem;
}

.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table .pro-col {
  background: rgba(230, 240, 251, 0.35);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pro {
  background: var(--accent-soft);
  color: var(--accent);
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.pricing-card h3 {
  margin-bottom: 0.25rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-note {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.pricing-card ul {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Legal pages */
.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero p {
  color: var(--text-secondary);
}

.legal-content {
  background: var(--content);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 3rem;
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  margin-top: 1.25rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* CTA band */
.cta-band {
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.cta-panel {
  background: linear-gradient(135deg, var(--accent-soft), var(--content));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1rem;
  align-items: center;
}

.cta-panel p {
  margin: 0;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--content);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 28rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.footer-links h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Utilities */
.text-center { text-align: center; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row.reverse .feature-copy {
    order: 2;
  }

  .feature-row.reverse .feature-media {
    order: 1;
  }

  .cta-panel {
    grid-template-columns: 1fr auto;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid.three-up {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    background: var(--page);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .app-preview-body {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    display: none;
  }
}
