/*
Theme Name: Kernow Electromotive One Page
Theme URI: https://kernowelectromotive.co.uk/
Author: OpenAI for Kernow Electromotive
Description: A lightweight one-page WordPress theme for Kernow Electromotive.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kernow-one-page
*/

:root {
  --ke-bg: #09090c;
  --ke-bg-soft: #111117;
  --ke-panel: #17171f;
  --ke-panel-2: #20202b;
  --ke-purple: #8a3ffc;
  --ke-purple-bright: #a66bff;
  --ke-purple-dark: #5b21b6;
  --ke-white: #ffffff;
  --ke-text: #ededf2;
  --ke-muted: #b9b9c5;
  --ke-line: rgba(255,255,255,.11);
  --ke-success: #9ee6b0;
  --ke-shadow: 0 20px 60px rgba(0,0,0,.35);
  --ke-radius: 22px;
  --ke-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ke-bg);
  color: var(--ke-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.ke-wrap { width: min(calc(100% - 36px), var(--ke-max)); margin-inline: auto; }
.ke-section { padding: 92px 0; }
.ke-section--soft { background: var(--ke-bg-soft); }
.ke-eyebrow {
  margin: 0 0 12px;
  color: var(--ke-purple-bright);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ke-title {
  margin: 0;
  max-width: 820px;
  color: var(--ke-white);
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -.04em;
}
.ke-lead { max-width: 760px; color: var(--ke-muted); font-size: clamp(1rem, 2vw, 1.18rem); }

.ke-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(9,9,12,.76);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color .2s ease, background .2s ease;
}
.ke-header.is-scrolled { border-color: var(--ke-line); background: rgba(9,9,12,.94); }
.ke-nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.ke-brand { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1; }
.ke-brand__main { color: var(--ke-white); font-size: clamp(1rem, 2.2vw, 1.35rem); font-weight: 900; letter-spacing: .04em; }
.ke-brand__sub { margin-top: 7px; color: var(--ke-purple-bright); font-size: .67rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ke-links { display: flex; align-items: center; gap: 22px; }
.ke-links a { color: var(--ke-muted); text-decoration: none; font-size: .92rem; font-weight: 700; }
.ke-links a:hover, .ke-links a:focus { color: var(--ke-white); }
.ke-menu-toggle { display: none; border: 1px solid var(--ke-line); border-radius: 12px; background: var(--ke-panel); color: var(--ke-white); padding: 9px 12px; }

.ke-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ke-btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 21px;
  text-decoration: none;
  font-weight: 850;
  line-height: 1;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.ke-btn:hover, .ke-btn:focus { transform: translateY(-2px); }
.ke-btn--primary { background: linear-gradient(135deg, var(--ke-purple), var(--ke-purple-dark)); color: var(--ke-white); box-shadow: 0 12px 34px rgba(138,63,252,.25); }
.ke-btn--ghost { border-color: var(--ke-line); background: rgba(255,255,255,.04); color: var(--ke-white); }
.ke-btn--small { min-height: 42px; padding: 10px 16px; font-size: .9rem; }

.ke-hero {
  position: relative;
  min-height: 770px;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 136px 0 80px;
  background:
    radial-gradient(circle at 78% 23%, rgba(138,63,252,.27), transparent 26%),
    radial-gradient(circle at 12% 86%, rgba(91,33,182,.18), transparent 25%),
    linear-gradient(180deg, #0d0d12, var(--ke-bg));
}
.ke-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.ke-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 54px; align-items: center; }
.ke-hero h1 { margin: 0; color: var(--ke-white); font-size: clamp(3rem, 7vw, 6.7rem); line-height: .93; letter-spacing: -.065em; }
.ke-hero h1 span { display: block; color: var(--ke-purple-bright); }
.ke-hero__copy > p:not(.ke-eyebrow) { max-width: 700px; color: var(--ke-muted); font-size: clamp(1.04rem, 2vw, 1.25rem); }
.ke-hero__trust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 25px 0 31px; padding: 0; list-style: none; color: var(--ke-text); font-weight: 700; }
.ke-hero__trust li::before { content: "✓"; margin-right: 8px; color: var(--ke-success); }
.ke-diagnostic {
  position: relative;
  min-height: 460px;
  border: 1px solid rgba(166,107,255,.28);
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(138,63,252,.15), rgba(255,255,255,.03));
  box-shadow: var(--ke-shadow);
  overflow: hidden;
}
.ke-diagnostic::before {
  content: "";
  position: absolute;
  width: 330px; height: 330px;
  right: -90px; top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166,107,255,.36), transparent 70%);
}
.ke-diagnostic__screen { position: absolute; inset: 30px; display: flex; flex-direction: column; justify-content: space-between; }
.ke-diagnostic__top { display: flex; justify-content: space-between; gap: 16px; color: var(--ke-muted); font-weight: 800; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.ke-diagnostic__status { color: var(--ke-success); }
.ke-diagnostic__wave { height: 165px; display: flex; align-items: flex-end; gap: 8px; padding: 20px 0; }
.ke-diagnostic__wave span { flex: 1; min-width: 4px; border-radius: 6px; background: linear-gradient(to top, var(--ke-purple-dark), var(--ke-purple-bright)); opacity: .9; animation: kePulse 2.4s ease-in-out infinite alternate; }
.ke-diagnostic__wave span:nth-child(2n) { animation-delay: -.6s; }
.ke-diagnostic__wave span:nth-child(3n) { animation-delay: -1.2s; }
@keyframes kePulse { from { transform: scaleY(.45); opacity: .5; } to { transform: scaleY(1); opacity: 1; } }
.ke-diagnostic__caption strong { display: block; color: var(--ke-white); font-size: 1.5rem; }
.ke-diagnostic__caption span { color: var(--ke-muted); }

.ke-stats { position: relative; z-index: 2; margin-top: -42px; }
.ke-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ke-line); border-radius: var(--ke-radius); background: rgba(23,23,31,.96); box-shadow: var(--ke-shadow); overflow: hidden; }
.ke-stat { padding: 28px; border-right: 1px solid var(--ke-line); }
.ke-stat:last-child { border-right: 0; }
.ke-stat strong { display: block; color: var(--ke-white); font-size: 1.1rem; }
.ke-stat span { color: var(--ke-muted); font-size: .92rem; }

