/*
Theme Name: Ucatru Signal Weave
Theme URI: https://ucatru.com/
Author: Ucatru Editorial
Description: A fast, accessible editorial theme designed for Ucatru.com and Elementor Pro.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: ucatru-signal-weave
*/

:root {
  --sw-ink: #171619;
  --sw-paper: #f7f2e8;
  --sw-paper-2: #fffdf8;
  --sw-aubergine: #32113e;
  --sw-plum: #54215e;
  --sw-coral: #f35b45;
  --sw-mint: #a8dfcb;
  --sw-lime: #d8ef70;
  --sw-lavender: #d9c9e9;
  --sw-blue: #8cbde7;
  --sw-peach: #efb470;
  --sw-line: rgba(23, 22, 25, .22);
  --sw-muted: #6e6970;
  --sw-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Baskerville, Georgia, serif;
  --sw-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sw-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sw-wrap: 1180px;
  --sw-reading: 760px;
  --sw-radius: 2px;
  --sw-shadow: 0 22px 70px rgba(31, 15, 35, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--sw-ink);
  background: var(--sw-paper);
  font-family: var(--sw-sans);
  font-size: 17px;
  line-height: 1.72;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--sw-coral); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sw-coral); outline-offset: 3px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 0;
  padding: .75rem 1rem; left: 1rem; top: 1rem; z-index: 100000;
  background: var(--sw-paper-2); color: var(--sw-ink);
}
.sw-wrap { width: min(calc(100% - 40px), var(--sw-wrap)); margin-inline: auto; }
.sw-reading { width: min(100%, var(--sw-reading)); margin-inline: auto; }
.sw-kicker, .sw-eyebrow {
  margin: 0 0 .75rem;
  color: var(--sw-plum);
  font-family: var(--sw-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.sw-kicker::before { content: ""; display: inline-block; width: 36px; border-top: 2px solid currentColor; margin: 0 .65rem .18rem 0; }
.sw-display, .entry-title, .archive-title {
  font-family: var(--sw-serif);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: .98;
}

/* Global header */
.sw-utility {
  color: #fff;
  background: var(--sw-ink);
  font-family: var(--sw-mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sw-utility .sw-wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 32px; gap: 1rem;
}
.sw-utility-dot { color: var(--sw-coral); margin-right: .4rem; }
.sw-site-header {
  position: sticky; top: 0; z-index: 999;
  background: rgba(247, 242, 232, .97);
  border-bottom: 1px solid var(--sw-line);
  backdrop-filter: blur(14px);
}
.admin-bar .sw-site-header { top: 32px; }
.sw-header-inner {
  min-height: 88px; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}
.sw-brand {
  flex: 0 0 auto;
  font-family: var(--sw-serif);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1;
  text-decoration: none;
}
.sw-brand:hover { color: var(--sw-ink); }
.sw-primary-nav { margin-left: auto; }
.sw-menu, .sw-primary-nav ul {
  display: flex; align-items: center; gap: clamp(.8rem, 1.55vw, 1.45rem);
  margin: 0; padding: 0; list-style: none;
}
.sw-primary-nav a {
  position: relative;
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: .84rem; font-weight: 700; text-decoration: none;
}
.sw-primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 7px;
  border-top: 2px solid var(--sw-coral); transition: right .2s ease;
}
.sw-primary-nav a:hover::after, .sw-primary-nav .current-menu-item > a::after { right: 0; }
.sw-menu-toggle {
  display: none; align-items: center; gap: .55rem;
  min-height: 44px; padding: .5rem .75rem; border: 1px solid var(--sw-ink);
  border-radius: 0; color: var(--sw-ink); background: transparent;
  font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.sw-menu-icon, .sw-menu-icon::before, .sw-menu-icon::after {
  display: block; width: 19px; border-top: 2px solid currentColor;
}
.sw-menu-icon { position: relative; }
.sw-menu-icon::before, .sw-menu-icon::after { content: ""; position: absolute; left: 0; }
.sw-menu-icon::before { top: -7px; }
.sw-menu-icon::after { top: 3px; }

/* Shared cards and archives */
.sw-main { min-height: 55vh; }
.sw-archive-hero { padding: clamp(3.5rem, 8vw, 7rem) 0 3rem; border-bottom: 1px solid var(--sw-line); }
.archive-title { max-width: 820px; margin: 0; font-size: clamp(3.2rem, 8vw, 7rem); }
.archive-description { max-width: 720px; margin: 1.25rem 0 0; color: var(--sw-muted); }
.archive-description p { margin: 0; }
.sw-post-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px; padding: 2px 0 clamp(4rem, 8vw, 7rem);
}
.sw-card {
  grid-column: span 6;
  display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  min-height: 300px; color: var(--sw-ink); background: var(--sw-paper-2);
  border: 1px solid var(--sw-line);
}
.sw-card:nth-child(3n) { grid-column: span 12; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.sw-post-grid > .sw-card:only-child { grid-column: span 12; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.sw-card-media { position: relative; min-height: 220px; overflow: hidden; background: var(--sw-lavender); }
.sw-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.sw-card:hover .sw-card-media img { transform: scale(1.025); }
.sw-card-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--sw-serif); font-size: 5rem; color: rgba(50,17,62,.7);
}
.sw-card-body { display: flex; flex-direction: column; padding: clamp(1.25rem, 2.8vw, 2.25rem); }
.sw-card-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--sw-plum); font-family: var(--sw-mono); font-size: .67rem; font-weight: 700; text-transform: uppercase; }
.sw-card-title { margin: .75rem 0; font-family: var(--sw-serif); font-size: clamp(1.6rem, 2.5vw, 2.45rem); line-height: 1.02; letter-spacing: -.035em; }
.sw-card-title a { text-decoration: none; }
.sw-card-excerpt { margin: 0 0 1.25rem; color: var(--sw-muted); font-size: .92rem; }
.sw-card-route { margin-top: auto; font-family: var(--sw-mono); font-size: .7rem; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.navigation.pagination { width: 100%; margin: 0 0 5rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .75rem; border: 1px solid var(--sw-line); text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--sw-aubergine); border-color: var(--sw-aubergine); }

