/*
Theme Name: Hydroscot Astra Child
Theme URI: https://www.hydroscot-energies.co.uk/
Description: Modern brand system and homepage components for Hydroscot Energies, built on Astra.
Author: Hydroscot Energies Ltd
Template: astra
Version: 1.0.1
Text Domain: hydroscot-astra-child
*/

/*
 * Hydroscot design tokens
 * One source of truth for both theme and block-editor components.
 */
:root {
  --hydro-navy: #123e68;
  --hydro-navy-deep: #0b2946;
  --hydro-blue: #0170b9;
  --hydro-cyan: #35a9d6;
  --hydro-green: #78be43;
  --hydro-lime: #a8d548;
  --hydro-ink: #172a38;
  --hydro-slate: #536673;
  --hydro-mist: #f1f7f8;
  --hydro-pale-green: #f3f8ed;
  --hydro-white: #fff;
  --hydro-border: #d7e4e8;
  --hydro-gradient: linear-gradient(135deg, var(--hydro-blue), var(--hydro-cyan) 52%, var(--hydro-green));

  --hydro-font-heading: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --hydro-font-body: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --hydro-space-1: .375rem;
  --hydro-space-2: .75rem;
  --hydro-space-3: 1rem;
  --hydro-space-4: 1.5rem;
  --hydro-space-5: 2rem;
  --hydro-space-6: 3rem;
  --hydro-space-7: 4.5rem;
  --hydro-space-8: 6.5rem;

  --hydro-radius-sm: .5rem;
  --hydro-radius-md: .875rem;
  --hydro-radius-lg: 1.5rem;
  --hydro-shadow-sm: 0 10px 30px rgba(11, 41, 70, .08);
  --hydro-shadow-lg: 0 22px 70px rgba(11, 41, 70, .16);
  --hydro-content: 1200px;
}

html { scroll-behavior: smooth; }
body {
  color: var(--hydro-ink);
  font-family: var(--hydro-font-body);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6,
.site-title, .main-header-menu {
  color: var(--hydro-ink);
  font-family: var(--hydro-font-heading);
  font-weight: 750;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2.75rem, 6vw, 5.75rem); line-height: .98; }
h2 { font-size: clamp(2.15rem, 4vw, 3.75rem); line-height: 1.08; }
h3 { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.2; }
p { margin-bottom: var(--hydro-space-4); }
a { text-underline-offset: .18em; }
::selection { background: var(--hydro-lime); color: var(--hydro-navy-deep); }

