/* H2 ELECTRY · Energy — h2electry.com */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --blue: #0b4aa8;
  --blue-bright: #0f62fe;
  --blue-deep: #0b2540;
  --green: #0f9d58;
  --green-deep: #0c7a46;
  --amber: #ffb300;
  --sky: #e9f5ff;
  --mint: #eefbf3;
  --ink: #0a0a0a;
  --muted: #3a4a5a;
  --line: #c5d8ee;
  --white: #ffffff;
  --radius: 12px;
  --max: 1100px;
  --header-h: 96px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-bright);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex-shrink: 1;
}

.brand-logo {
  height: 72px;
  width: auto;
  max-width: min(280px, 55vw);
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
  background: #fff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  /* Logo image already includes the wordmark; keep text for screen readers only when paired with .sr-only */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--blue-deep);
}

.brand-division {
  font-size: 0.8rem;
  color: var(--green-deep);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .brand-name {
    display: none;
  }
}

.hero-logo {
  display: block;
  width: min(420px, 88vw);
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto 1.25rem;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(11, 74, 168, 0.12);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch a {
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
}

.lang-switch a[aria-current="true"] {
  background: var(--blue);
  color: var(--white);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--blue-deep);
  margin: 4px 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  padding: clamp(2rem, 6vw, 4.5rem) 1.25rem clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255, 179, 0, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 80%, rgba(15, 157, 88, 0.16), transparent 50%),
    linear-gradient(165deg, #e9f5ff 0%, #f7fbff 40%, #eefbf3 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 74, 168, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 74, 168, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
  margin: 0 0 0.35rem;
  line-height: 1.05;
}

.hero-slogan {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: var(--green-deep);
  font-weight: 600;
  margin: 0 0 1rem;
}

.hero-lead {
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--blue-bright);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--blue-deep);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 179, 0, 0.2);
  color: #8a6a20;
  border: 1px solid rgba(255, 179, 0, 0.45);
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

/* Sections */
main {
  flex: 1;
}

.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--blue-deep);
  line-height: 1.15;
}

.section-lead {
  max-width: 40rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.section--muted {
  background: linear-gradient(180deg, var(--sky) 0%, var(--mint) 100%);
}

.section--dark {
  background: linear-gradient(135deg, var(--blue-deep) 0%, #0b4aa8 55%, #0c7a46 140%);
  color: var(--white);
}

.section--dark .section-title,
.section--dark .section-kicker {
  color: var(--white);
}

.section--dark .section-lead {
  color: rgba(255, 255, 255, 0.85);
}

.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .problem-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.problem-list li {
  padding: 0;
}

.problem-list h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  color: var(--blue-deep);
}

.problem-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.flow-steps {
  display: grid;
  gap: 0.75rem;
  counter-reset: step;
}

@media (min-width: 800px) {
  .flow-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.flow-steps li {
  list-style: none;
  position: relative;
  padding: 1rem 0 0;
  border-top: 2px solid var(--green);
}

.flow-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -0.85rem;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.flow-steps h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0.75rem 0 0.35rem;
}

.flow-steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section--dark .flow-steps li {
  border-top-color: rgba(255, 179, 0, 0.7);
}

.section--dark .flow-steps li::before {
  background: var(--amber);
  color: var(--blue-deep);
}

.section--dark .flow-steps p {
  color: rgba(255, 255, 255, 0.8);
}

.concept-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .concept-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.diagram-frame {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: 0 12px 40px rgba(11, 74, 168, 0.08);
  min-height: 280px;
}

.diagram-frame img,
.diagram-frame > svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-frame svg .flow-line {
  animation: dash-flow 2.4s linear infinite;
}

.diagram-frame svg .pulse-node {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -24;
  }
}

.use-cases {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .use-cases {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-cases article {
  padding-top: 1rem;
  border-top: 2px solid var(--line);
}

.use-cases h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--blue-deep);
}

.use-cases p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem 1.5rem;
  background: linear-gradient(165deg, var(--sky), var(--mint));
}

.page-hero .section-inner {
  max-width: var(--max);
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--blue-deep);
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  padding-left: 1.2rem;
}

.note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--amber);
  background: rgba(255, 179, 0, 0.1);
  color: var(--muted);
  font-size: 0.95rem;
}

/* Contact form */
.contact-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.contact-meta a {
  font-weight: 600;
}

.form {
  display: grid;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--blue-deep);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(15, 98, 254, 0.35);
  border-color: var(--blue-bright);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  min-height: 1.4rem;
  font-size: 0.9rem;
}

.form-status.is-ok {
  color: var(--green-deep);
}

.form-status.is-err {
  color: #a12c2c;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  background: var(--blue-deep);
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer a {
  color: #c5d8ee;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.35rem;
}

.footer-slogan {
  color: var(--amber);
  font-weight: 600;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-nav span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.25rem;
}

.footer-copy {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* Page fade */
.page-fade {
  animation: page-in 0.45s ease;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    z-index: 30;
  }

  .main-nav.is-open {
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.85rem;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .header-actions {
    margin-left: auto;
  }
}