/* Single posts: boxed, deliberate widths */
.sw-article-shell { padding: clamp(3rem, 7vw, 6rem) 0 clamp(5rem, 9vw, 8rem); }
.sw-article-frame { width: min(calc(100% - 40px), 960px); margin-inline: auto; }
.sw-breadcrumbs { margin-bottom: 2rem; font-family: var(--sw-mono); font-size: .69rem; font-weight: 700; text-transform: uppercase; }
.sw-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.sw-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .45rem; color: var(--sw-muted); }
.sw-article-header { width: min(100%, 820px); margin-inline: auto; text-align: center; }
.sw-article-header .entry-title { margin: .85rem 0 1.25rem; font-size: clamp(2.8rem, 7vw, 5.65rem); }
.sw-article-deck { max-width: 700px; margin: 0 auto 1.4rem; color: var(--sw-muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.sw-byline { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; font-family: var(--sw-mono); font-size: .69rem; font-weight: 700; text-transform: uppercase; }
.sw-featured-image { margin: clamp(2.25rem, 5vw, 4rem) 0; background: var(--sw-lavender); box-shadow: var(--sw-shadow); }
.sw-featured-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sw-article-content {
  width: min(100%, var(--sw-reading)); margin-inline: auto;
  font-family: var(--sw-serif); font-size: clamp(1.08rem, 1.8vw, 1.2rem); line-height: 1.82;
}
.sw-article-content > p:first-child::first-letter {
  float: left; margin: .1em .13em 0 0; color: var(--sw-aubergine);
  font-family: var(--sw-serif); font-size: 4.2em; font-weight: 600; line-height: .72;
}
.sw-article-content h2, .sw-prose h2 {
  margin: 3.2rem 0 1rem; font-family: var(--sw-serif);
  font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.035em; line-height: 1.05;
}
.sw-article-content h3, .sw-prose h3 {
  margin: 2.25rem 0 .75rem; font-family: var(--sw-serif);
  font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.15;
}
.sw-article-content p, .sw-prose p { margin: 0 0 1.4rem; }
.sw-article-content ul, .sw-article-content ol, .sw-prose ul, .sw-prose ol { margin: 0 0 1.5rem; padding-left: 1.35rem; }
.sw-article-content li + li, .sw-prose li + li { margin-top: .55rem; }
.sw-article-content blockquote, .sw-prose blockquote {
  margin: 2.5rem 0; padding: 1.4rem 1.5rem 1.4rem 2rem;
  border-left: 5px solid var(--sw-coral); background: var(--sw-paper-2);
  font-size: 1.12em; font-style: italic;
}
.sw-article-content table, .sw-prose table { width: 100%; margin: 2rem 0; border-collapse: collapse; font-family: var(--sw-sans); font-size: .92rem; }
.sw-article-content th, .sw-article-content td, .sw-prose th, .sw-prose td { padding: .85rem; border: 1px solid var(--sw-line); text-align: left; vertical-align: top; }
.sw-article-content th, .sw-prose th { background: var(--sw-lavender); }
.sw-inline-route {
  margin: 2rem 0; padding: 1.25rem 1.4rem; border: 1px solid var(--sw-aubergine);
  color: var(--sw-aubergine); background: rgba(217, 201, 233, .3);
  font-family: var(--sw-sans); font-size: .92rem;
}
.sw-inline-route a { font-weight: 800; }
.sw-article-tags { width: min(100%, var(--sw-reading)); margin: 2.75rem auto 0; padding-top: 1.4rem; border-top: 1px solid var(--sw-line); font-family: var(--sw-mono); font-size: .72rem; text-transform: uppercase; }
.sw-author-box { width: min(100%, var(--sw-reading)); margin: 3rem auto 0; padding: 1.5rem; border: 1px solid var(--sw-line); background: var(--sw-paper-2); }
.sw-author-box h2 { margin: 0 0 .5rem; font-family: var(--sw-serif); font-size: 1.6rem; }
.sw-author-box p { margin: 0; color: var(--sw-muted); }
.sw-related { margin-top: clamp(4rem, 8vw, 7rem); padding-top: 2.5rem; border-top: 1px solid var(--sw-line); }
.sw-related-heading { margin: 0 0 1.5rem; font-family: var(--sw-serif); font-size: clamp(2rem, 4vw, 3.5rem); }
.sw-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sw-related-card { border: 1px solid var(--sw-line); background: var(--sw-paper-2); }
.sw-related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.sw-related-card div { padding: 1rem; }
.sw-related-card h3 { margin: .35rem 0 0; font-family: var(--sw-serif); font-size: 1.4rem; line-height: 1.08; }
.sw-related-card a { text-decoration: none; }

/* Standard pages */
.sw-page-shell { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem); }
.sw-page-header { width: min(100%, 900px); margin: 0 auto 3rem; text-align: center; }
.sw-page-header .entry-title { margin: 0; font-size: clamp(3rem, 8vw, 6.7rem); }
.sw-prose { width: min(100%, 820px); margin-inline: auto; }
.sw-prose > p, .sw-prose > ul, .sw-prose > ol { font-family: var(--sw-serif); font-size: 1.1rem; line-height: 1.8; }
.sw-prose .sw-contact-form { font-family: var(--sw-sans); }
.sw-notice { margin: 0 0 1.5rem; padding: 1rem 1.15rem; border: 1px solid var(--sw-aubergine); background: var(--sw-lavender); }
.sw-notice.is-success { border-color: #285a47; background: var(--sw-mint); }
.sw-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.sw-field { display: grid; gap: .4rem; }
.sw-field.is-wide { grid-column: 1 / -1; }
.sw-field label { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.sw-field input, .sw-field textarea, .sw-field select {
  width: 100%; min-height: 52px; padding: .8rem .9rem;
  color: var(--sw-ink); background: var(--sw-paper-2); border: 1px solid var(--sw-ink); border-radius: 0;
}
.sw-field textarea { min-height: 190px; resize: vertical; }
.sw-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: .75rem 1.2rem; color: #fff; background: var(--sw-aubergine);
  border: 1px solid var(--sw-aubergine); border-radius: 0;
  font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
}
.sw-button:hover { color: var(--sw-aubergine); background: transparent; }

/* 404 */
.sw-empty { padding: 8rem 0; text-align: center; }
.sw-empty h1 { margin: 0 0 1rem; font-family: var(--sw-serif); font-size: clamp(4rem, 12vw, 10rem); line-height: .9; }

/* Global footer */
.sw-site-footer { color: #fff; background: var(--sw-aubergine); }
.sw-newsletter { color: var(--sw-ink); background: var(--sw-coral); }
.sw-newsletter .sw-wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
.sw-newsletter h2 { margin: 0; font-family: var(--sw-serif); font-size: clamp(2.5rem, 6vw, 5rem); line-height: .94; letter-spacing: -.04em; }
.sw-newsletter p { max-width: 580px; margin: 1rem 0 0; }
.sw-newsletter-form { display: flex; align-items: end; gap: .75rem; }
.sw-newsletter-form label { flex: 1; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sw-newsletter-form input { width: 100%; min-height: 52px; margin-top: .35rem; padding: .75rem .85rem; border: 1px solid var(--sw-ink); border-radius: 0; background: var(--sw-paper-2); }
.sw-footer-main { display: grid; grid-template-columns: 1.4fr repeat(3, .7fr); gap: 2.5rem; padding-block: clamp(3.5rem, 7vw, 6rem); }
.sw-footer-brand { font-family: var(--sw-serif); font-size: clamp(2.25rem, 4vw, 3.4rem); line-height: 1; text-decoration: none; }
.sw-footer-blurb { max-width: 350px; color: rgba(255,255,255,.68); font-size: .9rem; }
.sw-footer-heading { margin: 0 0 .9rem; color: var(--sw-mint); font-family: var(--sw-mono); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.sw-footer-links { margin: 0; padding: 0; list-style: none; }
.sw-footer-links li + li { margin-top: .48rem; }
.sw-footer-links a { color: rgba(255,255,255,.78); font-size: .86rem; text-decoration: none; }
.sw-footer-links a:hover { color: #fff; }
.sw-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0 1.6rem; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.62); font-family: var(--sw-mono); font-size: .65rem; text-transform: uppercase; }

/* Elementor guardrails */
.elementor-page .site-main, .elementor-page main { margin: 0; padding: 0; }
.elementor-page .entry-content { margin: 0; }
.elementor-widget-shortcode .elementor-shortcode { display: block; }

@media (max-width: 1080px) {
  .sw-menu-toggle { display: inline-flex; }
  .sw-primary-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; padding: 1rem 20px 1.25rem;
    background: var(--sw-paper); border-bottom: 1px solid var(--sw-line);
  }
  .sw-primary-nav.is-open { display: block; }
  .sw-menu, .sw-primary-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem 1rem; }
  .sw-primary-nav a { padding: .35rem 0; }
  .sw-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 782px) {
  .admin-bar .sw-site-header { top: 46px; }
  .sw-utility .sw-wrap { justify-content: center; }
  .sw-utility-right { display: none; }
  .sw-header-inner { min-height: 74px; }
  .sw-card, .sw-card:nth-child(3n) { grid-column: span 12; grid-template-columns: 1fr; }
  .sw-card-media { min-height: 250px; }
  .sw-newsletter .sw-wrap, .sw-footer-main { grid-template-columns: 1fr 1fr; }
  .sw-newsletter-form { align-items: stretch; flex-direction: column; }
  .sw-contact-grid { grid-template-columns: 1fr; }
  .sw-field.is-wide { grid-column: auto; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .sw-wrap, .sw-article-frame { width: min(calc(100% - 28px), var(--sw-wrap)); }
  .sw-brand { font-size: 1.8rem; }
  .sw-menu, .sw-primary-nav ul { grid-template-columns: 1fr; }
  .sw-primary-nav { max-height: calc(100vh - 110px); overflow-y: auto; }
  .sw-related-grid, .sw-newsletter .sw-wrap, .sw-footer-main { grid-template-columns: 1fr; }
  .sw-footer-bottom { flex-direction: column; }
  .sw-article-content table, .sw-prose table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
