/* Nexora Tech & Climate Solutions — site styles
   Brand colours were sampled from the original logo artwork (tools/make-brand-assets.ps1).
   Change colours here, in one place. */

:root {
  --navy: #0c253c;         /* deep navy, sampled from the logo */
  --green: #138763;        /* leaf green, sampled from the logo */
  --white: #ffffff;

  --ink: #1a2531;          /* body text */
  --ink-muted: #4a5a6b;    /* secondary text */
  --navy-hover: #1b4468;   /* button hover (lighter navy) */
  --tint: #f3f6f9;         /* alternate section background */
  --tint-green: #eef6f2;   /* example-question background */
  --line: #dce3ea;         /* borders */

  --radius: 12px;
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

img {
  height: auto;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  color: var(--navy);
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 0.75rem 0.25rem;
}

.brand {
  display: inline-flex;
  border-radius: 6px;
}

.brand img {
  display: block;
  width: auto;
  height: 96px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.75rem 0.125rem;
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.site-nav a:hover {
  text-decoration-color: var(--green);
}

@media (min-width: 48em) {
  .header-inner {
    padding-block: 1rem;
  }

  .brand img {
    height: 108px;
  }

  .site-nav ul {
    gap: 0 2rem;
  }
}

@media (min-width: 64em) {
  .brand img {
    height: 116px;
  }
}

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  min-height: 3rem;
  padding: 0.7rem min(1.4rem, 5vw);
  border: 2px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.button svg {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.button-primary {
  background: var(--navy);
  color: var(--white);
}

.button-primary:hover {
  background: var(--navy-hover);
  color: var(--white);
}

.button-secondary {
  background: var(--white);
  border-color: var(--navy);
  color: var(--navy);
}

.button-secondary:hover {
  background: var(--tint);
}

.link-quiet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 3rem;
  font-weight: 600;
}

.link-quiet svg {
  flex: none;
  width: 1.1em;
  height: 1.1em;
}

/* ---------- Opening (hero) ---------- */

.hero {
  padding-block: clamp(2.25rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  max-width: 19ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  max-width: 36em;
  font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
}

.hero-audience {
  max-width: 36em;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
  margin-top: 2rem;
}

.hero-figure {
  margin: 0;
}

/* Used if an approved photo replaces the diagram (see README). */
.hero-figure img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

.hero-figure figcaption {
  margin-top: 0.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  text-align: center;
}

@media (min-width: 60em) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  }
}

/* Diagram */

.diagram {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin-inline: auto;
}

.dg-backdrop {
  fill: var(--tint);
}

.dg-spokes line {
  stroke: var(--navy);
  stroke-width: 2.5;
}

.dg-dots circle {
  fill: var(--green);
}

.dg-ring {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
}

.dg-hub {
  fill: var(--navy);
}

.dg-hub-text {
  fill: var(--white);
  font-family: var(--font);
}

.dg-hub-strong {
  font-size: 22px;
  font-weight: 700;
}

.dg-hub-small {
  font-size: 16px;
  font-weight: 500;
}

.dg-node circle {
  fill: var(--white);
  stroke: var(--navy);
  stroke-width: 2.5;
}

.dg-node use {
  color: var(--navy);
}

.dg-label {
  fill: var(--ink);
  font-family: var(--font);
  font-size: 20px;
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section-tinted {
  background: var(--tint);
}

section[id] {
  scroll-margin-top: 1rem;
}

.section h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.875rem, 1.45rem + 1.7vw, 2.625rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section h2::before {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-bottom: 1.25rem;
  border-radius: 2px;
  background: var(--green);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

/* What we do */

.areas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.area {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.area-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--navy);
}

.area-icon svg {
  width: 2.25rem;
  height: 2.25rem;
}

.area h3 {
  margin-bottom: 0.75rem;
  font-size: 1.3125rem;
  line-height: 1.25;
}

.area > p {
  margin-bottom: 1.5rem;
}

.example {
  margin-top: auto;
  padding: 1rem 1.125rem;
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: var(--tint-green);
}

.example-label {
  margin-bottom: 0.375rem;
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.example-text {
  margin: 0;
}

.areas-note {
  margin: 2rem 0 0;
}

@media (min-width: 62em) {
  .areas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-text {
  max-width: 38em;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.65;
}

.facts {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: var(--radius);
  background: var(--tint);
}

.facts h3 {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.facts dl {
  margin: 0;
}

.facts dl > div {
  padding-block: 0.8rem;
  border-top: 1px solid var(--line);
}

.facts dl > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.facts dl > div:last-child {
  padding-bottom: 0;
}

.facts dt {
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.facts dd {
  margin: 0.125rem 0 0;
  font-weight: 600;
}

@media (min-width: 60em) {
  .about-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }

  .facts {
    margin-top: 0.5rem;
  }
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.contact-card {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  border-radius: var(--radius);
  background: var(--white);
}

.contact-label {
  margin-bottom: 0.25rem;
  color: var(--ink-muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-email {
  margin-bottom: 1.5rem;
  color: var(--navy);
  font-size: clamp(1.25rem, 0.95rem + 1.6vw, 1.875rem);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.contact-actions .button {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-hint {
  margin: 1.25rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.copy-status {
  margin: 0.75rem 0 0;
  color: var(--navy);
  font-weight: 600;
}

.copy-status:empty {
  margin: 0;
}

@media (min-width: 60em) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2.5rem;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
}

.site-footer p {
  margin-bottom: 0.35rem;
}

.site-footer p:has(> a) {
  margin-bottom: 0;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.75rem;
  color: var(--white);
  overflow-wrap: anywhere;
}

.site-footer :focus-visible {
  outline-color: var(--white);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem 3rem;
}

.footer-inner > div {
  min-width: 0;
  max-width: 100%;
}

.footer-name {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

/* ---------- Error page ---------- */

.error-page {
  padding-block: clamp(3rem, 10vw, 7rem);
}

.error-page h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
}

/* ---------- Motion and display preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .button {
    transition: background-color 0.15s ease, color 0.15s ease, text-decoration-color 0.15s ease;
  }
}

@media (forced-colors: active) {
  .diagram {
    forced-color-adjust: none;
  }

  .section h2::before {
    background: CanvasText;
  }
}
