/* Mevali marketing site.
   Palette taken from the wordmark: deep navy through teal to green. */

:root {
  --navy: #12386f;
  --navy-deep: #0d2a53;
  --blue: #1565c0;
  --teal: #0fa5a0;
  --green: #6abf69;

  --ink: #16202e;
  --ink-soft: #4a5768;
  --ink-faint: #7c8798;
  --rule: #e2e7ee;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --surface-deep: #0d2a53;

  --brand-gradient: linear-gradient(100deg, var(--navy) 0%, var(--teal) 55%, var(--green) 100%);

  --measure: 68ch;
  --page: 1120px;
  --radius: 14px;

  --step--1: clamp(0.86rem, 0.84rem + 0.1vw, 0.92rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.32rem + 0.6vw, 1.85rem);
  --step-3: clamp(1.8rem, 1.55rem + 1.1vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.2vw, 3.6rem);
}

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

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-2);
}
h4 {
  font-size: var(--step-1);
}

p,
ul,
ol {
  margin: 0 0 1.1em;
  max-width: var(--measure);
}

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

strong {
  color: var(--navy-deep);
}

em {
  font-style: italic;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

section.alt {
  background: var(--surface-alt);
}

section:first-of-type {
  border-top: 0;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgb(13 42 83 / 0.2);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--navy-deep);
  text-decoration: none;
  letter-spacing: -0.015em;
}

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

/* The mark is a standalone "M", so a gap between it and the wordmark reads as "M evali".
   Keep the wordmark spelling the full name and let the gap separate mark from name. */
.brand .wordmark {
  padding-left: 0.15rem;
}

.brand .tm {
  font-size: 0.5em;
  vertical-align: super;
  font-weight: 500;
  color: var(--ink-faint);
  margin-left: 1px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.8rem);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 550;
  font-size: var(--step--1);
}

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

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgb(15 165 160 / 0.28);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 9px 26px rgb(15 165 160 / 0.36);
}

.btn-secondary {
  border-color: var(--rule);
  color: var(--navy-deep);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--navy-deep);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

/* ---------- hero ---------- */

.hero {
  background: var(--surface-alt);
  border-top: 0;
  padding-block: clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: var(--brand-gradient);
}

.hero h1 {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 22ch;
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.stop-losing {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  font-size: var(--step-1);
  color: var(--ink);
}

.stop-losing > li {
  padding-left: 1.1rem;
  border-left: 3px solid var(--teal);
  margin-bottom: 0.8rem;
}

.stop-losing-label {
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 0.7rem;
  letter-spacing: -0.02em;
}

.coherent {
  font-weight: 650;
  color: var(--navy-deep);
}

/* ---------- batteries ---------- */

.batteries {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2.2rem;
  padding: 0;
  list-style: none;
  max-width: none;
}

.battery {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin: 0;
}

.battery h3 {
  font-size: var(--step-0);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.battery h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--brand-gradient);
  flex: none;
}

.battery p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: none;
}

/* ---------- prose + figures ---------- */

.split {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .split.wide-text {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

/* Two or more figures stacked in one column of a .split, since .shot has no margin. */
.shot-stack {
  display: grid;
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
  align-content: start;
}

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface);
  box-shadow: 0 10px 34px rgb(13 42 83 / 0.09);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  font-size: var(--step--1);
  color: var(--ink-faint);
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--rule);
  background: var(--surface-alt);
}

/* Placeholder state when a screenshot has not been captured yet. */
.shot--missing img {
  display: none;
}

.shot--missing::before {
  content: attr(data-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 13rem;
  padding: 1.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--navy);
  background: linear-gradient(135deg, rgb(18 56 111 / 0.06), rgb(106 191 105 / 0.1));
}

/* ---------- callout ---------- */

.callout {
  border-left: 4px solid var(--teal);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.3rem 1.5rem;
  margin: 1.8rem 0;
  max-width: var(--measure);
  box-shadow: 0 4px 18px rgb(13 42 83 / 0.06);
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout-title {
  font-weight: 700;
  color: var(--navy-deep);
  display: block;
  margin-bottom: 0.3rem;
}

/* ---------- events ---------- */

.event {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-top: 2rem;
}

.event:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.event > h3 {
  font-size: var(--step--1);
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

/* ---------- chapter cards ---------- */

.chapters {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  list-style: none;
  padding: 0;
  margin-top: 2rem;
  max-width: none;
}

.chapters > li {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  background: var(--surface);
}

.chapters h3 {
  font-size: var(--step-0);
  margin-bottom: 0.3rem;
}

.chapters p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: none;
}

/* ---------- video ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface-deep);
  box-shadow: 0 14px 40px rgb(13 42 83 / 0.16);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-pending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 2rem;
  color: #fff;
  background: var(--brand-gradient);
}

.video-pending strong {
  color: #fff;
  font-size: var(--step-1);
}

.video-pending span {
  font-size: var(--step--1);
  opacity: 0.85;
}

/* ---------- form ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: 0 10px 34px rgb(13 42 83 / 0.08);
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--navy-deep);
  margin-bottom: 0.35rem;
}

.field .optional {
  font-weight: 450;
  color: var(--ink-faint);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(15 165 160 / 0.16);
}

.hp {
  position: absolute;
  left: -9999px;
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--surface-deep);
  color: #cfd9e8;
  padding-block: 3rem;
  font-size: var(--step--1);
}

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
  max-width: 46ch;
}

.footer-brand {
  font-weight: 700;
  color: #fff;
  font-size: var(--step-0);
  display: block;
  margin-bottom: 0.3rem;
}

.footer-nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

/* ---------- closing ---------- */

.closing {
  background: var(--surface-deep);
  color: #dce5f1;
  text-align: center;
  border-top: 0;
}

.closing h2,
.closing h3 {
  color: #fff;
}

/* The brand gradient starts in navy, which disappears against the dark closing background.
   Shift the ramp to the light end of the palette so the whole line stays legible. */
.closing h3 {
  background: linear-gradient(100deg, #5fd4e0 0%, var(--teal) 40%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: var(--step-3);
  margin-top: 2rem;
}

.closing p,
.closing .lede {
  margin-inline: auto;
  color: #c3d0e2;
}

.closing strong {
  color: #fff;
}

.closing .btn-row {
  justify-content: center;
}

.closing .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 0.3);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
