/*
Theme Name: Unimatix Ledger
Theme URI: https://unimatix.com
Author: Symfor
Author URI: https://unimatix.com
Description: The Unimatix blog theme. Dark, mint-accented, built around the brand's ledger-of-work idea — every post is a numbered entry. Matches the unimatix.com homepage: near-black surfaces, emerald accents, coral CTAs, Fraunces italic for emphasis.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: unimatix-ledger
License: GNU General Public License v2 or later
License URI: LICENSE
*/

/* ==========================================================================
   0. DESIGN TOKENS — matched to the unimatix.com homepage
   ========================================================================== */

:root {
  --um-base:       #0B0E14;
  --um-band:        #10141C;
  --um-surface:      #141924;
  --um-surface-2:     #171E29;
  --um-ink:            #F4F2EC;
  --um-ink-soft:        #A6ADB8;
  --um-ink-faint:        #6B7280;
  --um-mint:               #3ECF8E;
  --um-mint-dim:            rgba(62, 207, 142, 0.14);
  --um-coral:                 #FF6F52;
  --um-coral-hover:             #FF8567;
  --um-line:                     rgba(255, 255, 255, 0.09);
  --um-line-soft:                  rgba(255, 255, 255, 0.05);

  --um-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --um-font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --um-font-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --um-max: 1180px;
  --um-radius: 6px;
}

/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--um-base);
  color: var(--um-ink);
  font-family: var(--um-font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--um-mint); text-decoration: none; }
ul, ol { padding-left: 1.2em; }
figure { margin: 0; }

::selection { background: var(--um-mint); color: #06110C; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--um-font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--um-ink);
}

em, .um-accent-italic {
  font-family: var(--um-font-display);
  font-style: italic;
  color: var(--um-mint);
}

.um-container {
  max-width: var(--um-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* Mono uppercase label, used for eyebrows, tags, meta */
.um-tag {
  font-family: var(--um-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--um-ink-faint);
}

.um-tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--um-mint);
  display: inline-block;
  margin-right: 8px;
}

.um-rule {
  border: none;
  border-top: 1px solid var(--um-line);
  margin: 0;
}

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

/* ==========================================================================
   2. HEADER
   ========================================================================== */

.um-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--um-line);
}

.um-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--um-max);
  margin: 0 auto;
}

.um-logo {
  font-family: var(--um-font-body);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--um-ink);
  display: flex;
  align-items: center;
  gap: 7px;
}

.um-logo .um-logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--um-coral);
  display: inline-block;
}
.um-logo .um-logo-dot::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--um-mint);
  margin-left: -3px;
  vertical-align: top;
}

.um-logo img { max-height: 26px; width: auto; }

.um-primary-nav ul {
  list-style: none;
  display: flex;
  gap: 34px;
  margin: 0;
  padding: 0;
}

.um-primary-nav a {
  font-family: var(--um-font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--um-ink-soft);
  position: relative;
  padding-bottom: 4px;
}

.um-primary-nav a:hover,
.um-primary-nav .current-menu-item > a {
  color: var(--um-mint);
}

.um-primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--um-mint);
  transition: right 0.25s cubic-bezier(.4,0,.2,1);
}

.um-primary-nav a:hover::after { right: 0; }

.um-header-cta {
  font-family: var(--um-font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  background: var(--um-coral);
  color: #1A0A04;
  padding: 10px 18px;
  border-radius: 20px;
  font-weight: 500;
}
.um-header-cta:hover { background: var(--um-coral-hover); }

.um-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  width: 40px; height: 40px;
  cursor: pointer;
}
.um-menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--um-ink);
  margin: 4px auto;
}

/* ==========================================================================
   3. MASTHEAD / SECTION BAND
   ========================================================================== */

.um-band {
  background: radial-gradient(ellipse at top, rgba(62,207,142,0.06), transparent 60%), var(--um-base);
  border-bottom: 1px solid var(--um-line);
}

.um-masthead {
  padding: 72px 32px 52px;
  max-width: var(--um-max);
  margin: 0 auto;
}

.um-masthead .um-tag { margin-bottom: 18px; display: flex; align-items: center; }

