/*
Theme Name: Fathom
Theme URI: https://github.com/reginaldas/ai-seo-platform
Author: PBN Studio
Author URI: https://github.com/reginaldas
Description: Deep-water calm for professional writing. A drenched navy ground, ice text, hairline surfaces, and one ice-blue signal color. Precise, quiet, readable. Sora display over Schibsted Grotesk.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fathom
Tags: blog, magazine, news, dark, one-column, custom-logo, custom-menu, featured-images
*/

/* ------------------------------------------------------------------
   Tokens. One radius (10px), hairlines, no shadows. Depth comes
   from the navy steps, not from elevation.
------------------------------------------------------------------- */
:root {
  --deep: oklch(0.217 0.041 259);
  --surface: oklch(0.257 0.047 261);
  --recessed: oklch(0.190 0.032 257);
  --ice: oklch(0.945 0.010 262);
  --muted: oklch(0.712 0.030 258);
  --signal: oklch(0.799 0.103 254);
  --hairline: oklch(0.945 0.010 262 / 0.14);
  --hairline-strong: oklch(0.945 0.010 262 / 0.24);
  --font-display: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --container: 1160px;
  --measure: 700px;
  --step: 220ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------
   Reset
------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1.25em; }
figure { margin: 0; }
input, button, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--signal); color: var(--deep); padding: 12px 22px; border-radius: var(--radius);
}
.skip-link:focus { left: 16px; top: 16px; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
}

/* ------------------------------------------------------------------
   Header. Slim, solid, hairline under. No glass.
------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--deep);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 28px;
  height: 68px; display: flex; align-items: center; gap: 32px;
}
.site-branding { margin-right: auto; display: flex; align-items: center; min-width: 0; }
.site-branding .custom-logo { max-height: 36px; width: auto; }
.site-title { margin: 0; font-size: 1.12rem; font-weight: 700; letter-spacing: 0.01em; }
.site-title a { color: var(--ice); }
.site-title a:hover { color: var(--signal); text-decoration: none; }
.site-description { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 600; color: var(--muted);
  transition: color var(--step) var(--ease), background var(--step) var(--ease);
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--ice); background: var(--surface); text-decoration: none; }

/* ------------------------------------------------------------------
   Buttons. Filled signal with navy text, or quiet outline.
------------------------------------------------------------------- */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--signal); color: var(--deep);
  font-family: var(--font-display); font-weight: 700; font-size: 0.92rem;
  padding: 12px 24px; text-decoration: none; cursor: pointer;
  transition: background var(--step) var(--ease), transform var(--step) var(--ease);
}
.btn:hover { background: oklch(0.856 0.071 258); color: var(--deep); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline { background: transparent; border-color: var(--hairline-strong); color: var(--ice); }
.btn--outline:hover { border-color: var(--signal); color: var(--signal); background: transparent; }

/* ------------------------------------------------------------------
   Layout
------------------------------------------------------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.content-area { padding: 56px 0 88px; }
.narrow { max-width: var(--measure); margin: 0 auto; }

/* ------------------------------------------------------------------
   Home. A split deck: sticky manifest left, post stream right.
------------------------------------------------------------------- */
.home-deck {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px; align-items: start;
}
.home-aside { position: sticky; top: 108px; }
.home-aside h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); margin-bottom: 28px; overflow-wrap: break-word; }
/* Long Lithuanian taglines (over 40 chars) step down so the H1 holds 4 lines at most. */
.home-aside h1.home-aside__title--long { font-size: clamp(1.45rem, 2.1vw, 1.7rem); line-height: 1.24; }
.home-aside__topics { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--hairline); }
.home-aside__topics li { border-bottom: 1px solid var(--hairline); }
.home-aside__topics a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 2px; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  transition: color var(--step) var(--ease);
}
.home-aside__topics a:hover { color: var(--signal); text-decoration: none; }
.home-aside__topics .count { font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--muted); }
.home-aside .search-form { border-bottom: 1px solid var(--hairline-strong); }

/* Featured spread */
.feature-spread { border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feature-spread--text .feature-spread__body { padding: 38px 40px 40px; }
.feature-spread--text h2 { font-size: clamp(1.55rem, 2.5vw, 2.05rem); line-height: 1.22; margin: 16px 0 16px; }
.feature-spread--text p { max-width: 58ch; margin-bottom: 26px; }
.feature-spread__media img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.feature-spread__body { padding: 30px 32px 34px; }
.feature-spread__body h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin: 10px 0 12px; }
.feature-spread__body h2 a { color: var(--ice); }
.feature-spread__body h2 a:hover { color: var(--signal); text-decoration: none; }
.feature-spread__body p { color: var(--muted); margin-bottom: 20px; }
.feature-spread__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); }
.feature-spread__meta a { color: var(--signal); }

