/*
Theme Name:   SBP Solutions (GeneratePress Child)
Theme URI:    https://sbpsolutions.com.au
Author:       SBP Solutions
Author URI:   https://sbpsolutions.com.au
Description:  GeneratePress child theme for SBP Solutions – Legal Practice Management & Automation for Australian Law Firms.
Template:     generatepress
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  sbpsolutions-gp
Tags:         business, professional, legal
*/

/* ============================================================
   GENERATEPRESS INTEGRATION – override GP's CSS variables and
   structural defaults so our brand design takes precedence.
   ============================================================ */

/* GP 3.x uses these custom properties for its colour system */
:root {
  --color-contrast:   #202326;
  --color-contrast-2: #4d5055;
  --color-contrast-3: #6f7275;
  --color-accent:     #6f0c0c;
  --color-base:       #ffffff;
  --color-base-2:     #f9f0e5;
  --color-base-3:     #e6e6e6;

  /* Our own colour tokens – used throughout templates */
  --color-cream:    #f9f0e5;
  --color-dark:     #202326;
  --color-red:      #6f0c0c;
  --color-white:    #ffffff;
  --color-grey-bg:  #e6e6e6;
  --color-text:     #202326;

  --font-heading:   'Noto Serif Display', 'Noto Serif', Georgia, serif;
  --font-body:      'Noto Serif', Georgia, serif;

  --max-width:      1200px;
  --container-pad:  clamp(1.25rem, 4vw, 5rem);

  --transition:     0.3s ease;
}

/* Override GP's body defaults */
body {
  font-family: var(--font-body) !important;
  background-color: var(--color-cream) !important;
  color: var(--color-dark) !important;
}

/* Override GP's heading font */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading) !important;
}

/* GP wraps content in .site and .site-content – neutralise any
   unwanted spacing so our full-width sections work correctly */
.site {
  background: var(--color-cream);
}

/* GP's .site-main can add top padding on inner pages */
.site-main {
  padding-top: 0 !important;
  max-width: none !important;
}

/* GP container – align to our max-width */
.grid-container {
  max-width: var(--max-width) !important;
  padding-inline: var(--container-pad) !important;
}

/* Neutralise GP's default link colour so ours take over */
a { color: inherit; text-decoration: none; }

/* ============================================================
   CSS CUSTOM PROPERTIES (full set)
   ============================================================ */

/* (already declared in the :root block above) */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

p, pre { max-width: 70ch; white-space: pre-wrap; font-family: var(--font-body); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.heading-xlarge { font-size: clamp(2.25rem, 5vw, 4rem); }
.heading-large  { font-size: clamp(1.75rem, 3.5vw, 3rem); }
.heading-medium { font-size: clamp(1.25rem, 2.5vw, 2rem); }
.heading-small  { font-size: clamp(1rem, 1.8vw, 1.375rem); }

.body-large  { font-size: 1.25rem; }
.body-normal { font-size: 1rem; }
.body-small  { font-size: 0.875rem; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section-pad    { padding-block: clamp(3rem, 6vw, 6rem); }
.section-pad-sm { padding-block: clamp(2rem, 4vw, 3rem); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.65em 1.5em;
  border: 2px solid currentColor;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: center;
  line-height: 1.4;
}

.btn:hover {
  background: var(--color-dark);
  color: var(--color-cream);
  border-color: var(--color-dark);
}

.btn-outline-dark {
  border-color: var(--color-dark);
  color: var(--color-dark);
}

.btn-outline-light {
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn-outline-light:hover {
  background: var(--color-white);
  color: var(--color-dark);
}

.btn-lg { padding: 0.8em 2em; font-size: 1.0625rem; }

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  color: var(--color-dark);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

#site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-social a { display: flex; align-items: center; }

.header-social svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-dark);
  transition: opacity var(--transition);
}

.header-social a:hover svg { opacity: 0.6; }

.header-centre {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-dark);
  white-space: nowrap;
}

