/* The marketing site at metertrainer.com. Phone first; the desktop layout
   starts at 960px. Values come from docs/design/metertrainer.pen. */

:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --ink: #14202a;
  --muted: #56666f;
  --line: #dce2e6;
  --night: #121b23;
  --night-2: #1c2832;
  --night-text: #e9eef1;
  --night-muted: #9dacb6;
  --red: #e5391c;
  --red-dark: #b92a12;
  --bolt: #ffd21f;
  --green: #3fae2a;
  --display: "Barlow Semi Condensed", system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
}

h2 {
  font-size: 34px;
  line-height: 1.06;
}

h3 {
  font-size: 26px;
  line-height: 1.15;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.rule {
  display: block;
  width: 40px;
  height: 4px;
  background: var(--red);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  background: var(--red);
  color: #ffffff;
  font: 600 15px var(--body);
  cursor: pointer;
  transition: background-color 0.15s;
}

.button:hover {
  background: var(--red-dark);
}

.button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--bolt);
  outline-offset: 2px;
}

.button-outline {
  background: transparent;
  box-shadow: inset 0 0 0 1px #ffffff33;
  color: var(--night-text);
}

.button-outline:hover {
  background: #ffffff14;
}

.button-large {
  width: 100%;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 16px;
}

/* Hero */

.hero {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: #ffffff;
  padding-bottom: 40px;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 16px;
}

.logo {
  margin-right: auto;
}

.logo img {
  width: 140px;
}

.nav-links,
.nav-actions {
  display: none;
}

.nav-login {
  order: 1;
  color: var(--night-text);
  font-weight: 600;
  font-size: 15px;
}

.nav-menu {
  order: 2;
}

.nav-menu summary {
  display: flex;
  list-style: none;
  cursor: pointer;
  color: var(--night-text);
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary .icon {
  width: 24px;
  height: 24px;
}

.nav-menu-links {
  position: absolute;
  top: 60px;
  right: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 12px;
  background: var(--night-2);
  box-shadow: 0 16px 40px #00000066;
}

.nav-menu-links a {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--night-text);
  font-weight: 500;
}

.nav-menu-links a:hover {
  background: #ffffff14;
}

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 44px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bolt);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.eyebrow-icon {
  width: 14px;
  height: 14px;
}

.hero h1 {
  font-size: 42px;
  line-height: 43px;
}

.subhead {
  color: var(--night-muted);
  font-size: 17px;
  line-height: 26px;
}

.laptop {
  width: 100%;
  max-width: 560px;
  align-self: center;
}

/* On a phone the laptop sits between the copy and its button, as in the
   design, so the copy's box steps aside. */
@media (max-width: 959px) {
  .hero-copy {
    display: contents;
  }

  .laptop {
    order: 1;
    margin: 12px 0;
  }

  .hero-copy .button {
    order: 2;
  }
}

/* Mission */

.mission {
  background: var(--surface);
  padding: 56px 0;
}

.split {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.split-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mission-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mission-text p,
.contact-left p {
  color: var(--muted);
  font-size: 16px;
  line-height: 26px;
}

/* Features */

.features {
  padding: 56px 0;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
}

.screenshot {
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-copy p {
  color: var(--muted);
  line-height: 26px;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}

.check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #3fae2a1f;
  color: var(--green);
}

.check .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* Meters */

.meters {
  background: var(--night);
  color: #ffffff;
  padding: 56px 0;
}

.meters-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.meters-header p {
  color: var(--night-muted);
  line-height: 26px;
}

.meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 12px;
  margin-top: 20px;
}

.meter-grid figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meter-grid img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
}

.meter-grid figcaption {
  color: var(--night-text);
  font-size: 14px;
  font-weight: 600;
}

.label-long {
  display: none;
}

/* Pricing */