/* Stream rows. Big date numerals left, hairline separated. */
.stream { margin-top: 8px; }
.stream--flush { margin-top: 0; }
.stream__row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 28px;
  padding: 26px 0; border-bottom: 1px solid var(--hairline);
}
.stream__row--thumb { grid-template-columns: 84px minmax(0, 1fr) 128px; }
.stream__row:first-child { border-top: 1px solid var(--hairline); }
.stream__date { text-align: left; }
.stream__date .day {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ice);
}
.stream__date .month {
  display: block; margin-top: 6px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.stream__body h3 { font-size: 1.2rem; line-height: 1.28; margin: 0 0 8px; }
.stream__body h3 a { color: var(--ice); }
.stream__body h3 a:hover { color: var(--signal); text-decoration: none; }
.stream__body p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.stream__thumb { align-self: center; }
.stream__thumb img { width: 128px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--hairline); }

/* ------------------------------------------------------------------
   Single post
------------------------------------------------------------------- */
.single-head { max-width: 820px; margin: 0 0 30px; }
.single-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.2; margin: 16px 0; }
.single-head__meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
}
.single-head__meta .chip-read { color: var(--signal); }
.single-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--hairline); margin: 0 0 44px; }
.single-cover img { width: 100%; }

.entry-content { line-height: 1.8; }
.entry-content h2 { font-size: 1.62rem; margin-top: 1.9em; }
.entry-content h3 { font-size: 1.28rem; margin-top: 1.6em; }
.entry-content blockquote {
  margin: 2em 0; padding: 4px 0 4px 26px;
  border-left: 1px solid var(--signal);
  font-family: var(--font-display); font-size: 1.22rem; line-height: 1.55; font-weight: 600; color: var(--ice);
}
.entry-content blockquote cite { display: block; margin-top: 10px; font-family: var(--font-body); font-size: 0.82rem; font-style: normal; color: var(--muted); }
.entry-content pre { background: var(--recessed); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; overflow-x: auto; font-size: 0.88rem; color: var(--ice); }
.entry-content code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }
.entry-content :not(pre) > code { background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px; padding: 2px 7px; color: var(--signal); }
.entry-content img { border-radius: var(--radius); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--hairline); padding: 12px 14px; text-align: left; }
.entry-content th { font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.entry-content hr { border: none; border-top: 1px solid var(--hairline); margin: 2.6em auto; width: 72px; }
.entry-content figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.alignwide { width: min(940px, calc(100vw - 56px)); margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 0; padding-top: 26px; border-top: 1px solid var(--hairline); }
.post-tags a {
  padding: 6px 14px; border: 1px solid var(--hairline-strong); border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  transition: color var(--step) var(--ease), border-color var(--step) var(--ease);
}
.post-tags a:hover { color: var(--signal); border-color: var(--signal); text-decoration: none; }

/* Author panel */
.author-panel {
  margin-top: 44px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 26px 28px;
  display: flex; gap: 20px; align-items: flex-start;
}
.author-panel .avatar { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--hairline-strong); }
.author-panel h2 { font-size: 1.02rem; margin: 0 0 4px; }
.author-panel .author-panel__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.author-panel p:last-child { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* Prev / next */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.post-nav a {
  display: block; padding: 20px 22px; border: 1px solid var(--hairline); border-radius: var(--radius);
  transition: border-color var(--step) var(--ease);
}
.post-nav a:hover { border-color: var(--signal); text-decoration: none; }
.post-nav .post-nav__label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.post-nav .post-nav__title { font-family: var(--font-display); font-weight: 700; color: var(--ice); font-size: 1.02rem; line-height: 1.4; }
.post-nav .post-nav--next { text-align: right; }

/* ------------------------------------------------------------------
   Archive and search
------------------------------------------------------------------- */
.page-head { max-width: 760px; margin-bottom: 8px; padding-bottom: 26px; border-bottom: 1px solid var(--hairline-strong); }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.page-head p { color: var(--muted); margin: 8px 0 0; }

/* Pagination */
.pagination { margin-top: 52px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--hairline); font-weight: 600; font-size: 0.9rem; color: var(--muted);
  transition: color var(--step) var(--ease), border-color var(--step) var(--ease);
}
.pagination a.page-numbers:hover { color: var(--ice); border-color: var(--signal); text-decoration: none; }
.pagination .page-numbers.current { background: var(--signal); border-color: var(--signal); color: var(--deep); }
.pagination .page-numbers.dots { border-color: transparent; }

