/*
Theme Name: TrialLine Blog
Theme URI: https://blog.trialline.net
Description: TrialLine-branded child theme of GeneratePress for blog.trialline.net. Quiet editorial styling — serif headlines, hairline rules, one accent. Ships via CI and source control so it survives a container/volume rebuild.
Author: TrialLine
Template: generatepress
Version: 1.3.0
*/

/* ============================================================================
   TOKENS — one accent (red). Blue is for inline links only.
   ========================================================================== */
:root {
  --tl-red:      #c5211a;
  --tl-red-dark: #9d1a15;
  --tl-blue:     #1273c0;
  --tl-ink:      #16191d;
  --tl-body:     #3d434b;
  --tl-muted:    #767d87;
  --tl-rule:     #e7e9ec;
  --tl-footer:   #14181d;

  --tl-serif: "Iowan Old Style", "Source Serif Pro", Charter, Georgia, "Times New Roman", serif;
  --tl-sans:  ui-sans-serif, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --tl-measure: 42rem;
}

/* ============================================================================
   BASE
   ========================================================================== */
body {
  background: #fff;
  color: var(--tl-body);
  font-family: var(--tl-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--tl-serif);
  color: var(--tl-ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.22;
}
h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.25rem; }

a { color: var(--tl-blue); text-underline-offset: 2px; }
a:hover, a:focus { color: var(--tl-red); }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--tl-red);
  outline-offset: 2px;
  border-radius: 2px;
}
::selection { background: rgba(197, 33, 26, 0.14); }

/* ============================================================================
   HEADER — the site title is wayfinding, not a headline. Keep it small and
   sans so it never competes with the article titles below it.
   ========================================================================== */
