/* ============================================================
   Austin Dispatch — Component layer
   ------------------------------------------------------------
   theme.json drives colors, type tokens, spacing, and most
   blocks. This file adds the things theme.json can't express:
   the wordmark spans, hover states, focus rings, and a few
   editorial touches the editor doesn't surface natively.
   ============================================================ */

/* ---- WORDMARK ----------------------------------------------------------- */
.ad-wordmark {
  font-family: var(--wp--preset--font-family--sans, 'Montserrat', sans-serif);
  font-weight: 300;
  letter-spacing: 0.42em;
  font-size: 22px;
  color: var(--wp--preset--color--ink);
  text-indent: 0.42em;
  white-space: nowrap;
  display: inline-block;
  line-height: 1;
}
.ad-wordmark--lg { font-size: 32px; }
.ad-wordmark--xl { font-size: clamp(28px, 4vw, 48px); }
.ad-wordmark--reverse { color: var(--wp--preset--color--cream); }

.ad-cc {
  display: inline-block;
  color: var(--wp--preset--color--bluebonnet);
  font-weight: 600;
  font-size: 0.56em;
  letter-spacing: 0.06em;
  margin: 0 0.75em 0 0;
  vertical-align: baseline;
}

/* In dark contexts the dot/code stays indigo (visible against ink) */
.has-ink-background-color .ad-cc { color: var(--wp--preset--color--bluebonnet); }

/* ---- SITE HEADER NAV --------------------------------------------------- */
.ad-site-header { position: sticky; top: 0; z-index: 100; }

.ad-site-header__nav .wp-block-navigation-item__content {
  text-decoration: none !important;
  position: relative;
  padding: 4px 0;
  transition: color 150ms ease;
}
.ad-site-header__nav .wp-block-navigation-item__content::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px 0;
  height: 2px;
  background: var(--wp--preset--color--bluebonnet);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}
.ad-site-header__nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--bluebonnet); }
.ad-site-header__nav .wp-block-navigation-item__content:hover::after,
.ad-site-header__nav .current-menu-item .wp-block-navigation-item__content::after { transform: scaleX(1); }

/* ---- STORY CARDS ------------------------------------------------------- */
.ad-card { transition: border-color 150ms ease, background 150ms ease; }
.ad-card:hover {
  border-color: var(--wp--preset--color--ink) !important;
  background: var(--wp--preset--color--cream);
}
.ad-card a { text-decoration: none; }
.ad-card a:hover { color: var(--wp--preset--color--bluebonnet); }

/* ---- LINKS ------------------------------------------------------------- */
.ad-theme a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--wp--preset--color--bluebonnet-3);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}
.ad-theme a:hover { text-decoration-color: var(--wp--preset--color--bluebonnet); }
.ad-theme a:focus-visible { outline: 2px solid var(--wp--preset--color--bluebonnet); outline-offset: 2px; }

/* Strip underline on nav, footer, and anywhere we don't want it */
.ad-theme nav a,
.ad-theme footer a,
.ad-theme .ad-card a,
.ad-theme .ad-wordmark,
.ad-theme h1 a,
.ad-theme h2 a,
.ad-theme h3 a { text-decoration: none; }

/* ---- ARTICLE BODY (serif reading column) ------------------------------- */
.ad-theme .wp-block-post-content {
  font-family: var(--wp--preset--font-family--serif);
  font-size: 19px;
  line-height: 1.7;
}
.ad-theme .wp-block-post-content p { margin: 0 0 1.4em; }

/* ---- BUTTONS ----------------------------------------------------------- */
.ad-theme .wp-block-button .wp-block-button__link {
  font-family: var(--wp--preset--font-family--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1.5px solid var(--wp--preset--color--ink);
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--cream);
  padding: 12px 20px;
  border-radius: 0;
  transition: background 150ms ease, border-color 150ms ease;
}
.ad-theme .wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--bluebonnet);
  border-color: var(--wp--preset--color--bluebonnet);
}
.ad-theme .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--ink);
}
.ad-theme .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--ink);
  color: var(--wp--preset--color--cream);
}

/* ---- SELECTION --------------------------------------------------------- */
.ad-theme ::selection {
  background: var(--wp--preset--color--bluebonnet);
  color: var(--wp--preset--color--cream);
}

/* ---- EDITOR-ONLY TWEAKS ------------------------------------------------ */
.editor-styles-wrapper .ad-wordmark { display: inline-block; }
.editor-styles-wrapper .ad-cc { color: var(--wp--preset--color--bluebonnet); }
