/*
 * Lonera Magazine — custom styles
 * Loaded from functions.php (handle: lonera-magazine).
 * The theme header stays in the child theme root style.css.
 *
 * What is set elsewhere is deliberately NOT repeated here:
 *   - Newsmatic Customizer: colours, buttons, hover effects, sidebar
 *     layout, breadcrumbs, background.
 *   - Elementor Site Settings: global colours and fonts for everything
 *     built with Elementor (the homepage).
 * This file only covers the theme-rendered parts the free Newsmatic
 * cannot style: archive, single post, header, footer, widgets.
 */

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --lo-ink: #06080c;
  --lo-panel: #0e131a;
  --lo-line: rgba(255, 255, 255, 0.1);
  --lo-text: #e9edf3;
  --lo-muted: #8c97a6;
  --lo-teal: #3fd0d4;
  --lo-plum: #b478d8;
  --lo-wash: linear-gradient(135deg, #3a1236 0%, #101a24 52%, #06333a 100%);

  --lo-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --lo-serif: 'Newsreader', Georgia, serif;

  --lo-radius: 12px;
  --lo-radius-sm: 8px;
}

/* =========================================================
   2. Self-hosted fonts
   Upload the woff2 files to assets/fonts/, then uncomment.
   Never load these from Google — GDPR, same rule as on lonera.org.
   ========================================================= */
/*
@font-face {
	font-family: 'Archivo';
	src: url('../fonts/archivo-variable.woff2') format('woff2');
	font-weight: 400 800;
	font-display: swap;
}
@font-face {
	font-family: 'Newsreader';
	src: url('../fonts/newsreader-variable.woff2') format('woff2');
	font-weight: 400 700;
	font-display: swap;
}
*/

/* =========================================================
   3. Typography
   The free Newsmatic has no font controls, so this is set here.
   ========================================================= */
body {
  font-family: var(--lo-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.entry-title,
.post-title {
  font-family: var(--lo-serif);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0;
}

.entry-content p,
.entry-content li {
  font-family: var(--lo-serif);
  font-size: 17px;
  line-height: 1.65;
}

/* Keep the interface in the sans face. */
.site-header,
.main-navigation,
.widget-title,
.post-meta,
.entry-meta,
.breadcrumb,
button,
input,
select {
  font-family: var(--lo-sans);
}

.main-navigation a,
.menu-item a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Comfortable measure for article text. */
.single .entry-content > p,
.single .entry-content > ul,
.single .entry-content > ol {
  max-width: 68ch;
}

/* =========================================================
   4. Accessibility
   ========================================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--lo-teal);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   5. Header gradient
   ========================================================= */
.site-header,
.newsmatic-header-wrapper {
  background: linear-gradient(
    90deg,
    #150a18 0%,
    var(--lo-ink) 55%,
    #04252b 100%
  );
  border-bottom: 1px solid var(--lo-line);
}

.newsmatic-top-header,
.top-header {
  background: transparent;
  border-bottom: 1px solid var(--lo-line);
}

/* =========================================================
   6. Images in theme-rendered lists (archive, single, related)
   The homepage is built with Elementor, so the theme's own banner
   is not used — no hero rules needed here.
   ========================================================= */
article img,
.post-thumbnail img,
.post-item img {
  border-radius: var(--lo-radius-sm);
}

/* =========================================================
   7. Widgets and sidebar
   ========================================================= */
.widget,
.sidebar .widget {
  background: var(--lo-panel);
  border: 1px solid var(--lo-line);
  border-radius: var(--lo-radius);
  padding: 16px;
}

.widget-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--lo-muted);
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.widget-title::after {
  content: '';
  display: block;
  width: 26px;
  height: 2px;
  background: var(--lo-teal);
  margin-top: 6px;
}

/* =========================================================
   8. Newsletter block (MailerLite)
   Wrap the form in <div class="lo-newsletter"> … </div>
   ========================================================= */
.lo-newsletter {
  background: var(--lo-wash);
  border: 0;
  border-radius: var(--lo-radius);
  padding: 18px;
}

.lo-newsletter h3 {
  font-family: var(--lo-serif);
  font-size: 19px;
  margin: 0 0 8px;
}

.lo-newsletter p {
  font-family: var(--lo-sans);
  font-size: 12.5px;
  color: #d3dbe5;
  margin: 0 0 14px;
}

.lo-newsletter input[type='email'] {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--lo-line);
  border-radius: 7px;
  padding: 10px;
  color: var(--lo-text);
  font-family: var(--lo-sans);
  font-size: 13px;
}

.lo-newsletter button {
  width: 100%;
  margin-top: 8px;
  background: #fff;
  color: var(--lo-ink);
  border: 0;
  border-radius: 7px;
  padding: 10px;
  font-family: var(--lo-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   9. Ad slots (Advanced Ads)
   Give each placement the class lo-ad; add is-live once real
   creatives run, so the dashed placeholder border disappears.
   ========================================================= */
.lo-ad {
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: var(--lo-radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c7685;
  font-family: var(--lo-sans);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  margin: 22px 0;
}

.lo-ad.is-live {
  border: 0;
  min-height: 0;
  padding: 0;
}

/* =========================================================
   10. Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--lo-line);
  color: var(--lo-muted);
  font-family: var(--lo-sans);
  font-size: 12px;
}