.site-logo:hover { opacity: 0.8; }

#primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

#primary-nav a {
  display: block;
  padding: 0.4em 0.75em;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: background var(--transition), border-color var(--transition);
}

#primary-nav a:hover,
#primary-nav a.current {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.1);
}

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-dark);
}

.menu-toggle svg { width: 1.25rem; height: 1.25rem; }

#mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem var(--container-pad) 1.5rem;
  background: var(--color-white);
  border-top: 1px solid rgba(0,0,0,0.06);
}

#mobile-nav.is-open { display: flex; }

#mobile-nav a {
  padding: 0.6em 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

#mobile-nav a:last-child { border-bottom: none; }

#mobile-nav .btn {
  margin-top: 0.75rem;
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .header-social,
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  #primary-nav { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--color-cream);
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-block: clamp(2rem, 4vw, 3.5rem);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand .site-logo { font-size: 1.25rem; margin-bottom: 0.5rem; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-nav a {
  font-size: 0.9375rem;
  transition: opacity var(--transition);
}

.footer-nav a:hover { opacity: 0.6; }

.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-social a { display: flex; }
.footer-social svg { width: 1.5rem; height: 1.5rem; }
.footer-social a:hover { opacity: 0.6; }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.8125rem;
  color: rgba(32,35,38,0.6);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  background: var(--color-dark);
  color: var(--color-white);
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #202326 60%, #2d3436 100%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 1.25rem;
  color: var(--color-white);
}

.hero-content p {
  font-size: 1.0625rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 55ch;
}

/* ============================================================
   WHO WE HELP SECTION
   ============================================================ */
.who-we-help {
  background: var(--color-cream);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.who-we-help .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 5rem);
  align-items: center;
}

.who-we-help h2 { margin-bottom: 1.25rem; }

.who-we-help ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.who-we-help ul li {
  padding-left: 1.25rem;
  position: relative;
  font-size: 1.0625rem;
}

.who-we-help ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-red);
}

.who-we-help-image {
  aspect-ratio: 16/9;
  background: var(--color-grey-bg);
  overflow: hidden;
}

.who-we-help-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .who-we-help .container { grid-template-columns: 1fr; }
  .who-we-help-image { order: -1; }
}

/* ============================================================
   SERVICE CARDS – HOME
   ============================================================ */
.home-services {
  background: var(--color-cream);
  padding-block: clamp(3rem, 6vw, 6rem);
}

.home-services-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(0,0,0,0.1);
}

.service-card {
  border-right: 1px solid rgba(0,0,0,0.1);
  transition: background var(--transition);
}

.service-card:last-child { border-right: none; }
.service-card:hover { background: rgba(0,0,0,0.03); }

.service-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-grey-bg);
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-image img { transform: scale(1.05); }

.service-card-body {
  padding: 1.5rem;
  text-align: center;
}

.service-card-body h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.service-card-body p  { font-size: 0.9375rem; margin-inline: auto; }

@media (max-width: 767px) {
  .service-cards {
    grid-template-columns: 1fr;
    border: none;
  }
  .service-card {
    border: 1px solid rgba(0,0,0,0.1);
    border-right: 1px solid rgba(0,0,0,0.1);
  }
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  background: var(--color-cream);
  padding-block: clamp(3rem, 6vw, 6rem);
}

.faq-section h2 { margin-bottom: 2rem; }

.faq-list { max-width: 52rem; }

.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); }

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--color-dark);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--transition);
}

