/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: #f7f1e7;
  --bg-alt: #efe6d6;
  --ink: #2a241c;
  --ink-soft: #6b6154;
  --ink-faint: #9a8f7d;
  --accent: #a2482c;
  --accent-soft: #c98a4b;
  --line: rgba(42, 36, 28, 0.14);
  --card-bg: #fffaf2;

  --max: 1100px;
  --max-narrow: 640px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1812;
    --bg-alt: #262019;
    --ink: #efe6d6;
    --ink-soft: #b8ab96;
    --ink-faint: #7d7261;
    --accent: #e0895f;
    --accent-soft: #c98a4b;
    --line: rgba(239, 230, 214, 0.14);
    --card-bg: #241f18;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: var(--max-narrow); }

a { color: inherit; }

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 231, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(28, 24, 18, 0.86); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  gap: 32px;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav a {
    padding: 16px 32px;
    border-top: 1px solid var(--line);
  }
  body.menu-open .site-nav { max-height: 300px; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 96px 0 88px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: center;
}
.hero-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -20px rgba(20, 15, 8, 0.35);
  display: flex;
  align-items: flex-end;
  padding: 18px;
  transition: background 0.6s ease;
  position: relative;
  overflow: hidden;
}
.hero-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-cover-title {
  font-family: var(--font-serif);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.25;
}
.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.35;
  margin: 0 0 20px;
  min-height: 2em;
  transition: opacity 0.4s ease;
}
.hero-source {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}
.hero-source-dot { margin: 0 8px; }
.hero-reroll {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.hero-reroll:hover { border-color: var(--accent); }

@media (max-width: 640px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-cover { width: 140px; }
}

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 12px;
}
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 20px;
  line-height: 1.2;
}
.section-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 48px;
}

/* ==========================================================================
   Works — books
   ========================================================================== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 88px;
}
.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -18px rgba(20, 15, 8, 0.3);
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}
.book-card:hover .book-cover { transform: translateY(-4px); }
.book-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover-title {
  font-family: var(--font-serif);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.25;
}
.book-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0 0 4px;
}
.book-year {
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.book-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 8px 0 0;
  line-height: 1.55;
}

/* ==========================================================================
   Works — andra verk
   ========================================================================== */
.other-works-block { margin-top: 16px; }
.songs-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  margin: 0 0 24px;
}
.other-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 32px;
}
.other-work-cover {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  box-shadow: 0 16px 32px -18px rgba(20, 15, 8, 0.3);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.other-work-card:hover .other-work-cover { transform: translateY(-4px); }
.other-work-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.other-work-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}
.other-work-title a {
  color: inherit;
  text-decoration: none;
}
.other-work-title a:hover { color: var(--accent); }
.other-work-desc {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 4px 0 0;
  line-height: 1.4;
}
.other-work-year {
  color: var(--ink-faint);
  font-size: 0.8rem;
}
.other-work-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 8px 0 0;
  white-space: pre-line;
}

/* ==========================================================================
   Right Now
   ========================================================================== */
.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.note-item {
  position: relative;
  padding: 4px 0 40px 32px;
}
.note-item::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.note-item:first-child .note-text {
  font-size: 1.15rem;
}
.note-date {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.note-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Favorites
   ========================================================================== */
.favorites-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.favorite-card {
  padding: 28px 24px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.favorite-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -20px rgba(20, 15, 8, 0.3);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-inner { text-align: left; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.form-row input,
.form-row textarea {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
}
.btn-send {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-send:hover { background: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.footer-admin {
  text-decoration: none;
  color: var(--ink-faint);
  opacity: 0.6;
}
.footer-admin:hover { opacity: 1; }