.um-masthead h1 {
  font-size: clamp(38px, 5.5vw, 66px);
  max-width: 16ch;
  color: var(--um-ink);
}

.um-masthead p {
  max-width: 54ch;
  color: var(--um-ink-soft);
  font-size: 19px;
  margin-top: 16px;
}

/* ==========================================================================
   4. POST LEDGER (archive / home grid)
   ========================================================================== */

.um-ledger {
  max-width: var(--um-max);
  margin: 0 auto;
  padding: 8px 32px 80px;
}

.um-entry {
  display: grid;
  grid-template-columns: 90px 1fr 260px;
  gap: 36px;
  padding: 40px 0;
  border-bottom: 1px solid var(--um-line);
  align-items: start;
}

.um-entry:first-child { padding-top: 44px; }

.um-entry-index {
  font-family: var(--um-font-mono);
  font-size: 14px;
  color: var(--um-ink-faint);
  padding-top: 6px;
}

.um-entry-index .um-cat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: 8px;
  background: var(--um-mint);
}

.um-entry-body h2 {
  font-size: 27px;
  margin-bottom: 10px;
}

.um-entry-body h2 a {
  color: var(--um-ink);
  background-image: linear-gradient(var(--um-mint), var(--um-mint));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.3s ease;
  padding-bottom: 2px;
}
.um-entry-body h2 a:hover {
  background-size: 100% 2px;
  color: var(--um-mint);
}

.um-entry-excerpt {
  color: var(--um-ink-soft);
  font-size: 16px;
  max-width: 62ch;
}

.um-entry-meta {
  font-family: var(--um-font-mono);
  font-size: 12.5px;
  color: var(--um-ink-faint);
  margin-top: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.um-entry-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--um-radius);
  background: var(--um-surface);
  border: 1px solid var(--um-line);
}
.um-entry-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.16,1,.3,1);
}
.um-entry:hover .um-entry-thumb img { transform: scale(1.04); }

.um-entry-sticky {
  background: var(--um-mint-dim);
  border: 1px solid rgba(62,207,142,0.25);
  border-radius: var(--um-radius);
  padding: 32px 24px;
  margin: 0 -24px 8px;
  border-bottom: 1px solid rgba(62,207,142,0.25);
}

/* Featured / first entry gets more room */
.um-entry.um-featured {
  grid-template-columns: 90px 1fr;
}
.um-entry.um-featured .um-entry-body h2 { font-size: 36px; }

@media (max-width: 860px) {
  .um-entry { grid-template-columns: 50px 1fr; }
  .um-entry-thumb { display: none; }
}

/* ==========================================================================
   5. SINGLE POST
   ========================================================================== */

.um-post-header {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px 32px 32px;
  text-align: left;
}

.um-post-header .um-tag { margin-bottom: 16px; }

.um-post-header h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.um-post-header .um-post-sub {
  color: var(--um-ink-soft);
  font-size: 19px;
  margin-top: 16px;
  max-width: 60ch;
}

.um-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--um-line);
  font-family: var(--um-font-mono);
  font-size: 13px;
  color: var(--um-ink-faint);
}

.um-byline img {
  width: 34px; height: 34px;
  border-radius: 50%;
}
.um-byline strong { color: var(--um-ink); font-weight: 600; }

.um-post-cover {
  max-width: var(--um-max);
  margin: 8px auto 0;
  padding: 0 32px;
}
.um-post-cover img {
  border-radius: var(--um-radius);
  aspect-ratio: 16/8;
  object-fit: cover;
  width: 100%;
  border: 1px solid var(--um-line);
}

.um-post-content {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 0 32px;
  font-size: 18.5px;
  line-height: 1.75;
  color: var(--um-ink);
}

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

.um-post-content h2 {
  font-size: 30px;
  margin-top: 2em;
  padding-top: 0.2em;
}
.um-post-content h2::before {
  content: "";
  display: block;
  width: 40px; height: 3px;
  background: var(--um-mint);
  margin-bottom: 22px;
}
.um-post-content h3 { font-size: 23px; margin-top: 1.8em; }