.pricing {
  padding: 56px 0;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 440px;
  margin: 20px auto 0;
  padding: 28px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.plan-name {
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
}

.plan-price {
  font-family: var(--display);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.1;
}

.plan-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.plan hr {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.plan-list .icon {
  color: var(--green);
}

/* Contact */

.contact {
  background: var(--surface);
  padding: 56px 0;
}

.contact .split {
  gap: 20px;
}

.contact-left {
  gap: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px var(--body);
}

.field input {
  height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: none;
}

.field input[aria-invalid] {
  border-color: var(--red);
}

.field-error {
  color: var(--red-dark);
  font-size: 14px;
}

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 500;
}

.notice-success {
  background: #3fae2a1f;
  color: #24701a;
}

.notice-error {
  background: #e5391c14;
  color: var(--red-dark);
}

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

.contact-form .button {
  margin-top: 0;
}

/* Footer */

.footer {
  background: var(--night);
  color: var(--night-muted);
  padding: 36px 0;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.footer-inner img {
  width: 130px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.footer a:hover,
.nav-links a:hover {
  color: #ffffff;
}

/* Desktop */

@media (min-width: 960px) {
  .wrap {
    padding: 0 40px;
  }

  h2 {
    font-size: 48px;
    line-height: 50px;
  }

  h3 {
    font-size: 36px;
  }

  .rule {
    width: 48px;
  }

  .hero {
    padding-bottom: 0;
  }

  .nav {
    height: 88px;
    gap: 0;
  }

  .logo {
    margin-right: 0;
  }

  .logo img {
    width: 190px;
  }

  .nav-links {
    display: flex;
    gap: 36px;
    margin: 0 auto;
    color: var(--night-muted);
    font-size: 15px;
    font-weight: 500;
  }

  .nav-actions {
    display: flex;
    gap: 12px;
  }

  .nav-menu,
  .nav-login {
    display: none;
  }

  .hero-body {
    flex-direction: row;
    align-items: center;
    gap: 56px;
    padding-top: 56px;
  }

  .hero-copy {
    flex: 0 0 500px;
    gap: 24px;
    padding-bottom: 72px;
  }

  .eyebrow {
    gap: 8px;
    font-size: 13px;
    letter-spacing: 1.4px;
  }

  .eyebrow-icon {
    width: 16px;
    height: 16px;
  }

  .hero h1 {
    font-size: 68px;
    line-height: 68px;
  }

  .subhead {
    font-size: 20px;
    line-height: 30px;
  }

  .hero-copy .button {
    width: auto;
    margin-top: 8px;
    padding: 16px 26px;
  }

  .laptop {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    max-height: 440px;
    object-fit: contain;
  }

  .mission,
  .features,
  .meters,
  .pricing,
  .contact {
    padding: 112px 0;
  }

  .split {
    flex-direction: row;
    align-items: flex-start;
    gap: 96px;
  }

  .split-left {
    flex: 0 0 440px;
    gap: 20px;
  }

  .mission-text {
    flex: 1 1 0;
    gap: 22px;
    padding-top: 64px;
  }

  .mission-text p,
  .contact-left p {
    font-size: 18px;
    line-height: 30px;
  }

  .features h2 {
    font-size: 44px;
    text-align: center;
  }

  .feature {
    flex-direction: row;
    align-items: center;
    gap: 80px;
    margin-top: 96px;
  }

  .feature-reverse {
    flex-direction: row-reverse;
  }

  .screenshot {
    flex: 0 0 640px;
    height: 508px;
    border-radius: 14px;
    box-shadow:
      inset 0 0 0 1px var(--line),
      0 24px 60px #14202a22;
  }

  .feature-copy {
    flex: 1 1 0;
    gap: 20px;
  }

  .feature-copy p {
    font-size: 18px;
    line-height: 29px;
  }

  .checks {
    gap: 14px;
    padding-top: 8px;
  }

  .checks li {
    gap: 12px;
    font-size: 16px;
  }

  .meters-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }

  .meters-header p {
    flex: 0 0 520px;
    font-size: 18px;
    line-height: 29px;
  }

  .meter-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 56px;
  }

  .meter-grid figure {
    gap: 16px;
  }

  .meter-grid img {
    height: 300px;
    border-radius: 12px;
  }

  .meter-grid figcaption {
    font-size: 17px;
  }

  .label-long {
    display: inline;
  }

  .label-short {
    display: none;
  }

  .pricing h2 {
    text-align: center;
  }

  .plan {
    gap: 24px;
    margin-top: 48px;
    padding: 40px;
    border-radius: 16px;
  }

  .plan-name {
    font-size: 16px;
  }

  .plan-price {
    font-size: 56px;
  }

  .plan-note {
    margin-top: 6px;
    font-size: 15px;
  }

  .plan-list {
    gap: 12px;
  }

  .plan-list li {
    font-size: 16px;
  }

  .split-left.contact-left {
    flex: 0 0 420px;
  }

  .contact-form {
    flex: 1 1 0;
    gap: 18px;
    padding: 40px;
    border-radius: 16px;
    background: var(--bg);
  }

  .contact-form .field input,
  .contact-form .field textarea {
    background: var(--surface);
  }

  .contact-form .field textarea {
    min-height: 120px;
  }

  .field-row {
    flex-direction: row;
    gap: 16px;
  }

  .contact-form .button {
    width: auto;
    align-self: flex-start;
    padding: 16px 26px;
  }

  .footer {
    padding: 40px 0;
    font-size: 14px;
  }

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-inner img {
    width: 150px;
  }

  .footer-links {
    gap: 28px;
  }
}