/* ------------------------------------------------------------------
   Comments
------------------------------------------------------------------- */
.comments-area { margin: 56px auto 0; max-width: var(--measure); }
.comments-area h2 { font-size: 1.15rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-body { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-list .children .comment-body { border-bottom: none; }
.comment-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.comment-meta .avatar { border-radius: 50%; }
.comment-meta .fn { font-family: var(--font-display); font-style: normal; }
.comment-metadata a { font-size: 0.78rem; color: var(--muted); }
.comment-form label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 18px; color: var(--ice);
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--signal); outline: none; }
.comment-form textarea { min-height: 140px; resize: vertical; }

/* ------------------------------------------------------------------
   Footer. A recessed well under the page.
------------------------------------------------------------------- */
.site-footer { background: var(--recessed); border-top: 1px solid var(--hairline); }
.site-footer__inner {
  max-width: var(--container); margin: 0 auto; padding: 56px 28px 36px;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px;
}
.site-footer__inner--solo { grid-template-columns: minmax(0, 1fr); }
.site-footer .footer-wordmark {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0 0 10px;
}
.site-footer .footer-wordmark a { color: var(--ice); }
.site-footer .footer-wordmark a:hover { color: var(--signal); text-decoration: none; }
.site-footer .footer-tagline { color: var(--muted); font-size: 0.94rem; margin: 0; max-width: 46ch; }
.footer-widgets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-widgets .widget { font-size: 0.92rem; color: var(--muted); }
.footer-widgets .widget-title { font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ice); margin: 0 0 12px; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-widgets a { color: var(--muted); }
.footer-widgets a:hover { color: var(--signal); }
.site-footer__bottom {
  max-width: var(--container); margin: 0 auto; padding: 20px 28px 32px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  font-size: 0.8rem; color: var(--muted);
}
.site-footer__bottom nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.site-footer__bottom a { color: var(--muted); }
.site-footer__bottom a:hover { color: var(--signal); }

/* ------------------------------------------------------------------
   404
------------------------------------------------------------------- */
.error-404 { text-align: center; padding: 80px 0; }
.error-404 h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
.error-404 h1 span { color: var(--signal); }
.error-404 p { color: var(--muted); max-width: 46ch; margin: 10px auto 30px; }
.error-404 .search-form { max-width: 420px; margin: 0 auto; border-bottom: 1px solid var(--hairline-strong); }

/* ------------------------------------------------------------------
   Search form. One quiet line with a trailing button.
------------------------------------------------------------------- */
.search-form { display: flex; align-items: center; gap: 12px; }
.search-form .search-field {
  flex: 1; min-width: 0; background: transparent; border: none;
  border-bottom: 1px solid transparent; padding: 10px 2px; color: var(--ice);
}
.search-form .search-field::placeholder { color: var(--muted); }
.search-form .search-field:focus { outline: none; border-bottom-color: var(--signal); }
.search-form .search-submit {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); padding: 10px 0;
}
.search-form .search-submit:hover { color: oklch(0.856 0.071 258); }
.header-search .search-form { gap: 0; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------- */
@media (max-width: 960px) {
  .home-deck, .site-footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .home-aside { position: static; }
  .home-aside__topics { display: none; }
  .stream__row, .stream__row--thumb { grid-template-columns: 72px minmax(0, 1fr); }
  .stream__thumb { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header__inner { height: 60px; padding: 0 20px; gap: 16px; }
  .site-nav { display: none; }
  .container { padding: 0 20px; }
  .feature-spread__body, .feature-spread--text .feature-spread__body { padding: 24px 22px 28px; }
  .stream__row, .stream__row--thumb { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stream__date { display: flex; gap: 10px; align-items: baseline; }
  .stream__date .month { margin-top: 0; }
  .single-head__meta { gap: 6px 14px; }
}

/* ------------------------------------------------------------------
   Motion. Color and one-pixel lifts only.
------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .pagination, .post-nav, .comments-area { display: none; }
  body { background: oklch(0.985 0.005 255); color: oklch(0.200 0.010 255); }
}