.um-post-content p { color: var(--um-ink); }
.um-post-content a { border-bottom: 1px solid var(--um-mint); }
.um-post-content a:hover { background: rgba(62,207,142,0.1); }

.um-post-content blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--um-coral);
  font-family: var(--um-font-display);
  font-style: italic;
  font-size: 23px;
  color: var(--um-ink);
}

.um-post-content code {
  font-family: var(--um-font-mono);
  background: var(--um-surface);
  border: 1px solid var(--um-line);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.88em;
  color: var(--um-mint);
}
.um-post-content pre {
  background: var(--um-surface);
  border: 1px solid var(--um-line);
  color: #DCE3E8;
  padding: 22px 24px;
  border-radius: var(--um-radius);
  overflow-x: auto;
  font-size: 14.5px;
}
.um-post-content pre code { background: none; border: none; padding: 0; color: inherit; }

.um-post-content img {
  border-radius: var(--um-radius);
  width: 100%;
  border: 1px solid var(--um-line);
}
.um-post-content figcaption {
  font-family: var(--um-font-mono);
  font-size: 13px;
  color: var(--um-ink-faint);
  margin-top: 10px;
  text-align: center;
}

.um-post-content ul li, .um-post-content ol li { margin-bottom: 0.5em; }

.um-post-footer {
  max-width: 720px;
  margin: 56px auto 0;
  padding: 32px 32px 0;
  border-top: 1px solid var(--um-line);
}

.um-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.um-tags a {
  font-family: var(--um-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--um-line);
  border-radius: 20px;
  padding: 6px 14px;
  color: var(--um-ink-soft);
}
.um-tags a:hover { border-color: var(--um-mint); color: var(--um-mint); }

