/* =========================================================
   Oda — the daily vegan
   Enkel, varm og litt rustikk bloggdesign
   ========================================================= */

:root {
  --cream: #faf5ec;
  --cream-2: #f3ead7;
  --sage: #7a9461;
  --sage-dark: #4f6940;
  --terracotta: #d97757;
  --coral: #e8916a;
  --berry: #b85450;
  --ink: #2d2a26;
  --muted: #6b6359;
  --line: #e6d9bf;
  --shadow: 0 4px 20px rgba(60, 50, 30, 0.08);
  --shadow-lg: 0 12px 40px rgba(60, 50, 30, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a {
  color: var(--sage-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ===== Navigation ===== */
.nav {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(250, 245, 236, 0.94);
}

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

.brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--sage-dark);
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--terracotta);
  font-style: italic;
}

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

.nav-links a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links a:hover {
  color: var(--terracotta);
}

.nav-login {
  color: var(--muted) !important;
  font-size: 0.85rem !important;
  opacity: 0.6;
}

.nav-login:hover {
  opacity: 1;
  color: var(--sage-dark) !important;
}

/* ===== Container ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  flex: 1;
}

.container-narrow {
  max-width: 720px;
}

/* ===== Hero / Intro ===== */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(180deg, var(--cream-2) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 1rem;
}

.hero h1 em {
  color: var(--terracotta);
  font-style: italic;
}

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Post grid ===== */
.posts-section h2 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--sage-dark);
}

.posts-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--terracotta);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.post-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--cream-2);
}

.post-card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.post-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.post-card h3 a {
  color: inherit;
}

.post-card h3 a:hover {
  color: var(--terracotta);
}

.post-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}

.post-card-link {
  color: var(--sage-dark);
  font-weight: 500;
  font-size: 0.9rem;
  align-self: flex-start;
}

.post-card-link::after {
  content: ' →';
  transition: margin 0.2s ease;
  display: inline-block;
}

.post-card-link:hover::after {
  margin-left: 4px;
}

/* ===== Article (single post) ===== */
.article {
  background: white;
  border-radius: 14px;
  padding: 3rem clamp(1.5rem, 4vw, 3.5rem);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.article-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-header .post-meta {
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}

.article-image {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 2.5rem;
  background: var(--cream-2);
}

.article-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--sage-dark);
}

.article-content h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--ink);
}

.article-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.article-content li::marker {
  color: var(--terracotta);
}

.article-content blockquote {
  border-left: 3px solid var(--terracotta);
  padding: 0.5rem 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.5rem 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-link::before {
  content: '← ';
}

/* ===== Login page ===== */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 2rem 1.5rem;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--line);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--sage);
  background: white;
}

.btn {
  display: inline-block;
  background: var(--sage-dark);
  color: white;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background: var(--sage);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--cream-2);
  color: var(--ink);
}

.error-msg {
  background: #fde8e3;
  color: var(--berry);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.error-msg.show {
  display: block;
}

/* ===== Profile page ===== */
.profile-card {
  background: white;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.profile-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage) 0%, var(--terracotta) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow);
}

.profile-name {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.profile-role {
  color: var(--terracotta);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.profile-info {
  display: grid;
  gap: 1.25rem;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--line);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 500;
}

.info-value {
  color: var(--ink);
}

.info-value a {
  color: var(--terracotta);
}

.profile-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--cream-2);
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin-bottom: 0.25rem;
}

.footer .heart {
  color: var(--terracotta);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .nav-inner {
    gap: 1rem;
  }
  .nav-links {
    gap: 1rem;
  }
  .nav-links a {
    font-size: 0.88rem;
  }
  .brand {
    font-size: 1.3rem;
  }
  .article {
    padding: 2rem 1.5rem;
  }
  .info-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .login-card,
  .profile-card {
    padding: 2rem 1.5rem;
  }
}