/* Shared layout utilities */
.hydro-shell { width: min(var(--hydro-content), calc(100% - 2.5rem)); margin-inline: auto; }
.hydro-section { padding-block: var(--hydro-space-8); }
.hydro-section--mist { background: var(--hydro-mist); }
.hydro-section--green { background: var(--hydro-pale-green); }
.hydro-section--navy { background: var(--hydro-navy-deep); color: var(--hydro-white); }
.hydro-section--navy h2, .hydro-section--navy h3 { color: var(--hydro-white); }
.hydro-grid { display: grid; gap: var(--hydro-space-5); }
.hydro-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hydro-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hydro-eyebrow {
  margin: 0 0 var(--hydro-space-3);
  color: var(--hydro-blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hydro-section--navy .hydro-eyebrow { color: var(--hydro-lime); }
.hydro-lead { max-width: 48rem; color: var(--hydro-slate); font-size: clamp(1.08rem, 1.5vw, 1.28rem); }
.hydro-section--navy .hydro-lead { color: rgba(255,255,255,.78); }

/* Buttons */
.hydro-button,
.wp-block-button.hydro-button .wp-block-button__link,
.ast-builder-button-wrap .ast-custom-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .8rem 1.35rem;
  border: 2px solid var(--hydro-blue);
  border-radius: var(--hydro-radius-sm);
  background: var(--hydro-blue);
  box-shadow: none;
  color: var(--hydro-white);
  font-family: var(--hydro-font-heading);
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.hydro-button:hover,
.hydro-button:focus-visible,
.wp-block-button.hydro-button .wp-block-button__link:hover {
  background: var(--hydro-navy);
  border-color: var(--hydro-navy);
  box-shadow: 0 12px 26px rgba(1,112,185,.22);
  color: var(--hydro-white);
  transform: translateY(-2px);
}
.hydro-button--secondary,
.wp-block-button.hydro-button--secondary .wp-block-button__link {
  background: transparent;
  border-color: currentColor;
  color: var(--hydro-navy);
}
.hydro-section--navy .hydro-button--secondary { color: var(--hydro-white); }
.hydro-hero .hydro-button--secondary,
.hydro-hero .wp-block-button.hydro-button--secondary .wp-block-button__link {
  border-color: var(--hydro-white);
  color: var(--hydro-white) !important;
}
.hydro-button--light,
.wp-block-button.hydro-button--light .wp-block-button__link {
  background: var(--hydro-white);
  border-color: var(--hydro-white);
  color: var(--hydro-navy-deep);
}
.hydro-button-row { display: flex; flex-wrap: wrap; gap: var(--hydro-space-3); }

/* Utility bar inserted through Astra's astra_header_before hook. */
.hydro-utility-bar { background: var(--hydro-navy-deep); color: rgba(255,255,255,.9); font-size: .86rem; }
.hydro-utility-bar__inner {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: var(--hydro-space-4);
}
.hydro-utility-bar__contact { display: flex; align-items: center; gap: var(--hydro-space-4); }
.hydro-utility-bar a { color: var(--hydro-white); font-weight: 650; text-decoration: none; }
.hydro-utility-bar a:hover { color: var(--hydro-lime); }

/* Astra header refinements */
.ast-primary-header-bar { box-shadow: 0 1px 0 var(--hydro-border); }
.main-header-menu > .menu-item > .menu-link { font-weight: 650; }
.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu > .current-menu-item > .menu-link { color: var(--hydro-blue); }
.ast-desktop .main-header-menu .sub-menu {
  border: 0;
  border-radius: var(--hydro-radius-md);
  box-shadow: var(--hydro-shadow-lg);
  overflow: hidden;
}
.site-branding img, .custom-logo { width: auto; max-height: 64px; }

/* Hero */
.hydro-hero {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--hydro-navy-deep);
  color: var(--hydro-white);
  isolation: isolate;
}
.hydro-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(7,35,59,.96) 0%, rgba(7,35,59,.82) 43%, rgba(7,35,59,.22) 78%);
}
.hydro-hero::after {
  content: "";
  position: absolute;
  width: 36rem;
  height: 36rem;
  right: -15rem;
  bottom: -21rem;
  z-index: -1;
  border: 4.5rem solid rgba(53,169,214,.32);
  border-radius: 50%;
  box-shadow: 0 0 0 4.5rem rgba(120,190,67,.18);
}
.hydro-hero__media { position: absolute; inset: 0; z-index: -3; }
.hydro-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hydro-hero__content { max-width: 52rem; padding-block: var(--hydro-space-8); }
.hydro-hero h1 { margin: 0 0 var(--hydro-space-4); color: var(--hydro-white); }
.hydro-hero .hydro-eyebrow { color: var(--hydro-lime); }
.hydro-hero__copy { max-width: 44rem; color: rgba(255,255,255,.86); font-size: clamp(1.12rem, 1.65vw, 1.35rem); }