/* Author + next/prev card */
.um-post-nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.um-post-nav a {
  display: block;
  background: var(--um-surface);
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  padding: 22px;
  color: var(--um-ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.um-post-nav a:hover { border-color: var(--um-mint); transform: translateY(-2px); }
.um-post-nav .um-tag { display: block; margin-bottom: 8px; }
.um-post-nav .um-nav-next { text-align: right; grid-column: 2; }
@media (max-width: 640px) {
  .um-post-nav { grid-template-columns: 1fr; }
  .um-post-nav .um-nav-next { grid-column: 1; text-align: left; }
}

/* ==========================================================================
   6. SIDEBAR / WIDGETS
   ========================================================================== */

.um-widget {
  margin-bottom: 44px;
}
.um-widget-title {
  font-family: var(--um-font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--um-ink-faint);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--um-line);
}
.um-widget ul { list-style: none; padding: 0; margin: 0; }
.um-widget li { margin-bottom: 10px; }
.um-widget a { color: var(--um-ink); }
.um-widget a:hover { color: var(--um-mint); }

.um-newsletter {
  background: var(--um-surface);
  border: 1px solid var(--um-line);
  color: var(--um-ink);
  padding: 28px;
  border-radius: var(--um-radius);
}
.um-newsletter h3 { color: var(--um-ink); font-size: 20px; }
.um-newsletter p { color: var(--um-ink-soft); font-size: 14.5px; margin: 8px 0 18px; }
.um-newsletter input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--um-line);
  background: var(--um-base);
  color: var(--um-ink);
  border-radius: var(--um-radius);
  font-family: var(--um-font-body);
  margin-bottom: 10px;
}
.um-newsletter input[type="email"]::placeholder { color: var(--um-ink-faint); }
.um-newsletter button {
  width: 100%;
  background: var(--um-coral);
  color: #1A0A04;
  border: none;
  padding: 11px;
  border-radius: 20px;
  font-family: var(--um-font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
}
.um-newsletter button:hover { background: var(--um-coral-hover); }

/* ==========================================================================
   7. LAYOUT WRAPPER for single (content + sidebar)
   ========================================================================== */

.um-layout {
  max-width: var(--um-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0 64px;
  padding: 0 32px;
}
.um-layout .um-post-header,
.um-layout .um-post-content,
.um-layout .um-post-footer,
.um-layout .um-post-nav { padding-left: 0; padding-right: 0; margin-left: 0; max-width: none; }
.um-sidebar { padding-top: 56px; }

@media (max-width: 940px) {
  .um-layout { grid-template-columns: 1fr; }
  .um-sidebar { padding-top: 0; }
}

/* ==========================================================================
   8. PAGINATION
   ========================================================================== */

.um-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 32px 80px;
  font-family: var(--um-font-mono);
  font-size: 14px;
}
.um-pagination a, .um-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  color: var(--um-ink-soft);
}
.um-pagination .current { background: var(--um-mint); color: #06110C; border-color: var(--um-mint); }
.um-pagination a:hover { border-color: var(--um-mint); color: var(--um-mint); }

/* ==========================================================================
   9. COMMENTS
   ========================================================================== */

.um-comments {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.um-comments h3 { font-size: 22px; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list article {
  padding: 20px 0;
  border-top: 1px solid var(--um-line);
}
.comment-author { font-weight: 600; font-size: 15px; color: var(--um-ink); }
.comment-metadata { font-family: var(--um-font-mono); font-size: 12px; color: var(--um-ink-faint); margin-bottom: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  font-family: var(--um-font-body);
  font-size: 15px;
  margin-bottom: 14px;
  background: var(--um-surface);
  color: var(--um-ink);
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input {
  width: auto;
  background: var(--um-coral);
  color: #1A0A04;
  border: none;
  border-radius: 20px;
  padding: 12px 26px;
  font-family: var(--um-font-mono);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.05em;
  font-weight: 500;
  cursor: pointer;
}
.comment-form .form-submit input:hover { background: var(--um-coral-hover); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.um-site-footer {
  background: var(--um-band);
  border-top: 1px solid var(--um-line);
  color: var(--um-ink-soft);
  margin-top: 40px;
}
.um-footer-inner {
  max-width: var(--um-max);
  margin: 0 auto;
  padding: 64px 32px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.um-footer-brand p { font-size: 14.5px; margin-top: 14px; max-width: 32ch; color: var(--um-ink-faint); }
.um-footer-col h4 {
  font-family: var(--um-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--um-ink-faint);
  margin-bottom: 16px;
}
.um-footer-col ul { list-style: none; padding: 0; margin: 0; }
.um-footer-col li { margin-bottom: 10px; }
.um-footer-col a { color: var(--um-ink-soft); font-size: 14.5px; }
.um-footer-col a:hover { color: var(--um-mint); }
.um-footer-bottom {
  max-width: var(--um-max);
  margin: 0 auto;
  padding: 24px 32px;
  border-top: 1px solid var(--um-line);
  display: flex;
  justify-content: space-between;
  font-family: var(--um-font-mono);
  font-size: 12px;
  color: var(--um-ink-faint);
}

@media (max-width: 760px) {
  .um-footer-inner { grid-template-columns: 1fr 1fr; }
  .um-footer-bottom { flex-direction: column; gap: 10px; }
}

/* ==========================================================================
   11. RESPONSIVE NAV
   ========================================================================== */

@media (max-width: 760px) {
  .um-primary-nav { display: none; }
  .um-menu-toggle { display: block; }
  .um-primary-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--um-base);
    border-bottom: 1px solid var(--um-line);
    padding: 20px 32px 28px;
  }
  .um-primary-nav.is-open ul { flex-direction: column; gap: 18px; }
}

/* ==========================================================================
   12. WHATSAPP CLASSIFICATION PILL (matches homepage message tags)
   ========================================================================== */

.um-wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--um-font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--um-mint);
  background: var(--um-mint-dim);
  border: 1px solid rgba(62,207,142,0.3);
  border-radius: 20px;
  padding: 3px 10px;
}
.um-wa-pill::before { content: "✓"; font-size: 10px; }

/* ==========================================================================
   13. MISC
   ========================================================================== */

.um-empty {
  max-width: var(--um-max);
  margin: 0 auto;
  padding: 80px 32px;
  text-align: center;
}
.um-empty h2 { font-size: 30px; }
.um-empty p { color: var(--um-ink-soft); }

.wp-caption { max-width: 100%; }
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin: 0 auto; }
