/*
Theme Name: Soul Lantern
Theme URI: https://soul-lantern.com
Author: Soul Lantern
Author URI: https://soul-lantern.com
Description: A dark, minimal, image-led theme for soul-lantern.com — quiet navigation, big imagery, sparse typography. Inspired by the restrained aesthetics of colorsxstudios.com.
Version: 1.3.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: soul-lantern
Tags: dark, portfolio, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ------------------------------------------------------------------
   Soul Lantern — design tokens
   ------------------------------------------------------------------ */
:root {
  --sl-bg: #0a0a0a;
  --sl-bg-soft: #141414;
  --sl-fg: #f2f0ec;
  --sl-fg-dim: #8a8783;
  --sl-accent: #d8c48a; /* lantern glow */
  --sl-line: rgba(242, 240, 236, 0.14);
  --sl-font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sl-space: clamp(1.25rem, 4vw, 3rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sl-bg);
  color: var(--sl-fg);
  font-family: var(--sl-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover,
a:focus {
  opacity: 0.65;
}

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

::selection {
  background: var(--sl-accent);
  color: #0a0a0a;
}

/* ------------------------------------------------------------------
   Accessible skip link
   ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sl-fg);
  color: var(--sl-bg);
  padding: 0.5em 1em;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 85px;
  padding: 20px 16px; /* py-5 px-4 */
  background: transparent;
}

@media (min-width: 768px) {
  .site-header {
    padding: 24px 32px; /* md:py-6 md:px-8 */
  }
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.custom-logo {
  max-height: 40px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-title a {
  display: inline-block;
}

.site-title a::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.site-title a:hover::after {
  transform: scaleX(1);
}

/* Hamburger (top-right) — compact 44px button */
.nav-toggle {
  display: grid;
  place-content: center;
  align-items: center;
  justify-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-right: -11px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  z-index: 60;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-toggle:hover {
  opacity: 0.75;
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--sl-fg);
  outline-offset: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sl-fg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle:hover .nav-toggle__bar {
  background: var(--sl-fg);
}

body.nav-open .nav-toggle__bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .nav-toggle__bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Full-screen overlay menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sl-space);
  padding: calc(var(--sl-space) * 2) var(--sl-space) var(--sl-space);
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-overlay ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 3vh, 2rem);
}

.menu-overlay li {
  overflow: hidden;
}

.menu-overlay a {
  display: inline-block;
  font-size: clamp(2rem, 6.5vh, 4.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--sl-fg);
  transition: color 0.25s ease, transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.25s ease;
  transform: translateY(110%);
}

.menu-overlay.is-open a {
  transform: translateY(0);
}

.menu-overlay a:hover,
.menu-overlay a:focus,
.menu-overlay .current-menu-item > a {
  color: var(--sl-accent);
  opacity: 1;
}

.menu-overlay__tagline {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

/* ------------------------------------------------------------------
   Hero (front page)
   ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh; /* fallback */
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: var(--sl-space);
  overflow: hidden;
  z-index: 1;
  /* Break out of .site-main's 72rem column — cover the entire viewport */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.hero__media {
  position: absolute;
  inset: 0;
  background: var(--sl-bg-soft);
}

/* Image variant: zoom to fill (background-size: cover — no stretching) */
.hero__media--image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72) saturate(0.9);
}

/* In background-image mode the <img> is just the (hidden) fallback source */
.hero__media--image img {
  visibility: hidden;
}

/* Video variant: pinned to the viewport, covers the entire page.
   Must come AFTER .hero__media — the element carries both classes. */
.hero__media--video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  touch-action: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.1) 60%, rgba(10, 10, 10, 0.35));
}

.hero__content {
  position: relative;
  max-width: 60rem;
}

.hero__kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sl-accent);
}

.hero__title {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero__text {
  margin: 1.5rem 0 2.5rem;
  max-width: 34rem;
  color: var(--sl-fg-dim);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
}

/* "View" + "View all" row */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2.5rem;
}

/* ------------------------------------------------------------------
   Buttons — plain text links everywhere, no chrome
   ------------------------------------------------------------------ */
.sl-button,
.sl-button--ghost {
  display: inline-block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sl-fg);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: left;
  outline: none;
  cursor: pointer;
}

.sl-button::after,
.sl-button--ghost::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.sl-button:hover,
.sl-button:focus,
.sl-button:focus-visible,
.sl-button:active {
  opacity: 1;
  outline: none;
}

