/* ==========================================================================
   KIOTSO BRAND FOUNDATION & PRODUCT DESIGN SYSTEM (v2.0)
   Style: Neo-Brutalism Modernist / Swiss Tech Grid
   Zero-dependency Vanilla CSS for Kiotso Ecosystem Products
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,500;0,700;0,800;1,500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Core Color Palette */
  --ink: #000f1d;
  --ink-soft: #31404e;
  --ink-muted: #64748b;
  --paper: #f7f7f7;
  --paper-card: #ffffff;
  
  /* Accent Colors (Light Ice Blue / Primary Blue Theme) */
  --purple: #3b82f6;
  --purple-hover: #2563eb;
  --purple-light: #eff6ff;
  
  --yellow: #ffd731;
  --yellow-hover: #ecc21d;
  --yellow-light: #fff9d6;
  
  --ice: #60a5fa;
  --ice-hover: #3b82f6;
  --ice-light: #eff6ff;
  
  --mint: #55db9c;
  --mint-hover: #3ecc88;
  --mint-light: #e9faf2;
  
  --pink: #e9ccff;
  --pink-hover: #d7b3fb;
  --pink-light: #f9f2ff;
  
  --orange: #ff7a00;
  --orange-hover: #e06b00;
  --orange-light: #fff2e6;

  --line: rgba(0, 15, 29, 0.28);
  --line-strong: #000f1d;

  /* Neo-Brutalist Hard Drop Shadows */
  --shadow-xs: 2px 2px 0 #000f1d;
  --shadow-sm: 3px 3px 0 #000f1d;
  --shadow-md: 4.5px 4.5px 0 #000f1d;
  --shadow-lg: 7px 7px 0 #000f1d;
  --shadow-xl: 10px 10px 0 #000f1d;

  /* Borders */
  --border-thin: 1.5px solid #000f1d;
  --border-main: 2px solid #000f1d;
  --border-thick: 3px solid #000f1d;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Typography Specs */
  --font-main: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Motion & Transitions */
  --ease-neo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 120ms var(--ease-neo);
  --transition-normal: 200ms var(--ease-neo);
}

/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

/* ==========================================================================
   2. BLUEPRINT GRID & LAYOUT UTILITIES
   ========================================================================== */

