/*
Theme Name: Swagloop
Theme URI: https://blog.swagloop.com
Author: Swagloop
Author URI: https://swagloop.com
Description: Standalone Swagloop block theme for the blog. Reproduces the dev.swagloop.com design language — near-black canvas with warm orange glow, Instrument Serif italic orange accents, dark frosted nav pill, dark elevated cards, and full-pill buttons.
Version: 1.0.1
Requires at least: 6.7
Tested up to: 6.8
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: swagloop
*/

/* ===============================================================
   Swagloop brand tokens — lifted from the live dev.swagloop.com
=============================================================== */
:root {
  --sl-bg: #0A0A0A;
  --sl-surface: #161310;
  --sl-surface-2: #211C17;
  --sl-text: #F5F3F0;       /* headings / near-white */
  --sl-body: #B8B2AC;       /* body copy */
  --sl-muted: #8A847E;      /* secondary / eyebrow */
  --sl-stroke: rgba(255,255,255,.10);
  --sl-stroke-strong: rgba(255,255,255,.16);
  --sl-orange: #ff5e00;
  --sl-orange-soft: #ff8a3d;
  --sl-orange-deep: #d9431e;
  --sl-radius: 20px;
  --sl-shadow: 0 1px 2px rgba(0,0,0,.5), 0 16px 48px rgba(0,0,0,.55);
  --sl-glow: 0 10px 40px rgba(255,94,0,.30);
}

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  position: relative;
  background: var(--sl-bg);
  color: var(--sl-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Visible keyboard focus ring (dark-theme scoped) */
:where(a, button, summary, input, select, textarea, .wp-block-button__link, .wp-block-search__button):focus-visible {
  outline: 2px solid var(--sl-orange-soft);
  outline-offset: 2px;
  border-radius: 9999px;
}

/* Warm radial glow anchored to the top of the page (scrolls away with the hero, like dev) */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  background:
    radial-gradient(60% 100% at 18% -8%, rgba(255,94,0,.18), transparent 60%),
    radial-gradient(50% 90% at 88% -12%, rgba(255,138,61,.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.wp-site-blocks { position: relative; z-index: 1; }

/* ---- Display accent: white sans heading + Instrument Serif italic orange accent ---- */
.sl-display {
  font-family: 'Manrope', Inter, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--sl-text);
}
.sl-display em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--sl-orange);
  letter-spacing: 0;
}

/* ---- Eyebrow label (— UPPERCASE TRACKED) ---- */
.sl-eyebrow {
  font-size: 0.72rem !important;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--sl-muted);
  font-weight: 600;
  margin: 0;
}
.sl-eyebrow-line { display: flex; align-items: center; }
.sl-eyebrow-line::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--sl-stroke-strong);
  margin-right: 14px;
}

/* ===============================================================
   Header — dark frosted, centered, sticky nav pill
=============================================================== */
.sl-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 16px 12px 8px;
  background: transparent;
  pointer-events: none;
}
.sl-nav {
  pointer-events: auto;
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 auto;
  padding: 7px 9px 7px 14px;
  background: rgba(22,19,16,.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--sl-stroke);
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
  max-width: calc(100vw - 24px);
}

/* Brand: gradient "S" badge + wordmark */
.sl-nav .wp-block-site-title {
  margin: 0 6px 0 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 1.32rem;
  letter-spacing: 0;
}
.sl-nav .wp-block-site-title a {
  color: var(--sl-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.sl-nav .wp-block-site-title a::before {
  content: "S";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--sl-orange-soft), var(--sl-orange));
  color: #fff;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(255,94,0,.4);
}