.ke-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 38px; }
.ke-card { min-height: 245px; border: 1px solid var(--ke-line); border-radius: var(--ke-radius); background: linear-gradient(145deg, var(--ke-panel), #111117); padding: 28px; box-shadow: 0 12px 34px rgba(0,0,0,.16); }
.ke-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(138,63,252,.13); color: var(--ke-purple-bright); font-weight: 950; }
.ke-card h3 { margin: 20px 0 8px; color: var(--ke-white); font-size: 1.17rem; }
.ke-card p { margin: 0; color: var(--ke-muted); }

.ke-about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: start; }
.ke-about__panel { border: 1px solid var(--ke-line); border-radius: var(--ke-radius); padding: 30px; background: linear-gradient(160deg, rgba(138,63,252,.13), var(--ke-panel)); }
.ke-about__panel h3 { margin-top: 0; color: var(--ke-white); }
.ke-checks { display: grid; gap: 13px; padding: 0; list-style: none; }
.ke-checks li { display: flex; gap: 11px; color: var(--ke-muted); }
.ke-checks li::before { content: "✓"; color: var(--ke-success); font-weight: 900; }

.ke-process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 38px; counter-reset: steps; }
.ke-step { border-top: 2px solid var(--ke-purple); padding: 22px 4px 0; counter-increment: steps; }
.ke-step::before { content: "0" counter(steps); display: block; margin-bottom: 14px; color: var(--ke-purple-bright); font-weight: 950; }
.ke-step h3 { margin: 0 0 8px; color: var(--ke-white); }
.ke-step p { margin: 0; color: var(--ke-muted); }

.ke-cta { border: 1px solid rgba(166,107,255,.3); border-radius: 30px; padding: clamp(30px, 6vw, 64px); background: linear-gradient(135deg, rgba(138,63,252,.22), rgba(23,23,31,.95)); box-shadow: var(--ke-shadow); }
.ke-cta__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; }
.ke-contact-list { display: grid; gap: 12px; }
.ke-contact-list a { color: var(--ke-white); text-decoration: none; font-weight: 850; }
.ke-contact-list span { display: block; color: var(--ke-muted); font-size: .86rem; font-weight: 600; }

.ke-footer { padding: 34px 0 110px; border-top: 1px solid var(--ke-line); background: #070709; }
.ke-footer__grid { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.ke-footer p { margin: 5px 0; color: var(--ke-muted); font-size: .88rem; }
.ke-footer a { color: var(--ke-muted); }

.ke-mobilebar { display: none; }

@media (max-width: 900px) {
  .ke-links { display: none; position: absolute; top: 70px; left: 18px; right: 18px; padding: 18px; border: 1px solid var(--ke-line); border-radius: 16px; background: rgba(17,17,23,.98); flex-direction: column; align-items: stretch; }
  .ke-links.is-open { display: flex; }
  .ke-menu-toggle { display: inline-flex; }
  .ke-hero { min-height: auto; }
  .ke-hero__grid, .ke-about, .ke-cta__grid { grid-template-columns: 1fr; }
  .ke-diagnostic { min-height: 330px; }
  .ke-grid { grid-template-columns: repeat(2, 1fr); }
  .ke-process { grid-template-columns: repeat(2, 1fr); }
  .ke-stats__grid { grid-template-columns: repeat(2, 1fr); }
  .ke-stat:nth-child(2) { border-right: 0; }
  .ke-stat:nth-child(-n+2) { border-bottom: 1px solid var(--ke-line); }
}

@media (max-width: 620px) {
  .ke-wrap { width: min(calc(100% - 26px), var(--ke-max)); }
  .ke-section { padding: 70px 0; }
  .ke-header .ke-btn--small { display: none; }
  .ke-hero { padding-top: 118px; }
  .ke-hero h1 { font-size: clamp(3.05rem, 16vw, 4.7rem); }
  .ke-diagnostic { display: none; }
  .ke-grid, .ke-process, .ke-stats__grid { grid-template-columns: 1fr; }
  .ke-stat { border-right: 0; border-bottom: 1px solid var(--ke-line); }
  .ke-stat:last-child { border-bottom: 0; }
  .ke-stats { margin-top: -22px; }
  .ke-footer { padding-bottom: 96px; }
  .ke-footer__grid { flex-direction: column; }
  .ke-mobilebar {
    position: fixed;
    z-index: 60;
    inset: auto 10px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--ke-line);
    border-radius: 18px;
    background: rgba(17,17,23,.94);
    backdrop-filter: blur(16px);
    box-shadow: var(--ke-shadow);
  }
  .ke-mobilebar a { min-height: 46px; display: grid; place-items: center; border-radius: 13px; text-decoration: none; font-weight: 900; }
  .ke-mobilebar__call { background: var(--ke-purple); color: #fff; }
  .ke-mobilebar__email { background: var(--ke-panel-2); color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