/* Blueprint Grid Background Pattern */
.blueprint-bg {
  background-color: var(--paper);
  background-image: 
    linear-gradient(rgba(77, 162, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 162, 255, 0.18) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* Blueprint Grid Fine (36px) */
.blueprint-bg-fine {
  background-color: var(--paper);
  background-image: 
    linear-gradient(rgba(77, 162, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 162, 255, 0.15) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Shell Layout Container */
.shell {
  width: min(1380px, calc(100% - 64px));
  margin-inline: auto;
}

.shell-narrow {
  width: min(960px, calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 768px) {
  .shell, .shell-narrow {
    width: calc(100% - 32px);
  }
}

/* Spacing & Grid Utilities */
.section-spacer {
  padding-block: 80px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   3. TYPOGRAPHY SYSTEM
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.h1-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.h2-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.h3-title {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.h4-title {
  font-size: 20px;
  font-weight: 800;
}

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

.text-sub {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

.text-sm {
  font-size: 13.5px;
  line-height: 1.5;
}

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

.highlight-purple {
  background: linear-gradient(180deg, transparent 60%, var(--purple-light) 60%);
  color: var(--purple);
  padding-inline: 4px;
}

.highlight-yellow {
  background: var(--yellow);
  color: var(--ink);
  padding: 2px 8px;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* ==========================================================================
   4. BRAND LOGO & WORDMARK
   ========================================================================== */

.wordmark-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.wordmark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}

.brand-subtag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  background: var(--yellow);
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-subtag-purple {
  background: var(--purple);
  color: #ffffff;
}

.brand-subtag-ice {
  background: var(--ice);
  color: var(--ink);
}

.brand-subtag-mint {
  background: var(--mint);
  color: var(--ink);
}

/* ==========================================================================
   5. BUTTONS (NEO-BRUTALIST HARD SHADOW & TACTILE FEEDBACK)
   ========================================================================== */

.btn-neo-primary,
.btn-neo-secondary,
.btn-neo-yellow,
.btn-neo-mint,
.btn-neo-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 800;
  border: var(--border-main);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  user-select: none;
  text-align: center;
  white-space: nowrap;
}

/* Hover & Active Physical Tactile Feedback */
.btn-neo-primary:hover,
.btn-neo-secondary:hover,
.btn-neo-yellow:hover,
.btn-neo-mint:hover,
.btn-neo-outline:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.btn-neo-primary:active,
.btn-neo-secondary:active,
.btn-neo-yellow:active,
.btn-neo-mint:active,
.btn-neo-outline:active {
  transform: translate(1px, 1px);
  box-shadow: var(--shadow-xs);
}

/* Variants */
.btn-neo-primary {
  background: var(--purple);
  color: #ffffff;
}
.btn-neo-primary:hover {
  background: var(--purple-hover);
}

.btn-neo-secondary {
  background: var(--paper-card);
  color: var(--ink);
}
.btn-neo-secondary:hover {
  background: #ffffff;
}

.btn-neo-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.btn-neo-yellow:hover {
  background: var(--yellow-hover);
}

.btn-neo-mint {
  background: var(--mint);
  color: var(--ink);
}
.btn-neo-mint:hover {
  background: var(--mint-hover);
}

.btn-neo-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.btn-neo-outline:hover {
  background: rgba(0, 15, 29, 0.05);
  box-shadow: var(--shadow-xs);
}

/* Sizes */
.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16.5px;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   6. BADGES & TAGS
   ========================================================================== */

.badge-neo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  background: var(--paper-card);
  color: var(--ink);
}

.badge-purple { background: var(--purple-light); color: var(--purple); border-color: var(--purple); }
.badge-yellow { background: var(--yellow); color: var(--ink); }
.badge-ice { background: var(--ice-light); color: var(--ink); border-color: var(--ice); }
.badge-mint { background: var(--mint-light); color: var(--ink); border-color: var(--mint); }
.badge-pink { background: var(--pink-light); color: var(--ink); border-color: var(--pink); }
.badge-orange { background: var(--orange-light); color: var(--orange); border-color: var(--orange); }

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  display: inline-block;
}

.kicker-dot-mint { background: var(--mint); }
.kicker-dot-yellow { background: var(--yellow); }

/* ==========================================================================
   7. CARDS (STACK CARDS & NEO-BRUTALIST CONTAINERS)
   ========================================================================== */

.card-neo {
  background: var(--paper-card);
  border: var(--border-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
}

.card-neo:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-md);
}

.card-neo-lg {
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card-neo-lg:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lg);
}

/* Card Color Accent Tops */
.card-ice { border-top: 6px solid var(--ice); }
.card-yellow { border-top: 6px solid var(--yellow); }
.card-mint { border-top: 6px solid var(--mint); }
.card-purple { border-top: 6px solid var(--purple); }
.card-pink { border-top: 6px solid var(--pink); }
.card-orange { border-top: 6px solid var(--orange); }

/* Stack Step Cards with Large Mono Numbers */
.step-card-neo {
  background: var(--paper-card);
  border: var(--border-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.step-card-neo:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-md);
}

.step-card-num {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 16px;
}

/* ==========================================================================
   8. SITE HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2.5px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--ink);
}

/* ==========================================================================
   9. MARQUEE TICKER (HARDWARE-ACCELERATED INFINITE SCROLL)
   ========================================================================== */

.marquee-container {
  width: 100%;
  overflow: hidden;
  background: var(--yellow);
  border-block: var(--border-main);
  padding-block: 12px;
  white-space: nowrap;
  user-select: none;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 32px;
  animation: marquee-scroll 24s linear infinite;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.marquee-star {
  font-size: 14px;
  color: var(--ink);
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   10. FORMS & INPUT ELEMENTS
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.form-input-neo,
.form-select-neo,
.form-textarea-neo {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-card);
  border: var(--border-main);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input-neo:focus,
.form-select-neo:focus,
.form-textarea-neo:focus {
  border-color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.form-input-neo::placeholder {
  color: var(--ink-muted);
  font-weight: 500;
}

/* ==========================================================================
   11. PRICING & PLAN CARDS
   ========================================================================== */

.pricing-card-neo {
  background: var(--paper-card);
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.pricing-card-neo:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card-neo.popular {
  border-color: var(--purple);
  background: linear-gradient(180deg, #ffffff 0%, var(--purple-light) 100%);
}

.pricing-badge-popular {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--purple);
  color: #ffffff;
  padding: 4px 12px;
  border: var(--border-thin);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-price {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  margin-block: 16px 8px;
}

.pricing-price small {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
}

.pricing-feature-list {
  list-style: none;
  margin-block: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.pricing-feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mint);
  border: var(--border-thin);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  flex-shrink: 0;
}

/* ==========================================================================
   12. MODAL & DIALOG BOX
   ========================================================================== */

.modal-backdrop-neo {
  position: fixed;
  inset: 0;
  background: rgba(0, 15, 29, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.modal-backdrop-neo.active {
  opacity: 1;
  visibility: visible;
}

.modal-neo {
  background: var(--paper);
  border: var(--border-thick);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 200ms var(--ease-neo);
}

.modal-backdrop-neo.active .modal-neo {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: var(--border-main);
  border-radius: var(--radius-pill);
  background: var(--paper-card);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  transition: transform var(--transition-fast);
}

.modal-close-btn:hover {
  transform: translate(-1px, -1px);
  background: var(--yellow);
}

/* ==========================================================================
   13. FOOTER & SUBDOMAIN NAVIGATION
   ========================================================================== */

.footer-neo {
  background: var(--paper);
  border-top: var(--border-thick);
  padding-block: 60px 40px;
  margin-top: 80px;
}

.footer-subdomains {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-block: 24px;
}

.footer-subdomain-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--paper-card);
  border: var(--border-main);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
  font-size: 13.5px;
  font-weight: 800;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.footer-subdomain-chip:hover {
  transform: translate(-2px, -2px);
  background: var(--yellow);
}

.footer-bottom {
  border-top: var(--border-thin);
  padding-top: 24px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