/* Desktop primary nav (fully controlled markup) */
.sl-desktop-nav { display: flex; align-items: center; gap: 2px; }
.sl-desktop-nav a {
  border-radius: 9999px;
  padding: 8px 14px;
  color: var(--sl-body);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.sl-desktop-nav a:hover { color: var(--sl-text); background: rgba(255,255,255,.07); }

/* Mobile hamburger — pure CSS, no JS (details/summary) */
.sl-mobile-nav { display: none; position: relative; }
.sl-mobile-nav summary {
  list-style: none;
  cursor: pointer;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
}
.sl-mobile-nav summary::-webkit-details-marker { display: none; }
.sl-mobile-nav summary:hover { background: rgba(255,255,255,.07); }
.sl-burger, .sl-burger::before, .sl-burger::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--sl-text);
  transition: transform .2s ease, background-color .2s ease;
}
.sl-burger { position: relative; }
.sl-burger::before { position: absolute; top: -6px; left: 0; }
.sl-burger::after  { position: absolute; top: 6px;  left: 0; }
.sl-mobile-nav[open] .sl-burger { background: transparent; }
.sl-mobile-nav[open] .sl-burger::before { transform: translateY(6px) rotate(45deg); }
.sl-mobile-nav[open] .sl-burger::after  { transform: translateY(-6px) rotate(-45deg); }
.sl-mobile-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 230px;
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(22,19,16,.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sl-stroke);
  border-radius: 20px;
  box-shadow: var(--sl-shadow);
  padding: 14px;
}
.sl-mobile-panel a {
  padding: 13px 16px;
  border-radius: 14px;
  color: var(--sl-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
}
.sl-mobile-panel a:hover { background: rgba(255,255,255,.07); }
.sl-mobile-panel .sl-mobile-cta {
  background: var(--sl-orange);
  color: #fff;
  text-align: center;
  margin-top: 6px;
  border-radius: 9999px;
  font-weight: 600;
}
.sl-cta-wrap { margin-left: 4px; }

/* ===============================================================
   Buttons — orange pill with glow (CTA), used in nav + hero + footer
=============================================================== */
.wp-block-button.sl-cta .wp-block-button__link,
.sl-cta .wp-block-button__link {
  background: var(--sl-orange);
  color: #fff;
  border-radius: 9999px;
  padding: 11px 22px;
  font-family: 'Manrope', Inter, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  box-shadow: var(--sl-glow);
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.sl-cta .wp-block-button__link:hover {
  background: var(--sl-orange-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 46px rgba(255,94,0,.42);
}
/* Outline / ghost button variant (dark) */
.sl-ghost .wp-block-button__link {
  background: transparent;
  color: var(--sl-text);
  border: 1px solid var(--sl-stroke-strong);
  border-radius: 9999px;
  padding: 11px 22px;
  font-family: 'Manrope', Inter, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color .18s ease, border-color .18s ease;
}
.sl-ghost .wp-block-button__link:hover { background: rgba(255,255,255,.06); border-color: var(--sl-stroke-strong); }

/* ===============================================================
   Hero — warm radial wash + serif accent headline
=============================================================== */
.sl-main { margin-top: 0; }
.sl-hero {
  padding: 5.5rem 1.5rem 3.5rem;
  text-align: center;
}
.sl-hero .sl-display {
  font-size: clamp(2.6rem, 1.6rem + 4vw, 4.4rem);
  margin: 0.6rem auto 1.1rem;
  max-width: 16ch;
}
.sl-hero .sl-eyebrow { display: inline-block; margin-bottom: 1rem; }
.sl-lead {
  color: var(--sl-body);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 40rem;
  margin: 0 auto;
}

/* ===============================================================
   Sections + post-card grid
=============================================================== */
.sl-section { padding: 2.75rem 1.25rem 4rem; }
.sl-section > .sl-eyebrow-line { margin-bottom: 1.5rem; }
.sl-grid { gap: 1.5rem !important; }

.sl-card {
  background: var(--sl-surface);
  border: 1px solid var(--sl-stroke);
  border-radius: var(--sl-radius);
  padding: 12px;
  box-shadow: var(--sl-shadow);
  transition: transform .25s ease, border-color .25s ease;
  height: 100%;
  overflow: hidden;
}
.sl-card:hover { transform: translateY(-4px); border-color: rgba(255,94,0,.4); }
.sl-card .wp-block-post-featured-image { margin: 0; }
.sl-card .wp-block-post-featured-image img { border-radius: 14px; width: 100%; }
.sl-card-body { padding: 16px 8px 8px; }
.sl-card-cat { margin: 0 0 9px !important; }
.sl-card-cat a { color: var(--sl-orange); text-decoration: none; }
.sl-card-title { font-family: 'Manrope', Inter, sans-serif; font-size: 1.18rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 9px; color: var(--sl-text); }
.sl-card-title a { color: var(--sl-text); text-decoration: none; }
.sl-card-title a:hover { color: var(--sl-orange); }
.sl-card-excerpt { color: var(--sl-muted); font-size: 0.95rem; line-height: 1.55; margin: 0 0 12px; }
.sl-card-date { color: var(--sl-muted); font-size: 0.8rem; }

/* ===============================================================
   Single article
=============================================================== */
.sl-single { padding-top: 1rem; }
.sl-article-head { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.25rem 0.5rem; }
.sl-article-head .sl-eyebrow a { color: var(--sl-orange); text-decoration: none; }
.sl-article-title {
  font-family: 'Manrope', Inter, sans-serif;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0.6rem 0;
  color: var(--sl-text);
}
.sl-article-meta { gap: 14px; color: var(--sl-muted); font-size: 0.9rem; align-items: center; }
.sl-article-meta a { color: var(--sl-muted); text-decoration: none; }
.sl-article-img { margin: 1.5rem auto; }
.sl-article-img img { border-radius: var(--sl-radius); }
.sl-single .wp-block-post-content { font-size: 1.1rem; line-height: 1.8; color: var(--sl-body); }
.sl-single .wp-block-post-content > * { margin-block: 1.15em; }
.sl-single .wp-block-post-content :is(h2,h3,h4) { color: var(--sl-text); margin-top: 2em; }
.sl-single .wp-block-post-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Archive / search header */
.sl-archive-head { padding: 4rem 1.25rem 0; text-align: center; }
.sl-archive-title {
  font-family: 'Manrope', Inter, sans-serif;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sl-text);
}
.sl-archive-sub { color: var(--sl-muted); margin-top: .5rem; }

/* ===============================================================
   Footer — warm bottom glow, status dot, legal
=============================================================== */
.sl-footer {
  position: relative;
  background:
    radial-gradient(70% 120% at 50% 140%, rgba(255,94,0,.16), transparent 60%),
    var(--sl-bg);
  border-top: 1px solid var(--sl-stroke);
  padding: 5rem 1.5rem 2.5rem;
  margin-top: 4rem;
}
.sl-footer-inner { max-width: 1100px; margin: 0 auto; }
.sl-foot-cta { text-align: center; margin-bottom: 3.5rem; }
.sl-foot-cta .sl-eyebrow { display: inline-block; margin-bottom: 0.75rem; }
.sl-foot-cta .sl-display { font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); margin: 0.25rem 0 1.75rem; }
.sl-foot-bar {
  border-top: 1px solid var(--sl-stroke);
  padding-top: 1.5rem;
  align-items: center;
  gap: 1rem;
}
.sl-foot-status { display: flex; align-items: center; gap: 9px; color: var(--sl-body); font-size: 0.9rem; margin: 0; }
.sl-foot-status::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sl-orange);
  box-shadow: 0 0 0 0 rgba(255,94,0,.5);
  animation: sl-pulse 2s ease-out infinite;
}
@keyframes sl-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,94,0,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(255,94,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,94,0,0); }
}
.sl-social { font-size: 0.85rem; margin: 0; color: var(--sl-muted); }
.sl-social a { color: var(--sl-muted); text-decoration: none; }
.sl-social a:hover { color: var(--sl-orange); }
.sl-legal { color: var(--sl-muted); font-size: 0.75rem; margin-top: 1.5rem; }
.sl-legal a { color: var(--sl-muted); text-decoration: underline; }
.sl-legal a:hover { color: var(--sl-orange); }

