/*
Theme Name: Hamilton Group
Theme URI: https://thehamiltongroup.ca
Author: The Hamilton Group
Description: Block theme for The Hamilton Group and its companies. Built for WordPress Multisite: every site uses this theme and picks its company color under Appearance > Editor > Styles.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.0
License: GPL-2.0-or-later
Text Domain: hamilton-group
*/

/* Headings use the wide cut of Archivo, like the logo wordmark */
h1, h2, h3, .wp-block-site-title { font-stretch: 125%; text-wrap: balance; }
h4, h5, h6 { font-stretch: 100%; }

/* Eyebrow label (Paragraph > Styles > Eyebrow) */
.is-style-eyebrow { font-size: .78rem !important; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }

/* Buttons: Light (white on dark bands) and Outline light */
.wp-block-button.is-style-light .wp-block-button__link { background: #fff; color: var(--wp--preset--color--charcoal); }
.wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.45); }
.wp-block-button .wp-block-button__link { transition: transform .15s ease; }
.wp-block-button .wp-block-button__link:hover { transform: translateY(-1px); }

/* H monogram, drawn in CSS so it follows the site's company color.
   Add class "hg-monogram" to an empty Group block. "is-group" shows all four colors. */
.hg-monogram { --p: #fff; position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; margin-left: auto; }
.hg-monogram::before { content: ""; position: absolute; inset: 10% 15%; background:
  linear-gradient(var(--p), var(--p)) left / 27% 100% no-repeat,
  linear-gradient(var(--p), var(--p)) right / 27% 100% no-repeat; }
.hg-monogram::after { content: ""; position: absolute; left: 33.3%; right: 33.3%; top: 41.6%; height: 16.7%;
  background: var(--wp--preset--color--accent); }
.hg-monogram.is-group::after { background: linear-gradient(90deg,
  var(--wp--preset--color--retail) 0 25%, var(--wp--preset--color--leasing) 25% 50%,
  var(--wp--preset--color--holdings) 50% 75%, var(--wp--preset--color--programming) 75%); }
.hg-monogram.is-small { width: 52px; height: 52px; max-width: 52px; margin: 0; --p: rgba(255,255,255,.55); }
.hg-monogram.is-small::after { background: #fff; }
@media (max-width: 781px) { .hg-monogram:not(.is-small) { max-width: 180px; margin-left: 0; } }

/* Four-color strip (class "hg-strip" on an empty Group) */
.hg-strip { height: 8px; background: linear-gradient(90deg,
  var(--wp--preset--color--retail) 0 25%, var(--wp--preset--color--leasing) 25% 50%,
  var(--wp--preset--color--holdings) 50% 75%, var(--wp--preset--color--programming) 75%); }
.hg-accent-bar { height: 10px; background: var(--wp--preset--color--accent); }

/* Company cards: the whole card is clickable through its link */
.hg-card { position: relative; transition: transform .2s ease, box-shadow .2s ease; height: 100%; }
.hg-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.45); }
.hg-card .hg-card-link a { text-decoration: none; color: inherit; }
.hg-card .hg-card-link a::after { content: ""; position: absolute; inset: 0; }
.hg-card .hg-card-link { border-top: 1px solid var(--wp--preset--color--line); padding-top: 12px; overflow-wrap: anywhere; }
.hg-card .hg-card-body { flex: 1; }
.wp-block-columns.hg-cards > .wp-block-column { display: flex; }
.wp-block-columns.hg-cards > .wp-block-column > .hg-card { width: 100%; }

/* Color swatches in the About section */
.hg-swatch { aspect-ratio: 1 / 1.2; }

/* Navigation underline on hover */
.wp-block-navigation-item__content { border-bottom: 2px solid transparent; }
.wp-block-navigation-item__content:hover { border-color: var(--wp--preset--color--accent); }

:focus-visible { outline: 3px solid var(--wp--preset--color--accent-tint); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Borders kept in CSS so staff edits never break them */
.hg-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.hg-post-row { border-bottom: 1px solid var(--wp--preset--color--line); }
.hg-card { border: 1px solid var(--wp--preset--color--line); }
.hg-service { border: 1px solid var(--wp--preset--color--line); border-top: 4px solid var(--wp--preset--color--accent); }
.hg-contact { border-top: 1px solid var(--wp--preset--color--line); }
.hg-frame { border-top: 1px solid var(--wp--preset--color--line); }
.hg-plain { font-stretch: 100%; }