.faq-item.is-open .faq-question .faq-icon { transform: rotate(45deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.2s ease;
}

.faq-item.is-open .faq-answer { max-height: 500px; }

.faq-answer-inner {
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(32,35,38,0.85);
  max-width: none;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-section {
  background: var(--color-cream);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.contact-inner {
  max-width: 42rem;
  margin-inline: auto;
}

.contact-section h2 { margin-bottom: 0.5rem; }

.contact-section .subheading {
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  opacity: 0.8;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid .full-width { grid-column: 1 / -1; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label { font-size: 0.8125rem; font-weight: 500; }

.form-field input,
.form-field textarea,
.form-field select {
  padding: 0.65em 0.875em;
  background: rgba(0,0,0,0.07);
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-dark);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  background: rgba(0,0,0,0.05);
  border-bottom-color: var(--color-dark);
}

.form-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  text-align: center;
}

.form-privacy {
  font-size: 0.75rem;
  color: rgba(32,35,38,0.55);
  max-width: 28rem;
}

.form-privacy a { text-decoration: underline; }

.form-message {
  padding: 1rem;
  border-left: 3px solid;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.form-message.success { border-color: #2e7d32; background: #e8f5e9; }
.form-message.error   { border-color: #c62828; background: #ffebee; }

@media (max-width: 599px) { .form-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
  background: var(--color-cream);
  padding-block: clamp(2rem, 4vw, 3.5rem);
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.page-hero h1 { color: var(--color-dark); }

/* ============================================================
   ABOUT PAGE – TEAM
   ============================================================ */
.team-section { padding-block: clamp(3rem, 6vw, 5rem); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
}

.team-card { text-align: center; }

.team-photo {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--color-grey-bg);
  margin-bottom: 1.25rem;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

.team-card h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }

.team-card .role {
  font-style: italic;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  color: var(--color-red);
}

.team-card .bio { font-size: 0.9rem; line-height: 1.75; text-align: left; max-width: none; }
.team-card .bio p + p { margin-top: 0.75em; }

@media (max-width: 899px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 599px) { .team-grid { grid-template-columns: 1fr; } }

/* ============================================================
   SERVICES PAGE
   ============================================================ */
.services-detail { padding-block: clamp(2.5rem, 5vw, 5rem); }

.service-item {
  padding-block: 2rem;
  border-bottom: 3px solid var(--color-red);
  margin-bottom: 2.5rem;
}

.service-item:last-child { border-bottom: none; }
.service-item h2 { margin-bottom: 1rem; }
.service-item p  { margin-bottom: 0.75rem; }

.service-item ul {
  list-style: circle;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.service-item ul li { font-size: 0.9375rem; max-width: none; }

/* Pricing table */
.pricing-section {
  padding-block: clamp(3rem, 6vw, 6rem);
  background: var(--color-cream);
}

.pricing-section .section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  align-items: stretch;
}

.pricing-card {
  background: var(--color-grey-bg);
  padding: 2rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.7);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-card.popular {
  margin-block: -1rem;
  z-index: 1;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.popular-badge {
  display: inline-block;
  background: var(--color-dark);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25em 0.85em;
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

.pricing-card h3    { font-size: 1.0625rem; }
.pricing-card .price { font-family: var(--font-heading); font-size: 2.25rem; }
.pricing-card .price-unit { font-size: 0.875rem; opacity: 0.7; }
.pricing-card .plan-desc  { font-size: 0.875rem; line-height: 1.6; opacity: 0.8; max-width: none; }
.pricing-divider { border: none; border-top: 1px solid rgba(0,0,0,0.12); }

.pricing-features { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }

.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.pricing-feature .check {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}

.pricing-feature .check svg { width: 0.875rem; height: 0.875rem; }
.pricing-card .btn { margin-top: auto; align-self: flex-start; font-size: 0.875rem; }

@media (max-width: 899px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card.popular { margin-block: 0; }
}

/* CTA Section */
.cta-section {
  background: var(--color-cream);
  padding-block: clamp(4rem, 7vw, 6rem);
}

.cta-section h2 { margin-bottom: 1.25rem; max-width: 20ch; }
.cta-section p  { font-size: 1.125rem; margin-bottom: 2rem; max-width: 55ch; opacity: 0.85; }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page-section { padding-block: clamp(3rem, 6vw, 5rem); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.site-notice { padding-block: 5rem; text-align: center; }
.site-notice h1 { margin-bottom: 1rem; }
.site-notice p  { margin-inline: auto; }
