/* 1) Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body, h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2) Theme Variables */
:root {
  /* Colors */
  --primary: #0f172a;       /* Dark Slate */
  --primary-light: #334155;
  --accent: #0284c7;        /* Sky Blue */
  --accent-dark: #0369a1;
  --accent-light: #e0f2fe;
  
  --bg-body: #ffffff;
  --bg-surface: #f8fafc;
  --bg-hover: #f1f5f9;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border: #e2e8f0;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  
  /* Spacing */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 1rem;     /* 16px */
  --space-4: 1.5rem;   /* 24px */
  --space-5: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 70px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --transition: all 0.2s ease-in-out;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 3) Layout Utilities */
.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.section {
  padding: var(--space-6) 0;
}

.section--soft {
  background-color: var(--bg-surface);
  border-block: 1px solid var(--border);
}

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* 4) Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--primary);
  font-weight: 700;
}

.h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: var(--space-4);
  position: relative;
  display: inline-block;
}

.h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.muted {
  color: var(--text-muted);
}

.kicker {
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-2);
  display: block;
  letter-spacing: 0.05em;
}

/* 5) Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand span {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.navlinks {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.navlinks a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.navlinks a:hover {
  color: var(--accent);
  background-color: var(--bg-hover);
}

.navlinks a.is-active {
  color: var(--accent);
  background-color: var(--accent-light);
  font-weight: 600;
}

/* 6) Hero Section */
.hero {
  padding: var(--space-6) 0 var(--space-8);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-actions {
  margin-top: var(--space-5);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: #fff;
}

/* 7) Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  background-color: #fff;
  color: var(--text-main);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* 8) Components: Cards */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card--shadow {
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.card h3 {
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--text-muted);
  flex-grow: 1;
}

/* 9) Carousel */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #eee;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  z-index: 10;
  transition: var(--transition);
  opacity: 0;
}

.carousel:hover .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev { left: 1rem; }
.carousel-arrow.next { right: 1rem; }

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
}

.dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* 10) Footer */
.footer {
  background-color: var(--primary);
  color: #fff;
  padding: var(--space-6) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
}

.footer .brand span {
  color: #fff;
  font-size: 1.25rem;
}

.footer .small {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* 11) Other Components */
.list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* 12) Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    margin-inline: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    padding: var(--space-2) 0;
  }
  
  .nav {
    flex-direction: column;
    gap: var(--space-3);
  }
  
  .brand span {
    max-width: 100%;
  }
  
  .navlinks {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start; /* Allow scrolling */
  }
  
  .grid--2, .grid--3 {
    grid-template-columns: 1fr;
  }
}