/* ===============================================================
   Pagination + misc
=============================================================== */
.sl-pagination { margin-top: 2.5rem; gap: 0.75rem; }
.sl-pagination a, .sl-pagination .page-numbers { color: var(--sl-muted); text-decoration: none; }
.sl-pagination a:hover { color: var(--sl-orange); }
.sl-pagination .current { color: var(--sl-orange); font-weight: 700; }

a { text-underline-offset: 3px; }
.wp-block-image img, .wp-block-post-content img { border-radius: 14px; }
.wp-block-quote { border-left: 3px solid var(--sl-orange); padding-left: 1.15rem; font-style: normal; color: var(--sl-text); }
.wp-block-code, .wp-block-preformatted { background: var(--sl-surface); border: 1px solid var(--sl-stroke); border-radius: 12px; padding: 1rem 1.15rem; color: var(--sl-text); }
hr.wp-block-separator { border-color: var(--sl-stroke); opacity: 1; }

/* Search block (dark) */
.wp-block-search__inside-wrapper {
  background: var(--sl-surface);
  border: 1px solid var(--sl-stroke);
  border-radius: 9999px;
  padding: 5px 5px 5px 8px;
  max-width: 420px;
  margin: 1.5rem auto 0;
}
.wp-block-search .wp-block-search__input {
  background: transparent;
  border: 0;
  color: var(--sl-text);
  padding: 8px 12px;
}
.wp-block-search .wp-block-search__input::placeholder { color: var(--sl-muted); }
.wp-block-search .wp-block-search__button {
  background: var(--sl-orange);
  color: #fff;
  border: 0;
  border-radius: 9999px;
  padding: 9px 18px;
  font-weight: 600;
}
.wp-block-search .wp-block-search__button:hover { background: var(--sl-orange-deep); }

/* 404 */
.sl-404 { text-align: center; padding: 6rem 1.5rem; }
.sl-404 .sl-display { font-size: clamp(3rem, 2rem + 5vw, 6rem); margin-bottom: 1rem; }

/* ===============================================================
   Mobile
=============================================================== */
@media (max-width: 600px) {
  /* Compact pill: S badge + hamburger. Links + CTA move into the menu. */
  .sl-nav { gap: 6px; padding: 6px 8px; }
  .sl-nav .wp-block-site-title a { font-size: 0; gap: 0; }
  .sl-nav .wp-block-site-title a::before { font-size: 17px; }
  .sl-desktop-nav { display: none !important; }
  .sl-cta-wrap { display: none !important; }
  .sl-mobile-nav { display: block !important; }
  .sl-hero { padding-top: 4rem; }
  .sl-section { padding-left: 1rem; padding-right: 1rem; }
}
