/*
  Root & Render theme
  --------------------
  This stylesheet defines a biomimetic + solarpunk aesthetic for the Root & Render
  blog. Colours are inspired by lush forest greens, sunlight yellows and
  vibrant plant life. Typography and spacing aim for readability and a calm,
  organic feel. This CSS includes resets, variables, layout styles and
  component styles for posts, tags and comments.
*/

/* Reset & base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji';
  line-height: 1.6;
  background: linear-gradient(180deg, #edf5e1 0%, #f8f9fa 100%);
  color: #2d3436;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Colour palette variables */
:root {
  --color-primary: #2d5432; /* deep forest green */
  --color-secondary: #f5a623; /* warm sunlight yellow */
  --color-accent: #35a8b7; /* fresh turquoise */
  --color-light: #ffffff;
  --color-dark: #1c2a24;
  --color-muted: #627f6c;
  --color-border: #dbe5d1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
  flex: 1;
}

/* Header */
.site-header {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  color: var(--color-light);
  padding: 1.5rem 0;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}
.site-header .site-title {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.site-header .site-title a {
  text-decoration: none;
  color: var(--color-light);
}
.site-header .tagline {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}
.site-nav a {
  color: var(--color-light);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.3s;
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.2);
}

/* Posts listing */
.post-preview {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.post-preview:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.post-preview h2 {
  margin-bottom: 0.25rem;
  color: var(--color-primary);
  font-size: 1.5rem;
}
.post-preview h2 a {
  text-decoration: none;
  color: inherit;
}
.post-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}
.post-summary {
  margin-bottom: 0.75rem;
}
.post-tags {
  margin-top: 0.5rem;
}
.tag {
  font-size: 0.8rem;
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--color-secondary);
  color: var(--color-dark);
  text-decoration: none;
  transition: background 0.3s;
}
.tag:hover {
  background: var(--color-accent);
  color: var(--color-light);
}

.filter-info {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.filter-info a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-accent);
}
.filter-info a:hover {
  border-bottom-style: solid;
}

/* Post detail */
.post-detail {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.post-detail .post-title {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: var(--color-primary);
}
.post-detail .post-meta {
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.post-detail .post-content p {
  margin-bottom: 1rem;
}
.post-detail .post-tags {
  margin-top: 1rem;
}

/* Comments */
.comments-section {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.comments-section h3 {
  margin-bottom: 0.75rem;
  color: var(--color-primary);
}
.comment {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}
.comment:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.comment-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}
.comment-text {
  font-size: 0.9rem;
}
.comment-form {
  margin-top: 1rem;
}
.comment-form .form-group {
  margin-bottom: 0.75rem;
}
.comment-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--color-dark);
}
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}
.comment-form textarea {
  resize: vertical;
}
.comment-form button {
  background: var(--color-primary);
  color: var(--color-light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}
.comment-form button:hover {
  background: var(--color-accent);
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: var(--color-light);
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
}

.site-footer p {
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }
  .site-header .site-title {
    font-size: 1.75rem;
  }
  .post-detail .post-title {
    font-size: 1.5rem;
  }
}