.sl-button:hover::after,
.sl-button:focus::after,
.sl-button:focus-visible::after,
.sl-button:active::after {
  transform: scaleX(1);
}

.sl-button--ghost {
  color: var(--sl-fg-dim);
}

.sl-button--ghost:hover,
.sl-button--ghost:focus,
.sl-button--ghost:focus-visible,
.sl-button--ghost:active {
  color: var(--sl-fg);
  opacity: 1;
  outline: none;
}

/* Native form submits (e.g. comment form) — same text treatment */
input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sl-fg);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s ease;
}

input[type="submit"]:hover,
input[type="submit"]:focus {
  color: var(--sl-accent);
  outline: none;
}

/* ------------------------------------------------------------------
   Sections / grid
   ------------------------------------------------------------------ */
.section {
  position: relative;
  z-index: 1;
  background: var(--sl-bg);
  padding: calc(var(--sl-space) * 2) var(--sl-space);
  border-top: 1px solid var(--sl-line);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--sl-space);
}

.section__title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

.section__link {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sl-fg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sl-space);
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Cards — compact tiles (320×60 at desktop), media zoom-crops inside */
.card {
  position: relative;
}

.card a {
  outline: none;
}

.card__media {
  position: relative;
  display: block;
  overflow: hidden;
  height: 60px;
  background: var(--sl-bg-soft);
  outline: none;
}

.card__media img,
.card__media video,
.card__media span {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.35s ease;
}

/* Video tiles zoom-crop to fill like the images do */
.card__video {
  display: block;
  background: var(--sl-bg-soft);
}

.card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.12) 70%);
}

/* Title + date sit inside the tile, bottom-left */
.card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.9rem;
}

.card__title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--sl-fg);
}

.card__meta {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
  line-height: 1.2;
}

/* Active/hover state: only gets whiter — no outline, no scale, no border */
.card:hover .card__media img,
.card:focus-within .card__media img,
.card:active .card__media img,
.card:hover .card__media video,
.card:focus-within .card__media video,
.card:active .card__media video {
  filter: brightness(1.25) saturate(1);
}

/* ------------------------------------------------------------------
   Prose (pages / single posts)
   ------------------------------------------------------------------ */
.site-main {
  padding: 0 var(--sl-space) calc(var(--sl-space) * 2);
  max-width: 72rem;
  margin: 0 auto;
}

/* Front page: one full screen, no scrolling */
body.home {
  overflow: hidden;
}

body.home .site-footer {
  display: none;
}

body {
  overflow-x: hidden;
}

.page-header {
  margin: 0 0 var(--sl-space);
  padding: 110px 0 var(--sl-space);
  border-bottom: 1px solid var(--sl-line);
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.page-title small,
.entry-meta {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

.entry-content {
  max-width: 42rem;
  font-size: 1.05rem;
}

.entry-content > * + * {
  margin-top: 1.4em;
}

.entry-content h2,
.entry-content h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.entry-content blockquote {
  margin: 2em 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--sl-accent);
  color: var(--sl-fg-dim);
  font-style: italic;
}

.entry-content img {
  border-radius: 2px;
}

.alignwide {
  max-width: 60rem;
}

.alignfull {
  max-width: none;
}

/* Single featured image */
.entry-hero {
  margin: 0 0 var(--sl-space);
  overflow: hidden;
}

.entry-hero img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

/* ------------------------------------------------------------------
   Full-screen cover (single posts) — video or image, like the hero
   ------------------------------------------------------------------ */
.cover {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  width: 100vw;
  margin: 0 calc(50% - 50vw) var(--sl-space);
  overflow: hidden;
}

.cover__media {
  position: absolute;
  inset: 0;
  background: var(--sl-bg-soft);
}

.cover__media img,
.cover__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7) saturate(0.9);
}

.cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.1) 60%, rgba(10, 10, 10, 0.35));
}

.cover__content {
  position: relative;
  width: 100%;
  padding: var(--sl-space);
  padding-top: 20vh;
}

.cover__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cover__meta {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sl-accent);
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
  margin-top: auto;
  position: relative;
  z-index: 1;
  background: var(--sl-bg);
  padding: var(--sl-space);
  border-top: 1px solid var(--sl-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--sl-fg);
}

/* ------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------ */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: clamp(4rem, 10vw, 7rem);
  padding: var(--sl-space) 0 0;
}

