/*
Theme Name: Lindzruns
Theme URI: https://example.com/
Author: Lindzruns
Description: A soft purple theme for the Lindzruns running blog.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: lindzruns
*/

:root {
  --ink: #241a3a;
  --indigo: #2e0b6b;
  --purple: #6a2bba;
  --violet: #8b5cd6;
  --lilac: #d9c8f2;
  --mist: #f3edfb;
  --paper: #fcfaff;
  --muted: #62567a;
  --radius: 14px;
  --font-head: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--indigo); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; color: var(--indigo); margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--indigo); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--lilac); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .6rem; }
.brand img { width: 190px; height: auto; }
.brand .custom-logo { width: 190px; height: auto; }
.primary-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.primary-nav a { display: block; padding: .5rem .9rem; border-radius: 999px; color: var(--indigo); text-decoration: none; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { background: var(--mist); color: var(--purple); }
.nav-toggle { display: none; background: var(--mist); color: var(--indigo); border: 0; border-radius: 999px; padding: .55rem 1.1rem; font: 600 .95rem var(--font-body); cursor: pointer; }

/* Hero: the logo's swoosh is the one memorable element */
.hero { background: var(--mist); position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 7rem); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 14ch; margin-bottom: .4em; }
.hero p { max-width: 46ch; color: var(--muted); font-size: 1.2rem; margin: 0 0 1.6rem; }
.hero-swoosh { position: absolute; right: -4%; bottom: -8%; width: min(760px, 85%); height: auto; color: var(--lilac); pointer-events: none; }
.hero-speed { position: absolute; right: 52%; bottom: 22%; width: 180px; color: var(--lilac); pointer-events: none; }

.button, .wp-block-button__link, input[type=submit] {
  display: inline-block; background: var(--purple); color: #fff; border: 0; border-radius: 999px;
  padding: .75rem 1.6rem; font: 600 1rem var(--font-body); text-decoration: none; cursor: pointer; transition: background .2s;
}
.button:hover, .wp-block-button__link:hover, input[type=submit]:hover { background: var(--indigo); color: #fff; }

/* Post grid */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-title { margin-bottom: 1.5rem; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.card { background: #fff; border: 1px solid var(--lilac); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--lilac), var(--mist)); display: block; overflow: hidden; }
.card-placeholder { width: 100%; height: 100%; color: #fff; opacity: .7; padding: 12%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card h2 { font-size: 1.3rem; margin: 0; }
.card h2 a { color: var(--indigo); text-decoration: none; }
.card h2 a:hover { color: var(--purple); }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.cat-list a { display: inline-block; background: var(--mist); color: var(--purple); padding: .15rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; text-decoration: none; margin-right: .3rem; }
.meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); font-size: .88rem; margin-top: auto; padding-top: .5rem; }

.card.featured { grid-column: 1 / -1; flex-direction: row; }
.card.featured .card-media { flex: 1.2; aspect-ratio: auto; min-height: 320px; }
.card.featured .card-body { flex: 1; justify-content: center; padding: 2rem 2.4rem; gap: .8rem; }
.card.featured h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.card.featured p { font-size: 1.05rem; }

.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { padding: .5rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--lilac); text-decoration: none; color: var(--indigo); }
.pagination .current { background: var(--purple); color: #fff; border-color: var(--purple); }

/* Single posts and pages */
.entry-header { background: var(--mist); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); }
.entry-header .narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.entry-header .meta { padding-top: 0; margin-top: 1rem; }
.entry-thumb { width: min(980px, 100% - 2.5rem); margin: -1.5rem auto 0; border-radius: var(--radius); overflow: hidden; position: relative; }
.entry-thumb img { width: 100%; }
.entry-content { width: min(720px, 100% - 2.5rem); margin: 2.5rem auto 4rem; }
.entry-content > * + * { margin-top: 1.3em; }
.entry-content h2, .entry-content h3 { margin-top: 2em; }
.entry-content blockquote { margin-inline: 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--violet); color: var(--indigo); font-family: var(--font-head); font-size: 1.25rem; line-height: 1.45; }
.entry-content img { border-radius: 10px; }
.entry-content figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.entry-content th, .entry-content td { padding: .6rem .8rem; border-bottom: 1px solid var(--lilac); text-align: left; }
.entry-content th { background: var(--mist); color: var(--indigo); }
.entry-content .alignwide { width: min(980px, 100vw - 2.5rem); margin-left: 50%; transform: translateX(-50%); }
.post-nav { width: min(720px, 100% - 2.5rem); margin: 0 auto 3rem; display: flex; justify-content: space-between; gap: 1rem; }
.post-nav a { text-decoration: none; font-weight: 600; }

/* Comments */
.comments { width: min(720px, 100% - 2.5rem); margin: 0 auto 4rem; }
.comments ol { list-style: none; padding: 0; }
.comments li { background: #fff; border: 1px solid var(--lilac); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.comments input[type=text], .comments input[type=email], .comments input[type=url], .comments textarea, .search-form input[type=search] {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--lilac); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}

/* Footer */
.site-footer { background: var(--mist); border-top: 1px solid var(--lilac); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-inner img { width: 150px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; padding: 0; }
.footer-nav a { color: var(--indigo); text-decoration: none; font-weight: 500; }
.footer-nav a:hover { color: var(--purple); }
.footer-note { width: 100%; color: var(--muted); font-size: .9rem; margin: 0; }

.not-found { text-align: center; padding: 6rem 0; }

@media (max-width: 900px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .card.featured { flex-direction: column; }
  .card.featured .card-media { min-height: 220px; flex: none; }
}
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--lilac); padding: .75rem 1.25rem 1rem; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .brand img, .brand .custom-logo { width: 150px; }
  .post-grid { grid-template-columns: 1fr; }
  .hero-speed { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* About page */
.about-grid { padding: clamp(2.5rem, 6vw, 4.5rem) 0; display: block; max-width: 720px; }
.about-grid.has-photo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; max-width: none; }
.about-photo { margin: 0; position: relative; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); position: relative; z-index: 1; }
.about-photo::after { content: ""; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; border-radius: var(--radius); background: var(--lilac); z-index: 0; }
.about-text > * + * { margin-top: 1.2em; }
.about-text h2, .about-text h3 { margin-top: 1.8em; }
.about-text ul { padding-left: 1.2rem; }
.about-text li + li { margin-top: .4rem; }
.about-cta { background: var(--mist); text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.about-cta p { color: var(--muted); margin: 0 0 1.4rem; }
@media (max-width: 800px) {
  .about-grid.has-photo { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .about-photo::after { inset: .8rem -.8rem -.8rem .8rem; }
}

/* Search and tag filter */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filter-bar { display: grid; gap: 1.1rem; margin-bottom: 2rem; }
.search-form { display: flex; gap: .6rem; max-width: 520px; }
.search-form input[type=search] { flex: 1; min-width: 0; width: auto; padding: .7rem 1.1rem; border: 1px solid var(--lilac); border-radius: 999px; font: inherit; background: #fff; color: var(--ink); }
.search-form .button { padding-inline: 1.4rem; }
.tag-chips { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.tag-chips a.chip { display: inline-block; background: var(--mist); border: 0; color: var(--purple); padding: .6rem 1.3rem; border-radius: 999px; text-decoration: none; font: 600 1rem/1.2 var(--font-body); transition: background .2s, color .2s; }
.tag-chips a.chip:hover { background: var(--purple); color: #fff; }
.tag-chips a.chip.is-active { background: var(--indigo); color: #fff; }
