/*
Theme Name: British Racing Green Product
Theme URI: https://example.com/brg-product-theme
Author: OpenAI
Author URI: https://openai.com
Description: A simple, modern block theme using British Racing Green. Every site area is editable through the WordPress Site Editor.
Version: 3.0.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brg-product-theme
Tags: block-patterns, block-styles, full-site-editing, custom-colors, custom-logo, editor-style, wide-blocks, accessibility-ready
*/

:root {
  --brg-radius: 1.25rem;
  --brg-line: rgba(11, 12, 11, 0.18);
  --brg-line-light: rgba(255, 255, 255, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--wp--preset--color--racing-green);
  color: var(--wp--preset--color--white);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}

.wp-site-blocks {
  overflow-x: clip;
}

/* Header and footer are ordinary editable template parts. */
.brg-site-header {
  position: relative;
  z-index: 10;
}

.brg-header-inner,
.brg-site-footer > .wp-block-group__inner-container {
  min-height: 2.25rem;
}

.brg-site-header .wp-block-site-logo,
.brg-site-header .wp-block-site-title,
.brg-site-footer .wp-block-site-title {
  margin: 0;
}

.brg-site-header .wp-block-site-title a,
.brg-site-footer .wp-block-site-title a,
.brg-navigation a,
.brg-footer-navigation a {
  text-decoration: none;
}

.brg-site-header .wp-block-site-title a:hover,
.brg-site-footer .wp-block-site-title a:hover,
.brg-navigation a:hover,
.brg-footer-navigation a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.brg-site-header .wp-block-navigation__responsive-container.is-menu-open {
  padding: var(--wp--preset--spacing--40);
  background: var(--wp--preset--color--racing-green) !important;
  color: var(--wp--preset--color--white) !important;
}

/* The front page prints only the blocks saved in the selected page. */
.brg-front-page,
.brg-front-page > .wp-block-post-content {
  width: 100%;
}

.brg-front-page > .wp-block-post-content > * {
  margin-top: 0;
  margin-bottom: 0;
}

.brg-front-page > .wp-block-post-content > :not(.alignfull):not(.alignwide) {
  width: min(calc(100% - (2 * var(--wp--preset--spacing--40))), var(--wp--style--global--content-size));
  margin-right: auto;
  margin-left: auto;
}

.brg-front-page > .wp-block-post-content > .alignwide {
  width: min(calc(100% - (2 * var(--wp--preset--spacing--40))), var(--wp--style--global--wide-size));
  max-width: none;
  margin-right: auto;
  margin-left: auto;
}

.brg-front-page > .wp-block-post-content > .alignfull {
  width: 100%;
  max-width: none;
}

/* Optional BRG Theme patterns. Every rule targets a class exposed in the editor. */
.brg-section {
  padding: clamp(4rem, 9vw, 8.5rem) var(--wp--preset--spacing--40);
}

.brg-section__inner {
  width: min(100%, var(--wp--style--global--wide-size));
  margin-right: auto;
  margin-left: auto;
}

.brg-hero {
  display: flex;
  align-items: flex-end;
  min-height: min(48rem, calc(100svh - 4.5rem));
}

.brg-kicker,
.brg-number {
  font-family: var(--wp--preset--font-family--utility-mono);
  font-size: var(--wp--preset--font-size--small);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brg-kicker {
  margin-bottom: clamp(2rem, 6vw, 5rem);
}

.brg-number {
  margin-bottom: clamp(3rem, 8vw, 7rem);
}

.brg-display {
  max-width: 11ch;
  margin-bottom: clamp(1.75rem, 4vw, 3.5rem);
  font-size: clamp(4rem, 11vw, 9.75rem);
  font-weight: 300;
  letter-spacing: -0.085em;
  line-height: 0.84;
  text-wrap: balance;
}

.brg-heading {
  max-width: 15ch;
  margin-bottom: clamp(2rem, 5vw, 4.5rem);
  font-size: clamp(3.1rem, 7vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.075em;
  line-height: 0.9;
  text-wrap: balance;
}

.brg-lead {
  max-width: 38rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.08rem, 1.8vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.brg-rule {
  padding-top: 1rem;
  border-top: 1px solid currentColor;
}

.brg-card {
  height: 100%;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--brg-line);
  border-radius: var(--brg-radius);
}

.has-ink-background-color .brg-card,
.has-racing-green-background-color .brg-card {
  border-color: var(--brg-line-light);
}

.brg-card h3 {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3.7vw, 3.8rem);
  font-weight: 300;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.brg-card > :last-child {
  margin-bottom: 0;
}

/* Blog and standard template presentation; these blocks remain editable in Templates. */
.brg-template-main {
  min-height: 60vh;
}

.brg-template-main > .wp-block-post-title,
.brg-template-main > .wp-block-query-title,
.brg-template-main > .wp-block-group:first-child .wp-block-post-title {
  max-width: 13ch;
}

.brg-post-list .wp-block-post-template {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--brg-line);
}

.brg-post-card {
  border-bottom: 1px solid var(--brg-line);
}

.brg-post-card .wp-block-post-title {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.brg-post-card .wp-block-post-title a {
  text-decoration: none;
}

.brg-post-card .wp-block-post-title a:hover {
  text-decoration: underline;
}

.brg-not-found {
  display: flex;
  min-height: 68vh;
  flex-direction: column;
  justify-content: center;
}

.brg-not-found > * {
  width: min(100%, var(--wp--style--global--wide-size));
}

.brg-blank-template {
  width: 100%;
}

@media (max-width: 760px) {
  .brg-site-header .wp-block-site-logo img {
    max-width: 8rem;
  }

  .brg-site-header .wp-block-site-title {
    font-size: 1.1rem;
  }

  .brg-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: flex-start;
    gap: 0.6rem;
  }

  .brg-site-header .wp-block-navigation__responsive-container.is-menu-open a {
    font-size: clamp(2.2rem, 11vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.06em;
  }

  .brg-hero {
    min-height: 38rem;
  }

  .wp-block-columns {
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

