/* CloudyMind Solutions / CloudyMind Oy - Design Tokens & Stylesheet */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Soft light palette */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  --primary: #0284c7;         /* Soft ocean/sky blue */
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.15);

  --accent: #6366f1;          /* Indigo accent */
  --accent-light: #eef2ff;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;

  --tag-bg: #f1f5f9;
  --tag-text: #475569;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --container-max: 1080px;
}

/* System Dark Theme & Explicit Dark Mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-page: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-subtle: #334155;
    --bg-surface-card: #1e293b;
    --border-color: #334155;
    --border-subtle: #475569;

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-soft: #64748b;

    --primary: #38bdf8;
    --primary-hover: #7dd3fc;
    --primary-light: rgba(56, 189, 248, 0.15);
    --primary-glow: rgba(56, 189, 248, 0.25);

    --accent: #818cf8;
    --accent-light: rgba(129, 140, 248, 0.15);

    --success: #34d399;
    --success-bg: rgba(16, 185, 129, 0.2);
    --success-text: #a7f3d0;

    --tag-bg: #334155;
    --tag-text: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg-page: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-subtle: #334155;
  --bg-surface-card: #1e293b;
  --border-color: #334155;
  --border-subtle: #475569;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #64748b;

  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-light: rgba(56, 189, 248, 0.15);
  --primary-glow: rgba(56, 189, 248, 0.25);

  --accent: #818cf8;
  --accent-light: rgba(129, 140, 248, 0.15);

  --success: #34d399;
  --success-bg: rgba(16, 185, 129, 0.2);
  --success-text: #a7f3d0;

  --tag-bg: #334155;
  --tag-text: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(2, 132, 199, 0.15);

  --accent: #6366f1;
  --accent-light: #eef2ff;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-text: #065f46;

  --tag-bg: #f1f5f9;
  --tag-text: #475569;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

/* Base resets & styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
}

/* Mobile Menu Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Main Content */
main {
  flex: 1;
}

/* Hero Section */
.hero {
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background-color: var(--success-bg);
  color: var(--success-text);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  max-width: 840px;
}

.hero-title span.highlight {
  color: var(--primary);
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 740px;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 12px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--border-subtle);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin-top: 0.5rem;
}

/* Cards & Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background-color: var(--accent-light);
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-badge.popular {
  background-color: var(--primary-light);
  color: var(--primary);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.card-list {
  list-style: none;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: bold;
}

.card-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Post Cards */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.post-tag {
  background-color: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Article Page Layout */
.article-header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.article-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-body {
  padding: 3rem 0;
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.65rem;
  margin: 2.25rem 0 1rem;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

.article-body h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.75rem;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.35rem;
  color: var(--text-main);
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body pre {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 1.5rem 0;
}

.article-body code {
  font-family: var(--font-mono);
  background-color: var(--bg-surface-subtle);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

/* Callout Box */
.callout {
  background-color: var(--primary-light);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 2rem 0;
}

.callout h4 {
  color: var(--primary);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Contact & Info Grid */
.info-box {
  background-color: var(--bg-surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* Badges list */
.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-brand-desc {
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 840px) {
  .hero-title {
    font-size: 2.15rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 4.25rem;
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

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