/* Trust strip */
.hydro-trust-strip { border-bottom: 1px solid var(--hydro-border); box-shadow: var(--hydro-shadow-sm); }
.hydro-trust-strip .wp-block-columns { margin-bottom: 0; }
.hydro-trust-item { text-align: center; }
.hydro-trust-item > * { margin-block-start: 0 !important; }
.hydro-trust-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin: 0 auto var(--hydro-space-2);
  border-radius: 50%;
  background: var(--hydro-mist);
  color: var(--hydro-blue);
}
.hydro-trust-icon svg { width: 1.55rem; height: 1.55rem; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.hydro-trust-item:nth-child(even) .hydro-trust-icon { background: var(--hydro-pale-green); color: #4e8f27; }
.hydro-trust-item p { margin: 0; color: var(--hydro-ink); font-family: var(--hydro-font-heading); font-size: .96rem; font-weight: 750; line-height: 1.35; }

/* Solution cards */
.hydro-solution-card {
  position: relative;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  border: 1px solid var(--hydro-border);
  border-radius: var(--hydro-radius-lg);
  background: var(--hydro-white);
  box-shadow: var(--hydro-shadow-sm);
  color: var(--hydro-ink);
  isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hydro-solution-card:hover { box-shadow: var(--hydro-shadow-lg); transform: translateY(-5px); }
.hydro-solution-card__media {
  position: relative;
  height: 220px;
  flex: 0 0 220px;
  margin: 0;
  overflow: hidden;
  background: var(--hydro-mist);
}
.hydro-solution-card__media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s ease; }
.hydro-solution-card:hover .hydro-solution-card__media img { transform: scale(1.035); }
.hydro-solution-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: var(--hydro-space-5); }
.hydro-solution-card__body > * { margin-block-start: 0 !important; }
.hydro-solution-card h3 { margin: 0 0 var(--hydro-space-2); color: var(--hydro-ink); }
.hydro-solution-card p { margin: 0 0 var(--hydro-space-3); color: var(--hydro-slate); }
.hydro-solution-card p:last-child { margin-top: auto !important; margin-bottom: 0; }
.hydro-card-link { color: var(--hydro-blue); font-weight: 750; text-decoration: none; }
.hydro-card-link::after { content: "  →"; color: var(--hydro-green); }
.hydro-solution-card--cyan { border-top: 4px solid var(--hydro-cyan); }
.hydro-solution-card--green { border-top: 4px solid var(--hydro-green); }

/* Sector cards */
.hydro-sector-card {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--hydro-radius-md);
  background: var(--hydro-navy);
  isolation: isolate;
}
.hydro-sector-card::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,transparent 20%,rgba(11,41,70,.92)); }
.hydro-sector-card__media { position: absolute; inset: 0; z-index: -2; }
.hydro-sector-card__media { margin: 0; }
.hydro-sector-card__media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .4s ease; }
.hydro-sector-card:hover .hydro-sector-card__media img { transform: scale(1.04); }
.hydro-sector-card__body { width: 100%; padding: var(--hydro-space-4); }
.hydro-sector-card h3 { margin: 0; color: var(--hydro-white); font-size: 1.35rem; }
.hydro-sector-card a { color: inherit; text-decoration: none; }

/* Process timeline */
.hydro-process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--hydro-space-5);
  counter-reset: hydro-process;
}
.hydro-process::before {
  content: "";
  position: absolute;
  top: 1.55rem;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: linear-gradient(90deg,var(--hydro-cyan),var(--hydro-green));
}
.hydro-process__step { position: relative; counter-increment: hydro-process; }
.hydro-process > .hydro-process__step {
  align-self: start;
  margin-block-start: 0 !important;
}
.hydro-process__step::before {
  content: counter(hydro-process, decimal-leading-zero);
  position: relative;
  z-index: 1;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  margin-bottom: var(--hydro-space-4);
  border: 2px solid var(--hydro-cyan);
  border-radius: 50%;
  background: var(--hydro-navy-deep);
  color: var(--hydro-white);
  font: 750 .85rem/1 var(--hydro-font-heading);
}
.hydro-process__step:nth-child(n+3)::before { border-color: var(--hydro-green); }
.hydro-process h3 { margin-bottom: var(--hydro-space-2); color: var(--hydro-white); }
.hydro-process p { color: rgba(255,255,255,.72); }

