/* ============================================================
   Webward Theme — style.css
   Uses CSS custom properties --primary and --secondary
   injected by baseof.html from Hugo site params.
   ============================================================ */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a2e;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
  color: #1a1a2e;
}
.site-brand:hover {
  text-decoration: none;
  color: var(--primary);
}
.site-logo {
  flex-shrink: 0;
  border-radius: 6px;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: inherit;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================================
   Main
   ============================================================ */
.site-main {
  flex: 1;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 2.25rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Button
   ============================================================ */
.btn-primary {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  opacity: 0.88;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   Content sections
   ============================================================ */
.content-section {
  padding: 4rem 1.5rem;
}

.content {
  max-width: 760px;
  margin: 0 auto;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content h2 { font-size: 1.75rem; }
.content h3 { font-size: 1.375rem; }
.content h4 { font-size: 1.125rem; }

.content p {
  margin-bottom: 1.25rem;
  color: #374151;
}

.content ul,
.content ol {
  margin: 0 0 1.25rem 1.5rem;
  color: #374151;
}

.content li {
  margin-bottom: 0.375rem;
}

.content blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75rem 1.25rem;
  background-color: #f8faff;
  margin: 1.5rem 0;
  border-radius: 0 0.375rem 0.375rem 0;
  color: #374151;
  font-style: italic;
}

.content a {
  color: var(--primary);
  font-weight: 500;
}

.content a:hover {
  color: var(--secondary);
}

.content strong {
  color: #0f172a;
  font-weight: 600;
}

.content code {
  background-color: #f3f4f6;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
  color: #be185d;
}

.content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: "SF Mono", ui-monospace, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

.content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* ============================================================
   Single page
   ============================================================ */
.single-page {
  padding: 4rem 1.5rem;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.page-body {
  /* inherits .content styles via the .content wrapper */
}

/* ============================================================
   List page
   ============================================================ */
.list-page {
  padding: 4rem 1.5rem;
}

.page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  margin-top: 2rem;
}

.page-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.page-list-item:first-child {
  border-top: 1px solid #e5e7eb;
}

.page-list-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  display: block;
  margin-bottom: 0.375rem;
  transition: color 0.15s ease;
}

.page-list-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.page-list-summary {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.55;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background-color: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.footer-brand .footer-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.25rem;
  font-size: 0.875rem;
}
.footer-nav a {
  color: #4b5563;
  text-decoration: none;
}
.footer-nav a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.375rem;
}

.footer-credit {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ============================================================
   Hero layout variants
   ============================================================ */
.hero--split-hero {
  text-align: left;
}
.hero--split-hero .hero-inner {
  max-width: 1100px;
}
.hero--stacked {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

/* ============================================================
   Value props (3-up grid)
   ============================================================ */
.value-props {
  padding: 4rem 1.5rem;
  background-color: #ffffff;
}
.value-props-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.value-prop {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.value-prop h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.625rem;
  border-left: 3px solid var(--primary);
  padding-left: 0.625rem;
}
.value-prop p {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.6;
}

/* ============================================================
   Sections (alternating bands)
   ============================================================ */
.sections {
  background-color: #ffffff;
}
.section {
  padding: 4rem 1.5rem;
}
.section--alt {
  background-color: #f8faff;
  border-top: 1px solid #eef2ff;
  border-bottom: 1px solid #eef2ff;
}
.section-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.section-inner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-inner p {
  font-size: 1rem;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  background: var(--primary);
  color: #ffffff;
  text-decoration: none;
}

.footer-tagline {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.375rem;
}

/* ============================================================
   Utility — accent color callout
   ============================================================ */
.accent {
  color: var(--primary);
}

.accent-secondary {
  color: var(--secondary);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .header-inner {
    padding: 0 1rem;
    height: 56px;
  }

  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  .hero {
    padding: 3.5rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .content-section,
  .single-page,
  .list-page {
    padding: 2.5rem 1rem;
  }

  .page-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 380px) {
  .site-nav {
    gap: 0.625rem;
  }

  .site-nav a {
    font-size: 0.8125rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }
}
