/* ============================================
   SLICEWORKZ DESIGN SYSTEM
   Based on styleguide: bold sans-serif, angular
   geometric shapes, generous whitespace.
   ============================================ */

:root {
  --dark: #1E1E1E;
  --white: #FFFFFF;
  --orange: #F26522;
  --orange-light: #FFF0E6;
  --green: #3DD68C;
  --green-light: #E6FBF0;
  --blue: #1890FF;
  --blue-light: #E6F4FF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-800: #1F2937;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --section-pad: clamp(2.8rem, 5.6vw, 5.6rem);
}

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

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

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p, li { font-size: 1.125rem; color: var(--gray-600); }
.lead { font-size: clamp(1.25rem, 2vw, 1.5rem); color: var(--gray-600); max-width: 800px; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
section { padding: var(--section-pad) 0; }

/* ---- NAVIGATION ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

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

.nav-links a {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--dark);
  background: var(--gray-100);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 4px;
  vertical-align: middle;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: 8px;
}

.dropdown-menu a:hover {
  background: var(--gray-100);
  color: var(--dark);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  transition: 0.3s;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero-split {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  max-width: 720px;
}

.hero .lead {
  margin-top: 1.5rem;
}

.hero-image {
  flex: 0 0 auto;
  width: 54%;
  position: relative;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-geo {
  position: absolute;
  right: -5%;
  top: 10%;
  width: 45%;
  height: 80%;
  background: var(--orange);
  transform: skewX(-8deg) rotate(-3deg);
  border-radius: 24px;
  opacity: 0.08;
  z-index: 1;
}

@media (max-width: 768px) {
  .hero-split {
    flex-direction: column;
    gap: 2rem;
  }
  .hero-image {
    width: 60%;
  }
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  padding: calc(72px + var(--section-pad)) 0 var(--section-pad);
  position: relative;
  overflow: hidden;
}

.page-hero.dark {
  background: var(--dark);
  color: var(--white);
}
.page-hero.dark p, .page-hero.dark li, .page-hero.dark .lead {
  color: rgba(255,255,255,0.7);
}

.page-hero.orange-bg {
  background: var(--orange);
  color: var(--white);
}
.page-hero.orange-bg p, .page-hero.orange-bg .lead {
  color: rgba(255,255,255,0.85);
}

.page-hero.green-bg {
  background: var(--green);
  color: var(--dark);
}

.page-hero.blue-bg {
  background: var(--blue);
  color: var(--white);
}
.page-hero.blue-bg p, .page-hero.blue-bg .lead {
  color: rgba(255,255,255,0.85);
}

.page-hero.gray-bg {
  background: var(--gray-100);
}

.page-hero.gray-bg p, .page-hero.gray-bg .lead {
  color: var(--gray-600);
}

.page-hero-geo {
  position: absolute;
  right: -8%;
  bottom: -20%;
  width: 40%;
  height: 100%;
  background: rgba(0,0,0,0.06);
  transform: skewX(-8deg) rotate(-3deg);
  border-radius: 24px;
}

.badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.badge-orange { background: var(--orange); color: var(--white); }
.badge-green { background: var(--green); color: var(--dark); }
.badge-blue { background: var(--blue); color: var(--white); }
.badge-dark { background: var(--dark); color: var(--white); }

/* ---- SECTION STYLES ---- */
.section-light { background: var(--white); }
.section-gray { background: var(--gray-50); }
.section-dark { background: var(--dark); color: var(--white); }
.section-dark p, .section-dark li { color: rgba(255,255,255,0.7); }

/* ---- GRID ---- */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---- CARDS ---- */
.card {
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.card h3 { margin-bottom: 0.75rem; }
.card p { font-size: 1rem; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-icon.orange { background: var(--orange-light); color: var(--orange); }
.card-icon.green { background: var(--green-light); color: var(--green); }
.card-icon.blue { background: var(--blue-light); color: var(--blue); }

.card-brandmark {
  width: 40px;
  height: auto;
  margin-bottom: 1rem;
}

/* Dark card variant */
.card-dark {
  background: var(--gray-800);
  border-color: transparent;
  color: var(--white);
}
.card-dark p { color: rgba(255,255,255,0.7); }

/* ---- COMPARISON TABLE ---- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.comparison-col { padding: 2.5rem; }
.comparison-col h3 { margin-bottom: 1.5rem; }

.comparison-old {
  background: var(--gray-50);
}

.comparison-new {
  background: var(--dark);
  color: var(--white);
}
.comparison-new p, .comparison-new li { color: rgba(255,255,255,0.7); }

.comparison-item {
  padding: 1rem 0 1rem 1rem;
  border-bottom: 1px solid rgba(128,128,128,0.15);
  border-left: 3px solid transparent;
  font-size: 1rem;
}

.comparison-old .comparison-item { border-left-color: #EF4444; }
.comparison-new .comparison-item { border-left-color: var(--green); }

.comparison-item:last-child { border-bottom: none; }

.comparison-label {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  color: var(--orange);
}

/* ---- PROCESS / TIMELINE ---- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 2rem 1.5rem;
  background: var(--gray-50);
  border-radius: 16px;
  counter-increment: step;
  text-align: left;
  display: flex;
  flex-direction: column;
}
.process-step .process-step-img {
  margin-top: auto;
}

.process-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.process-step-header h4 {
  margin: 0;
}
.process-step::before {
  content: counter(step);
  display: none;
  width: 40px; height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  margin: 0 auto 1rem;
}

.process-step-num {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step h4 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.process-step .badge { margin: 0.25rem 0 0.75rem; }
.process-step p { font-size: 0.875rem; }
.step-highlight { color: var(--orange); }

.process-step-img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  margin-top: 1.5rem;
  opacity: 0.85;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover {
  background: #d9561d;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--dark);
}

.btn-white {
  background: var(--white);
  color: var(--dark);
}
.btn-white:hover {
  background: var(--gray-100);
}

/* ---- TAGS / PILLS ---- */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 50px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.tag-orange { background: var(--orange-light); color: var(--orange); }
.tag-green { background: var(--green-light); color: #1a9a5a; }
.tag-blue { background: var(--blue-light); color: var(--blue); }

/* ---- FEATURE LIST ---- */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-check {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  margin-top: 2px;
}

.feature-x {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: #FEE2E2;
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  margin-top: 2px;
}

/* ---- CTA SECTION ---- */
.cta-section {
  text-align: center;
  padding: var(--section-pad) 0;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section .lead {
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- FOOTER ---- */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

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

.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.875rem; max-width: 280px; }

footer h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}

footer ul li { margin-bottom: 0.5rem; }
footer ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
footer ul li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}

/* ---- SPACING UTILITIES ---- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.mt-8 { margin-top: 4rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.text-center { text-align: center; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    gap: 0;
  }

  .nav-links.open .nav-dropdown > a,
  .nav-links.open > a:not(.btn) {
    display: block;
    padding: 0.625rem 0;
    border-radius: 0;
    background: none;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9375rem;
  }

  .nav-links.open .nav-dropdown > a:hover,
  .nav-links.open > a:not(.btn):hover,
  .nav-links.open > a:not(.btn).active {
    background: none;
    color: var(--orange);
  }

  .nav-links.open .nav-dropdown .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0.5rem 0;
    min-width: 0;
  }

  .nav-links.open .dropdown-menu a {
    display: block;
    padding: 0.3125rem 0 0.3125rem 1rem;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-400);
    background: none;
  }

  .nav-links.open .dropdown-menu a:hover {
    color: var(--orange);
    background: none;
  }

  .nav-links.open > .btn {
    align-self: flex-start;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .comparison { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: clamp(2.25rem, 8vw, 3.5rem); }
  .hero-geo { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
}

/* ============================================
   BLOG
   ============================================ */

/* Filter bar */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.blog-filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 50px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.blog-filter-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.blog-filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* Blog cards */
.blog-card {
  border-radius: 16px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--gray-100);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.blog-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-card-body h3 a {
  color: var(--dark);
  transition: color 0.2s;
}

.blog-card-body h3 a:hover {
  color: var(--orange);
}

.blog-card-body p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  flex: 1;
}

/* Blog post page */
.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.blog-back-link:hover {
  color: var(--orange);
}

.blog-post-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.blog-post-content {
  max-width: 780px;
  margin: 0 auto;
}

.blog-post-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  margin-bottom: 1.25rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.blog-post-content ol {
  list-style: decimal;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  color: var(--gray-600);
}

.blog-post-content img {
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-post-content blockquote {
  border-left: 4px solid var(--orange);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--orange-light);
  border-radius: 0 12px 12px 0;
}

.blog-post-content blockquote p {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--dark);
}

.blog-post-content strong {
  color: var(--dark);
}

.blog-post-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}

/* Keep reading section */
.blog-related h2 {
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .blog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  .blog-filter-btn {
    flex-shrink: 0;
  }
}