.pagination .page-numbers {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sl-fg-dim);
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
  color: var(--sl-fg);
  opacity: 1;
}

.pagination .page-numbers.current {
  color: var(--sl-accent);
  opacity: 1;
}

/* Comments */
.comments {
  border-top: 1px solid var(--sl-line);
  padding-top: 2.5rem;
}

.comments__title,
.comment-reply-title {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sl-fg-dim);
}

.comments__list,
.comments__list .children {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.comments__list .children {
  margin: 1.5rem 0 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--sl-line);
}

.comment-body {
  margin-bottom: 2rem;
}

.comment-author {
  font-weight: 600;
}

.comment-author a {
  color: inherit;
}

.comment-metadata {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.comment-metadata a,
.comment-reply-link {
  color: var(--sl-fg-dim);
}

.comment-content p {
  margin: 0.5rem 0 1rem;
}

.comments__closed {
  color: var(--sl-fg-dim);
}

body.is-light .comments {
  border-top-color: rgba(17, 17, 17, 0.12);
}

body.is-light .comments__list .children {
  border-left-color: rgba(17, 17, 17, 0.12);
}

body.is-light .comment-author a {
  color: #111111;
}

body.is-light .comment-metadata a,
body.is-light .comment-reply-link {
  color: rgba(17, 17, 17, 0.45);
}

body.is-light .comment-metadata a:hover,
body.is-light .comment-reply-link:hover {
  color: #111111;
}

/* Sticky footer layout */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content {
  flex: 1;
}

/* ------------------------------------------------------------------
   Light mode — article pages (colorsxstudios newsletter style)
   ------------------------------------------------------------------ */
body.is-light {
  background: #ffffff;
  color: #111111;
}

body.is-light ::selection {
  background: #111111;
  color: #ffffff;
}

/* Header switches to light (isLight) */
body.is-light .nav-toggle__bar {
  background: #111111;
}

body.is-light .nav-toggle:focus-visible {
  outline-color: #111111;
}

/* When the dark overlay is open, header goes back to white */
body.nav-open .nav-toggle__bar {
  background: var(--sl-fg);
}

body.nav-open .site-title {
  color: var(--sl-fg);
}

/* Article header: tiny date, big bold title */
.article-header {
  margin: 0 0 3.5rem;
  padding-top: 140px;
}

.article__back {
  display: inline-block;
  margin-bottom: 3rem;
}

.article__date {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  color: rgba(17, 17, 17, 0.45);
}

.article__title {
  margin: 0;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #111111;
  text-wrap: balance;
}

/* Body copy */
body.is-light .entry-content {
  font-size: 1.06rem;
  line-height: 1.75;
  color: rgba(17, 17, 17, 0.85);
}

body.is-light .entry-content a {
  color: #111111;
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.45);
  text-underline-offset: 4px;
  transition: opacity 0.2s ease;
}

body.is-light .entry-content a:hover,
body.is-light .entry-content a:focus {
  opacity: 0.55;
}

body.is-light .entry-content blockquote {
  border-left-color: #111111;
  color: rgba(17, 17, 17, 0.6);
}

/* Text buttons adapt to dark-on-light */
body.is-light .sl-button,
body.is-light .sl-button--ghost,
body.is-light input[type="submit"] {
  color: #111111;
}

body.is-light .sl-button::after,
body.is-light .sl-button--ghost::after {
  background: currentColor;
}

body.is-light input[type="submit"]:hover,
body.is-light input[type="submit"]:focus {
  color: #000000;
}

/* Comments area */
.comments-area {
  max-width: 40rem;
  margin-top: 4rem;
}

body.is-light input[type="text"],
body.is-light input[type="email"],
body.is-light input[type="url"],
body.is-light textarea {
  width: 100%;
  padding: 0.6em 0.8em;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.25);
  border-radius: 2px;
  color: #111111;
  font-family: inherit;
  font-size: 0.95rem;
}

body.is-light textarea:focus,
body.is-light input[type="text"]:focus,
body.is-light input[type="email"]:focus,
body.is-light input[type="url"]:focus {
  outline: none;
  border-color: #111111;
}

/* Footer goes light too */
body.is-light .site-footer {
  background: #ffffff;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}

body.is-light .site-footer p,
body.is-light .footer-nav a {
  color: rgba(17, 17, 17, 0.45);
}

body.is-light .footer-nav a:hover,
body.is-light .footer-nav a:focus {
  color: #111111;
}
