/* ===========================================================
   Komneon — landing page
   Space Gray leads. Teal is the spark (~10%), never the field.
   =========================================================== */

:root {
  /* Brand palette */
  --space-gray: #2f3737; /* core brand colour */
  --near-black: #1a1f1f; /* deep backgrounds, high-contrast text */
  --gray:       #877c8d; /* secondary text, muted UI */
  --teal:       #339989; /* accent only — the "signal" */
  --light-mist: #f4f4f5; /* light surfaces */
  --white:      #ffffff;

  /* Derived */
  --hairline: rgba(244, 244, 245, 0.1);
  --error:    #e08a8a;

  /* Type */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Lato", system-ui, -apple-system, sans-serif;

  --container: 64rem;
  --narrow: 40rem;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* clears the sticky header on anchor jumps */
}

body {
  margin: 0;
  background: var(--near-black);
  color: var(--light-mist);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Shared building blocks ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--narrow);
}

.overline {
  margin: 0 0 1.25rem;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--teal);
}

/* The single recurring Teal accent — the "signal". */
.signal { color: var(--teal); position: relative; }

.dot {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  margin-left: 0.18em;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: middle;
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.2s var(--ease), transform 0.05s ease, background 0.2s ease;
}

.btn--primary {
  color: var(--near-black);
  background: var(--teal);
}

.btn--primary:hover { filter: brightness(1.08); }
.btn--primary:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ---------- Sticky header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(26, 31, 31, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--hairline);
}

.site-header__mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  color: var(--white);
  text-decoration: none;
  /* hidden over the hero (the big logo is already there), fades in on scroll */
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
}

.site-header.is-scrolled .site-header__mark {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.site-header__cta {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-mist);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.site-header__cta:hover,
.site-header__cta:focus-visible {
  color: var(--teal);
  border-color: var(--teal);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  background: radial-gradient(120% 80% at 50% 38%, var(--space-gray) 0%, var(--near-black) 72%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 46rem;
}

.hero__logo {
  width: min(380px, 70vw);
  height: auto;
  margin-bottom: 2.75rem;
}

.hero__headline {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
  font-size: clamp(1.9rem, 5.2vw, 3.4rem);
  color: var(--white);
}

.hero__subhead {
  margin: 0 0 2.5rem;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  color: var(--light-mist);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1px solid var(--gray);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
  opacity: 0.7;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.hero__scroll span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--teal);
  animation: scrollcue 1.8s ease-in-out infinite;
}

.hero__scroll:hover { opacity: 1; border-color: var(--teal); }

@keyframes scrollcue {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Bands / sections ---------- */

.band {
  padding: clamp(4rem, 11vw, 8rem) 0;
}

.band--dark { background: var(--near-black); }
.band--gray { background: var(--space-gray); }

.band--statement {
  background: var(--near-black);
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.band__heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.18;
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  color: var(--white);
  max-width: 30rem;
}

.band__lede {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--gray);
  max-width: 34rem;
}

/* ---------- Pillars ---------- */

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
  grid-template-columns: repeat(3, 1fr);
}

.pillar {
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.pillar__index {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 1.25rem;
}

.pillar__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.005em;
  color: var(--white);
}

.pillar__body {
  margin: 0;
  font-size: 0.98rem;
  color: var(--light-mist);
}

/* ---------- Statement band ---------- */

.statement {
  margin: 0 0 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-size: clamp(2rem, 6vw, 3.25rem);
  color: var(--white);
}

.statement__accent { color: var(--teal); }

.statement__sub {
  margin: 0 auto;
  max-width: 32rem;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--gray);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--space-gray);
  padding: clamp(4rem, 11vw, 8rem) 0;
}

.contact-heading {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  margin: 0 0 0.75rem;
  color: var(--white);
}

.contact-intro {
  margin: 0 0 2.5rem;
  color: var(--gray);
  max-width: 30rem;
}

.field {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: var(--near-black);
  border: 1px solid #3c4646;
  border-radius: 4px;
  resize: vertical;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(51, 153, 137, 0.35);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--gray); }

.error {
  min-height: 1rem;
  font-size: 0.8rem;
  color: var(--error);
}

.submit { margin-top: 0.25rem; }

.form-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.form-status.is-success { color: var(--teal); }
.form-status.is-error   { color: var(--error); }

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

.footer {
  background: var(--near-black);
  color: var(--gray);
  text-align: center;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
}

.footer__mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
  color: var(--light-mist);
  text-decoration: none;
}

.footer__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.footer a:not(.footer__mark) {
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer a:not(.footer__mark):hover,
.footer a:not(.footer__mark):focus-visible { color: var(--teal); }

/* ---------- Reveal on scroll (subtle) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot,
  .hero__scroll span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
