/* ===========================================
   Variables
   =========================================== */
:root {
  /* Color palette */
  --color-bg: #050816;
  --color-bg-alt: #0b1020;
  --color-surface: #0f172a;
  --color-surface-alt: #111827;

  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;

  --color-primary: #3b82f6;
  --color-primary-soft: rgba(59, 130, 246, 0.12);
  --color-primary-strong: #2563eb;

  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-danger: #ef4444;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 1rem;    /* 16px */
  --font-size-md: 1.0625rem; /* 17px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;   /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem;  /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.45);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.65);
  --shadow-soft: 0 18px 45px rgba(37, 99, 235, 0.25);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 320ms ease;
}

/* ===========================================
   Reset / Normalize
   =========================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  min-height: 100%;
}

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

body {
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

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

button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  padding-left: 1.5rem;
}

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

/* Remove animations / transitions for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================
   Base
   =========================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 60%, #020617 100%),
    #020617;
  color: var(--color-text);
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: #f9fafb;
}

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

h2 {
  font-size: clamp(2rem, 2.4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 1.8vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

code,
pre {
  font-family: var(--font-mono);
}

a {
  position: relative;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-strong));
  transition: width var(--transition-normal);
}

a:hover::after,
a:focus-visible::after {
  width: 100%;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

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

/* ===========================================
   Layout Utilities
   =========================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section--alt {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 55%),
    var(--color-bg-alt);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row {
  flex-direction: row;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-8);
}

/* Alignment and width utilities */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.w-full {
  width: 100%;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

.mt-8 {
  margin-top: var(--space-8);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.p-4 {
  padding: var(--space-4);
}

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

/* Screen reader only */
.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;
}

/* ===========================================
   Components
   =========================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-normal),
    border-color var(--transition-normal),
    color var(--transition-normal);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: rgba(15, 23, 42, 0.8);
  color: var(--color-text);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: var(--color-primary);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: none;
}

.btn--secondary:hover {
  background: var(--color-primary-soft);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Inputs & form fields */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background var(--transition-normal);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background: rgba(15, 23, 42, 1);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #e5e7eb;
}

.field-helper {
  margin-top: 0.2rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.field-error {
  margin-top: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

.input--error,
.textarea--error {
  border-color: rgba(239, 68, 68, 0.8);
}

/* Cards */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.16), transparent 55%),
    var(--color-surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card--muted {
  background: var(--color-surface-alt);
  border-color: rgba(31, 41, 55, 0.9);
}

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Tag / pill (for tech stacks, case-study types) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-text-muted);
}

.tag--primary {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(59, 130, 246, 0.7);
  color: #dbeafe;
}

/* Highlight panel for contact details */
.contact-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 47, 73, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.6);
  box-shadow: var(--shadow-soft);
}

.contact-panel__item-title {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #bfdbfe;
  margin-bottom: 4px;
}

.contact-panel__item-value {
  font-size: var(--font-size-sm);
}

/* Section header styling for key sections (overview, lifecycle, etc.) */
.section-header {
  max-width: 720px;
  margin: 0 auto var(--space-10);
  text-align: center;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: var(--font-size-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.section-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle, #22c55e, #16a34a);
}

.section-title {
  margin-bottom: var(--space-2);
}

.section-lead {
  font-size: var(--font-size-lg);
}

/* Timeline / lifecycle steps */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, rgba(59, 130, 246, 0.3), rgba(148, 163, 184, 0.1));
}

.timeline-step {
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0.15rem;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #020617;
  background: radial-gradient(circle, var(--color-primary), var(--color-primary-strong));
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.26);
}

.timeline-step__title {
  font-size: var(--font-size-lg);
  margin-bottom: 0.3rem;
}

.timeline-step__meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

/* Testimonial / feedback block */
.testimonial {
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-sm);
}

.testimonial__quote {
  font-size: var(--font-size-md);
  color: #e5e7eb;
}

.testimonial__meta {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Callout for practical software usage tips */
.callout {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: rgba(15, 23, 42, 0.95);
  border-left: 3px solid var(--color-primary);
}

.callout--success {
  border-left-color: var(--color-success);
}

.callout--warning {
  border-left-color: var(--color-warning);
}

/* Simple responsive header/footer layout helpers */
.site-header,
.site-footer {
  border-bottom: 1px solid rgba(15, 23, 42, 1);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
}

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 1);
  border-bottom: none;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--font-size-xs);
}

.navbar__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: conic-gradient(from 190deg, #22c55e, #3b82f6, #a855f7, #22c55e);
  position: relative;
  overflow: hidden;
}

.navbar__brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: #020617;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

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

.navbar__link--active {
  color: #e5e7eb;
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  .navbar__links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Hero-style heading alignment for landing sections */
.hero {
  padding-top: var(--space-20);
  padding-bottom: var(--space-16);
}

.hero__eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: clamp(2.75rem, 4vw, 3.5rem);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 640px;
}

/* Footer contact emphasis */
.footer-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.footer-meta strong {
  color: #e5e7eb;
}

/* ===========================================
   End base.css
   =========================================== */