.site-header { background: #fff; border-bottom: 1px solid var(--tl-rule); }
.site-header .header-image, .site-logo img { max-height: 42px; width: auto; }

.site-title, .main-title, .site-header h1, .site-header p.main-title {
  font-family: var(--tl-sans) !important;
  font-size: 1.22rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.012em !important;
  line-height: 1.3 !important;
  margin: 0;
}
.site-title a, .main-title a { color: var(--tl-ink); text-decoration: none; }
.site-title a:hover, .main-title a:hover { color: var(--tl-red); }
.site-description { font-family: var(--tl-sans); color: var(--tl-muted); font-size: 0.82rem; }

/* ============================================================================
   NAVIGATION
   ========================================================================== */
.main-navigation { background: #fff; }
/* Both brand colours appear, but each means something: blue marks what is
   interactive (hover), red marks where you are (current). The rule is drawn
   with a transparent inset shadow so nothing shifts on hover. */
.main-navigation .main-nav ul li a {
  color: var(--tl-ink);
  font-family: var(--tl-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li a:focus {
  color: var(--tl-blue);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--tl-blue);
}
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-parent > a {
  color: var(--tl-ink);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--tl-red);
}
/* Add the CSS class `nav-cta` to a menu item for a solid red button. */
.main-navigation .main-nav ul li.nav-cta a {
  color: #fff !important;
  background: var(--tl-red);
  border-radius: 3px;
  margin: 0.45em 0.35em;
  padding: 0.5em 1.1em;
  box-shadow: none;
}
.main-navigation .main-nav ul li.nav-cta a:hover { background: var(--tl-red-dark); box-shadow: none; }
/* Dropdowns */
.main-navigation ul ul { border: 1px solid var(--tl-rule); box-shadow: 0 6px 20px rgba(0,0,0,.07); }
.main-navigation ul ul li a { text-transform: none; letter-spacing: 0; font-size: 0.85rem; }

/* ============================================================================
   BUTTONS + FIELDS — flat; weight from colour, not elevation.
   ========================================================================== */
.wp-block-search__button, .wp-block-button__link,
.button, button, input[type="submit"] {
  background: var(--tl-red);
  border: 1px solid var(--tl-red);
  color: #fff !important;
  border-radius: 3px;
  font-family: var(--tl-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6em 1.25em;
  box-shadow: none;
  transition: background 0.15s ease;
}
.wp-block-search__button:hover, .wp-block-button__link:hover,
.button:hover, button:hover, input[type="submit"]:hover {
  background: var(--tl-red-dark) !important;
  border-color: var(--tl-red-dark);
  color: #fff !important;
}
input[type="text"], input[type="email"], input[type="search"], textarea, select {
  border: 1px solid var(--tl-rule);
  border-radius: 3px;
  font-family: var(--tl-sans);
  font-size: 0.95rem;
}

/* ============================================================================
   ARCHIVE / CATEGORY HEADERS
   Now that the taxonomy is real, category pages are landing pages too.
   ========================================================================== */
.page-header, .archive .page-header {
  border-bottom: 1px solid var(--tl-rule);
  padding-bottom: 1.25rem;
  margin-bottom: 2.5rem;
  background: none;
}
.page-header h1, .page-header .page-title { margin: 0 0 0.35rem; }
.page-header .taxonomy-description, .taxonomy-description p {
  font-size: 0.98rem;
  color: var(--tl-muted);
  max-width: var(--tl-measure);
  margin: 0;
}

/* ============================================================================
   POST LIST — cardless. A list of articles is a list, not a grid of boxes.
   ========================================================================== */
.blog .site-main > article,
.archive .site-main > article,
.search .site-main > article {
  background: none;
  border: 0;
  border-bottom: 1px solid var(--tl-rule);
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 3rem;
  margin: 0 0 3rem;
}
.blog .site-main > article:last-child,
.archive .site-main > article:last-child { border-bottom: 0; }

.entry-title { margin-bottom: 0.45rem; }
.entry-title a { color: var(--tl-ink); text-decoration: none; }
.entry-title a:hover, .entry-title a:focus { color: var(--tl-red); }

.entry-meta { font-family: var(--tl-sans); font-size: 0.79rem; color: var(--tl-muted); }
.entry-meta a { color: var(--tl-muted); text-decoration: none; }
.entry-meta a:hover { color: var(--tl-red); }
/* Category as a quiet eyebrow, not a badge. */
.entry-meta .cat-links a {
  color: var(--tl-red);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.entry-meta .cat-links a:hover { color: var(--tl-red-dark); }

.post-image { margin: 1.4rem 0; }
.post-image img, .wp-post-image { border-radius: 3px; box-shadow: none; }

.entry-summary, .entry-summary p, .entry-content { max-width: var(--tl-measure); }
/* Left-aligned, not justified. Browsers do not hyphenate by default, so
   justification opens rivers of white space mid-paragraph. */
.entry-summary, .entry-summary p, .entry-content, .entry-content p { text-align: left; }
.entry-content p { margin-bottom: 1.4em; }

.read-more, a.more-link {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--tl-red) !important;
  font-family: var(--tl-sans);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}
.read-more:hover, a.more-link:hover { color: var(--tl-red-dark) !important; }

/* Single post */
.single .entry-header {
  border-bottom: 2px solid var(--tl-red);
  padding-bottom: 1.15rem;
  margin-bottom: 1.9rem;
}
.single .entry-content blockquote {
  border-left: 3px solid var(--tl-red);
  padding-left: 1.25rem;
  margin-left: 0;
  font-family: var(--tl-serif);
  font-size: 1.12rem;
  color: var(--tl-ink);
}
.single .entry-content h2, .single .entry-content h3 { margin-top: 2.2em; }

/* Pagination */
.paging-navigation { padding-top: 1rem; }
.paging-navigation .page-numbers {
  font-family: var(--tl-sans);
  font-size: 0.88rem;
  color: var(--tl-body);
  text-decoration: none;
  padding: 0 0.35em;
}
.paging-navigation .page-numbers:hover { color: var(--tl-red); }
.paging-navigation .page-numbers.current { color: var(--tl-red); font-weight: 700; }

/* ============================================================================
   SIDEBAR — small uppercase labels; type carries it, not chrome.
   ========================================================================== */
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget .wp-block-heading,
.sidebar .widget h2,
.widget-title {
  font-family: var(--tl-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tl-muted);
  border: 0;
  border-bottom: 1px solid var(--tl-rule);
  padding: 0 0 0.65rem;
  margin: 0 0 0.9rem;
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { margin-bottom: 0.7rem; line-height: 1.45; }
.sidebar .widget li a { color: var(--tl-ink); text-decoration: none; font-size: 0.93rem; }
.sidebar .widget li a:hover { color: var(--tl-red); }
.sidebar .wp-block-search__inside-wrapper { gap: 0.4rem; }

/* ============================================================================
   FOOTER — one dark plane. Plain link columns; no cards, no shadows.
   ========================================================================== */
.footer-widgets, .site-info { background: var(--tl-footer); }
.footer-widgets {
  padding: 3.5rem 20px 2.75rem;
  border-top: 3px solid var(--tl-red);
}
.footer-widgets .inside-footer-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-widgets [class*="footer-widget-"] {
  flex: 1 1 210px;
  background: none;
  padding: 0;
  box-shadow: none;
  text-align: left;
}
.footer-widgets .widget { background: none; box-shadow: none; padding: 0; margin: 0 0 1.4rem; }
.footer-widgets .widget:last-child { margin-bottom: 0; }
.footer-widgets .wp-block-heading,
.footer-widgets h2, .footer-widgets h3, .footer-widgets .widget-title {
  font-family: var(--tl-sans);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #7f8792;
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}
.footer-widgets p { color: #aeb5bd; font-size: 0.9rem; line-height: 1.7; margin: 0 0 0.9rem; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets li { margin: 0 0 0.65rem; }
.footer-widgets a { color: #dfe3e8; font-size: 0.9rem; text-decoration: none; }
.footer-widgets a:hover { color: #fff; }
.footer-widgets .wp-block-button__link { color: #fff !important; }
/* The logo PNG carries a baked-in white background, which reads as a slab on
   the dark plane. Constrain it and round the corners so it reads as a
   deliberate mark. Replacing it with a transparent/reversed PNG is the real
   fix — then this rule can drop the background treatment. */
.footer-widgets img {
  max-width: 190px;
  height: auto;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.site-info {
  color: #6f7883;
  font-size: 0.81rem;
  text-align: center;
  padding: 1.6rem 20px 2.1rem;
}
.site-info a { color: #9aa2ac; text-decoration: none; }
.site-info a:hover { color: #fff; }

/* ============================================================================
   RESPONSIVE + MOTION
   ========================================================================== */
@media (max-width: 768px) {
  body { font-size: 1rem; }
  .blog .site-main > article,
  .archive .site-main > article { padding-bottom: 2.25rem; margin-bottom: 2.25rem; }
  .footer-widgets { padding: 2.5rem 20px 2rem; }
  .footer-widgets .inside-footer-widgets { gap: 2rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .entry-title a, .read-more, a.more-link,
  .footer-widgets a, .sidebar .widget li a,
  .main-navigation .main-nav ul li a { transition: color 0.15s ease; }
}
