/*
Theme Name: TeaCup
Theme URI: https://triform.digital/
Description: Public site theme for TeaCup — home monitoring that helps families know an elderly relative is alright. A child theme of Twenty Twenty-Five carrying the TeaCup colour scheme, shared with the Android app and the web portal.
Author: Triform Digital
Template: twentytwentyfive
Version: 1.6.0
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teacup
*/

/*
  The palette lives in theme.json, not here — a block theme takes its colours from
  settings.color.palette so they appear in the editor as named swatches rather than as
  hex values someone has to remember.

  WHY A CHILD THEME: Twenty Twenty-Five is a core theme and gets overwritten on every
  WordPress update. Anything written into it would be silently lost. A child theme's
  theme.json is merged over the parent's, so only the differences live here.

  THE PALETTE IS SHARED with the Android app (values/colors.xml) and the portal
  (area_*/css/stylesheet.css). Change a value in one and the same change is owed to the
  others.

  ⚠️ THE ONE RULE: in the PRODUCT, amber and orange mean warning and nothing else.
  This is the one surface where that does not apply — a marketing page has no states —
  so "honey" exists here and must never be copied back into the app or the portal.

  ⚠️ The palette is CLOSED: theme.json sets custom:false and defaultPalette:false, so the
  editor offers these swatches and nothing else. That is deliberate — an open colour
  picker on a marketing site is how a brand drifts. Relax it there if it ever needs to.
*/

/* ---------------------------------------------------------------------------
   Current-page state in the navigation.

   WordPress adds .current-menu-item to a nav item only when it can resolve the
   link to something real - a page ID or the home link. The nav originally used
   custom URLs, which cannot be matched, so no item was ever marked and the menu
   gave no sense of where you were. The markup now uses wp:home-link and
   post-type links; this styles the result.

   Not expressible in theme.json: it has no way to reach a state class like
   .current-menu-item, so it has to be real CSS.
   --------------------------------------------------------------------------- */

.wp-block-navigation .wp-block-navigation-item a {
	text-decoration: none;
	padding-bottom: 0.15em;
	border-bottom: 2px solid transparent;
	transition: border-color 120ms ease, color 120ms ease;
}

.wp-block-navigation .wp-block-navigation-item a:hover {
	border-bottom-color: var(--wp--preset--color--rule);
}

.wp-block-navigation .wp-block-navigation-item.current-menu-item > a,
.wp-block-navigation .wp-block-navigation-item.current_page_item > a,
.wp-block-navigation .wp-block-navigation-item.current-menu-ancestor > a {
	color: var(--wp--preset--color--brown);
	border-bottom-color: var(--wp--preset--color--brown);
	font-weight: 700;
}

/* Keyboard focus must stay visible - the border alone is not enough, and the
   underline above would otherwise read as the only affordance. */
.wp-block-navigation .wp-block-navigation-item a:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--plum);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-navigation .wp-block-navigation-item a { transition: none; }
}

/* ---------------------------------------------------------------------------
   Header Login button.

   theme.json sets a generous button padding, which is right for the page CTAs
   ("Get started") but too heavy in the header: a solid filled block sitting in
   a row of text links reads as the CURRENT page rather than as an action. This
   trims it and lets the nav breathe, without touching the buttons in the body.
   --------------------------------------------------------------------------- */

.teacup-nav-button .wp-block-button__link {
	padding: 0.4rem 0.9rem;
	font-size: 0.9375rem;
	line-height: 1.4;
}
