/* ==========================================================================
   Kapito Landing Page - Brutalist/Terminal OS Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Core Colors */
  --bg-cream: #F8F6F1;
  --bg-dark: #1A1A1A;
  --accent-yellow: #F5C400;
  --accent-green: #22C55E;
  --accent-red: #EF4444;
  --text-black: #000000;
  --text-white: #FFFFFF;
  --text-muted: #6B7280;
  --border-black: #000000;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;

  /* Borders */
  --border-thin: 2px solid var(--border-black);
  --border-thick: 4px solid var(--border-black);

  /* Container */
  --container-max: 1200px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-cream: #1A1A1A;
    --bg-dark: #F8F6F1;
    --text-black: #FFFFFF;
    --text-white: #000000;
    --border-black: #FFFFFF;
  }
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-black);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent-yellow);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-yellow);
  color: var(--text-black);
  padding: var(--space-sm) var(--space-md);
  z-index: 100;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.text-display {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.text-heading {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.text-body {
  font-size: 14px;
  line-height: 1.6;
}

.text-small {
  font-size: 12px;
  line-height: 1.4;
}

.text-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.text-mono {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   Components: Header
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-dark);
  color: var(--text-white);
  border-bottom: var(--border-thick);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-md);
}

.header__left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.logo__icon {
  width: 32px;
  height: 32px;
  background: var(--text-white);
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
}

.header__status {
  display: none;
  align-items: center;
  gap: var(--space-lg);
  font-size: 12px;
}

@media (min-width: 768px) {
  .header__status {
    display: flex;
  }
}

.status-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.status-item__label {
  color: var(--text-muted);
}

.status-item__value {
  color: var(--text-white);
}

.status-item__value--active {
  color: var(--accent-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --------------------------------------------------------------------------
   Components: Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: var(--border-thin);
  transition: all 0.15s ease;
  min-height: 44px;
  min-width: 44px;
}

.btn--primary {
  background: var(--accent-green);
  color: var(--text-black);
  border-color: var(--text-black);
}

.btn--primary:hover {
  background: #1db954;
  transform: translateY(-1px);
}

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

.btn--secondary:hover {
  background: #333;
}

.btn--outline {
  background: transparent;
  color: var(--text-black);
  border-color: var(--text-black);
}

.btn--outline:hover {
  background: var(--text-black);
  color: var(--text-white);
}

.btn--large {
  padding: var(--space-md) var(--space-xl);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   Components: Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-cream);
  border: var(--border-thick);
  padding: var(--space-lg);
}

.card--yellow {
  background: var(--accent-yellow);
}

.card--dark {
  background: var(--bg-dark);
  color: var(--text-white);
}

.card--dark .text-muted {
  color: #9CA3AF;
}

/* --------------------------------------------------------------------------
   Components: Badge
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--text-black);
  color: var(--text-white);
  border: 2px solid var(--text-black);
}

.badge--outline {
  background: transparent;
  color: var(--text-black);
}

/* --------------------------------------------------------------------------
   Components: Section Divider
   -------------------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border-black);
}

.divider__text {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Components: Feature Grid
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card__title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.feature-card__description {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.feature-card--dark .feature-card__description {
  color: #9CA3AF;
}

/* --------------------------------------------------------------------------
   Components: Screenshot Gallery
   -------------------------------------------------------------------------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.screenshot-item {
  border: var(--border-thick);
  overflow: hidden;
  background: var(--bg-dark);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Components: Security List
   -------------------------------------------------------------------------- */
.security-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}

.security-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.security-item::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Components: Pricing Cards
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: var(--border-thin);
}

.pricing-card__name {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pricing-card__price {
  font-size: 18px;
  font-weight: 700;
}

.pricing-card__features {
  list-style: none;
  margin-bottom: var(--space-lg);
  flex-grow: 1;
}

.pricing-card__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  font-size: 13px;
}

.pricing-card__feature::before {
  content: '●';
  color: var(--accent-green);
  font-size: 8px;
  line-height: 2;
}

/* --------------------------------------------------------------------------
   Sections: Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-2xl) 0;
  }
}

.hero__card {
  padding: var(--space-xl);
}

@media (min-width: 768px) {
  .hero__card {
    padding: var(--space-2xl) var(--space-3xl);
  }
}

.hero__badge {
  margin-bottom: var(--space-lg);
}

.hero__tagline {
  margin-bottom: var(--space-lg);
}

.hero__tagline span {
  display: block;
}

.hero__description {
  max-width: 500px;
  margin-bottom: var(--space-xl);
  font-size: 14px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.hero__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.hero__icon {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 64px;
  height: 64px;
  display: none;
}

@media (min-width: 768px) {
  .hero__icon {
    display: block;
  }
}

.hero__card {
  position: relative;
}

/* --------------------------------------------------------------------------
   Sections: Features
   -------------------------------------------------------------------------- */
.features {
  padding-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Sections: Screenshots
   -------------------------------------------------------------------------- */
.screenshots {
  padding-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Sections: Security
   -------------------------------------------------------------------------- */
.security {
  padding-bottom: var(--space-xl);
}

.security__card {
  padding: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Sections: Pricing
   -------------------------------------------------------------------------- */
.pricing {
  padding-bottom: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Sections: CTA
   -------------------------------------------------------------------------- */
.cta {
  padding-bottom: var(--space-2xl);
}

.cta__card {
  text-align: center;
  padding: var(--space-2xl);
}

.cta__title {
  font-size: clamp(1.25rem, 4vw, 2rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-lg);
}

.cta__button {
  margin-bottom: var(--space-lg);
}

.cta__meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Components: Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-dark);
  color: var(--text-white);
  border-top: var(--border-thick);
  padding: var(--space-lg) 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__brand {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--accent-green);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
}

.footer__link {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer__link:hover {
  color: var(--text-white);
}

.footer__copyright {
  font-size: 11px;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Legal Pages
   -------------------------------------------------------------------------- */
.legal {
  padding: var(--space-2xl) 0;
}

.legal__header {
  margin-bottom: var(--space-2xl);
}

.legal__title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
}

.legal__updated {
  font-size: 12px;
  color: var(--text-muted);
}

.legal__content {
  max-width: 800px;
}

.legal__content h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--border-thin);
}

.legal__content h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal__content p {
  margin-bottom: var(--space-md);
  color: var(--text-muted);
}

.legal__content ul,
.legal__content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--text-muted);
}

.legal__content li {
  margin-bottom: var(--space-sm);
}

.legal__content a {
  color: var(--accent-green);
  text-decoration: underline;
}

.legal__content strong {
  color: var(--text-black);
}

/* --------------------------------------------------------------------------
   Support Page
   -------------------------------------------------------------------------- */
.faq-item {
  padding: var(--space-lg) 0;
  border-bottom: var(--border-thin);
}

.faq-item__question {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-sm);
}

.faq-item__answer {
  color: var(--text-muted);
  font-size: 13px;
}

.contact-card {
  margin-top: var(--space-2xl);
  text-align: center;
}

.contact-card__title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.contact-card__email {
  color: var(--accent-green);
  font-size: 18px;
  font-weight: 700;
}

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

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Mobile CTA
   -------------------------------------------------------------------------- */
.mobile-cta {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    background: var(--bg-dark);
    border-top: var(--border-thick);
    z-index: 40;
  }

  .mobile-cta .btn {
    width: 100%;
  }

  body {
    padding-bottom: 80px;
  }
}
