/*
Theme Name: Aktsiad
Theme URI: https://aktsiad.ee/blog
Author: Computernik OÜ
Description: Aktsiad.ee blogiteema — sobib peasaidi (Next.js) päise, jaluse ja värvidega.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: aktsiad
License: GNU General Public License v2 or later
*/

:root {
  --ak-slate-50: #f8fafc;
  --ak-slate-100: #f1f5f9;
  --ak-slate-200: #e2e8f0;
  --ak-slate-300: #cbd5e1;
  --ak-slate-400: #94a3b8;
  --ak-slate-500: #64748b;
  --ak-slate-600: #475569;
  --ak-slate-700: #334155;
  --ak-slate-800: #1e293b;
  --ak-slate-900: #0f172a;
  --ak-emerald-50: #ecfdf5;
  --ak-emerald-400: #34d399;
  --ak-emerald-600: #059669;
  --ak-emerald-700: #047857;
  --ak-amber-50: #fffbeb;
  --ak-amber-200: #fde68a;
  --ak-amber-950: #451a03;
  --ak-font: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ak-font);
  color: var(--ak-slate-900);
  background: linear-gradient(180deg, var(--ak-slate-50) 0%, #fff 45%, rgba(236, 253, 245, 0.45) 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ak-emerald-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.ak-site {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Header */
.ak-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ak-header-inner {
  margin: 0 auto;
  display: flex;
  max-width: 56rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.ak-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.ak-brand:hover {
  text-decoration: none;
}

.ak-brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.ak-brand-text {
  display: none;
  flex-direction: column;
}

@media (min-width: 640px) {
  .ak-brand-text {
    display: flex;
  }
}

.ak-brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ak-slate-900);
}

.ak-brand-sub {
  font-size: 0.625rem;
  letter-spacing: 0.02em;
  color: var(--ak-slate-500);
}

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

.ak-nav a {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ak-slate-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ak-nav a:hover {
  color: var(--ak-slate-900);
  text-decoration: none;
}

.ak-nav a.is-active {
  color: var(--ak-emerald-700);
}

/* Main */
.ak-main {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  max-width: 48rem;
  padding: 2rem 1rem 3rem;
}

.ak-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ak-slate-900);
}

.ak-page-lead {
  margin: 0 0 2rem;
  font-size: 0.95rem;
  color: var(--ak-slate-600);
}

.ak-disclaimer {
  margin: 0 0 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(253, 230, 138, 0.85);
  background: rgba(255, 251, 235, 0.85);
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
  color: var(--ak-amber-950);
}

/* Posts list */
.ak-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.ak-post-card {
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.92);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ak-post-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.ak-post-card h2 a {
  color: var(--ak-slate-900);
  text-decoration: none;
}

.ak-post-card h2 a:hover {
  color: var(--ak-emerald-700);
}

.ak-meta {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  color: var(--ak-slate-500);
}

.ak-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ak-slate-700);
}

.ak-pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.ak-pagination a {
  font-weight: 500;
}

/* Single / page content */
.ak-article-header {
  margin-bottom: 1.5rem;
}

.ak-prose {
  font-size: 1rem;
  color: var(--ak-slate-700);
}

.ak-prose > *:first-child {
  margin-top: 0;
}

.ak-prose h1,
.ak-prose h2,
.ak-prose h3,
.ak-prose h4 {
  color: var(--ak-slate-900);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.ak-prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.ak-prose h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.ak-prose p,
.ak-prose ul,
.ak-prose ol {
  margin: 0 0 1rem;
}

.ak-prose a {
  color: var(--ak-emerald-700);
  font-weight: 500;
}

.ak-prose blockquote {
  margin: 1.25rem 0;
  border-left: 3px solid var(--ak-emerald-600);
  padding-left: 1rem;
  color: var(--ak-slate-600);
}

.ak-prose code {
  font-size: 0.9em;
  border-radius: 0.25rem;
  background: var(--ak-slate-100);
  padding: 0.1em 0.35em;
}

.ak-prose pre {
  overflow-x: auto;
  border-radius: 0.75rem;
  background: var(--ak-slate-900);
  color: #e2e8f0;
  padding: 1rem;
}

.ak-prose pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.ak-prose img {
  border-radius: 0.75rem;
}

.ak-back {
  margin-top: 2.5rem;
  font-size: 0.875rem;
}

/* Footer */
.ak-footer {
  margin-top: auto;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.6);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ak-slate-500);
}

.ak-footer-links {
  margin: 0 auto 0.75rem;
  display: flex;
  max-width: 48rem;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.ak-footer-links a {
  color: var(--ak-slate-600);
}

.ak-footer-links a:hover {
  color: var(--ak-emerald-700);
}

.ak-footer-note {
  margin: 0;
}

/* 404 */
.ak-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.ak-empty p {
  color: var(--ak-slate-600);
}