/* CTA sections */
.hydro-cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2.75rem, 6vw, 5.5rem);
  border-radius: var(--hydro-radius-lg);
  background: var(--hydro-gradient);
  box-shadow: var(--hydro-shadow-lg);
  color: var(--hydro-white);
  isolation: isolate;
}
.hydro-cta::after {
  content: "";
  position: absolute;
  width: 20rem;
  height: 20rem;
  right: -8rem;
  top: -11rem;
  z-index: -1;
  border: 3.5rem solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.hydro-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--hydro-space-6); }
.hydro-cta h2 { max-width: 46rem; margin: 0 0 var(--hydro-space-3); color: var(--hydro-white); }
.hydro-cta p { max-width: 44rem; margin: 0; color: rgba(255,255,255,.88); font-size: 1.1rem; }
.hydro-cta__actions { flex: 0 0 auto; }

/* Accessibility and motion */
:focus-visible { outline: 3px solid var(--hydro-lime); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Responsive rules */
@media (max-width: 1000px) {
  :root { --hydro-space-8: 5rem; }
  .hydro-grid--3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hydro-process { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hydro-process::before { display: none; }
  .hydro-cta__inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 768px) {
  :root { --hydro-space-7: 3.5rem; --hydro-space-8: 4rem; }
  .hydro-shell { width: min(var(--hydro-content), calc(100% - 1.5rem)); }
  .hydro-grid--2, .hydro-grid--3, .hydro-process { grid-template-columns: 1fr; }
  .hydro-utility-bar__inner { min-height: 42px; justify-content: flex-end; }
  .hydro-utility-bar__message, .hydro-utility-bar__email { display: none; }
  .hydro-hero { min-height: 610px; }
  .hydro-hero::before { background: linear-gradient(90deg,rgba(7,35,59,.95),rgba(7,35,59,.7)); }
  .hydro-solution-card { min-height: 340px; }
  .hydro-solution-card__media { height: 200px; flex-basis: 200px; }
  .hydro-trust-strip .wp-block-columns { gap: var(--hydro-space-5); }
  .hydro-sector-card { min-height: 250px; }
  .hydro-cta { padding: var(--hydro-space-5); }
  .hydro-cta__actions, .hydro-cta__actions .hydro-button { width: 100%; }
}
@media (max-width: 480px) {
  .hydro-button-row, .hydro-button-row .hydro-button { width: 100%; }
  .hydro-utility-bar__contact { gap: var(--hydro-space-3); }
  .hydro-utility-bar__mobile { display: none; }
}
.hydro-partner-logos figure.wp-block-image {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #fff;
}

.hydro-partner-logos figure.wp-block-image img {
  width: 100% !important;
  height: 100px !important;
  object-fit: contain !important;
  object-position: center;
  aspect-ratio: auto !important;
}
.hydro-product-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hydro-product-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--hydro-border);
  border-radius: var(--hydro-radius-md);
  background: var(--hydro-white);
  box-shadow: 0 8px 26px rgba(11, 41, 70, 0.06);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.hydro-product-card:hover {
  border-color: var(--hydro-cyan);
  box-shadow: var(--hydro-shadow-sm);
  transform: translateY(-5px);
}

.hydro-product-card__image {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: #fff;
}

.hydro-product-card__image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain !important;
  transition: transform 0.3s ease;
}

.hydro-product-card:hover .hydro-product-card__image img {
  transform: scale(1.025);
}

.hydro-product-card__title {
  margin: 0;
  padding: 1.25rem 1rem 1.5rem;
  border-top: 1px solid var(--hydro-border);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  text-transform: uppercase;
}

.hydro-product-card__title a {
  color: var(--hydro-blue);
  text-decoration: none;
}

.hydro-product-card__title a:hover {
  color: var(--hydro-green);
}

@media (max-width: 900px) {
  .hydro-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hydro-product-grid {
    grid-template-columns: 1fr;
  }
}
