/* MesaEdge Technologies site styles
   Brand colors and type come from the logo (see README.md). */

:root {
  /* Logo colors */
  --navy: #12306A;
  --blue: #3F6DB5;
  --red: #C41E3A;
  --gold: #F5B400;

  /* Logo colors for dark backgrounds */
  --red-light: #EE5D73;
  --blue-light: #8EADDF;
  --gold-light: #FFC72C;
  --navy-tint: #C8D6EE;

  /* Page colors */
  --sky: #E8EFF8;
  --ink: #1C2840;
  --muted: #46536B;
  --rule: #CDD8E8;
  --white: #FFFFFF;
  --navy-hover: #0B2250;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(64px, 8vw, 112px);
}

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

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-stretch: 115%;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.75rem);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  border-radius: 6px;
}

.skip-link:focus {
  top: 16px;
}

/* Logo lockup, built from the logo's proportions:
   mark height 1.59 x name size, gap 0.41 x, TECHNOLOGIES 29% of the name size,
   spread across the name with a 35% inset on each side. */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.41em;
  font-size: 26px;
  color: var(--navy);
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex: none;
  width: 2.49em;
  height: 1.59em;
}

.brand-words {
  display: flex;
  flex-direction: column;
  gap: 0.17em;
  font-stretch: 115%;
  line-height: 1;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-tech {
  display: flex;
  justify-content: space-between;
  margin: 0 1.207em; /* 35% of the name size, in this line's own ems */
  font-size: 0.29em;
  font-weight: 500;
  color: var(--blue);
}

.brand-reversed {
  color: var(--white);
}

.brand-reversed .brand-tech {
  color: var(--navy-tint);
}

/* Header and hero share the sky background */

.top {
  background: var(--sky);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.hero-text {
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(32px, 4vw, 40px);
}

.hero h1 {
  max-width: 13ch;
}

.lede {
  max-width: 34rem;
  margin-top: 24px;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 110%;
  text-decoration: none;
}

.button-primary {
  background: var(--navy);
  color: var(--white);
}

.button-primary:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}

.button-secondary {
  background: transparent;
  color: var(--navy);
}

.button-secondary:hover {
  background: var(--white);
}

.hero-land {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-land svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 308;
}

/* On wider screens the landscape tucks up under the text: the text stays
   left of the sun and above the top layer. */
@media (min-width: 900px) {
  .hero-land {
    margin-top: clamp(-84px, -6.5vw, 0px);
  }
}

/* On phones, crop the landscape from the left so the sun stays in view. */
@media (max-width: 599px) {
  .hero-land svg {
    height: 150px;
    aspect-ratio: auto;
  }
}

/* Sections */

.section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.section-sky {
  background: var(--sky);
}

/* Section intros span the full content width, so a one-sentence intro
   stays on one line on wide screens instead of wrapping early. */
.section-head {
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.1875rem;
  text-wrap: pretty;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 64px;
}

.service {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.service p,
.principle p {
  margin-top: 12px;
  color: var(--muted);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: center;
}

.story-text h2 {
  margin-bottom: 24px;
}

.statement {
  padding-top: 28px;
  border-top: 7px solid var(--red);
  color: var(--navy);
  font-size: clamp(1.625rem, 1.1rem + 1.7vw, 2.5rem);
  font-stretch: 115%;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 40px;
}

.principle {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: start;
}

.about-text h2 {
  margin-bottom: 24px;
}

.about-text p {
  max-width: 36rem;
}

/* Optional summit photo in the About section (see the comment in index.html) */
.about-photo {
  max-width: 36rem;
  margin: 32px 0 0;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.about-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.career h3 {
  margin-bottom: 8px;
}

.timeline {
  margin: 0;
}

.timeline-row {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 4px 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.timeline-row:last-child {
  border-bottom: 0;
}

.timeline dt {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.timeline dd {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.timeline dd strong {
  display: block;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
}

/* Strata rule: red and blue bands with white gaps, then the navy section,
   in the same 7 : 3 : 8 : 3 proportions as the logo's layers. */

.strata-rule {
  display: block;
}

.strata-rule span {
  display: block;
}

.strata-cap {
  height: 7px;
  margin-bottom: 3px;
  background: var(--red);
}

.strata-mid {
  height: 8px;
  margin-bottom: 3px;
  background: var(--blue);
}

/* Contact and footer on navy */

.dark {
  background: var(--navy);
  color: var(--white);
}

.dark :focus-visible {
  outline-color: var(--gold-light);
}

.dark h2 {
  color: var(--white);
}

.contact-intro {
  margin-top: 16px;
  text-wrap: pretty;
  color: var(--navy-tint);
  font-size: 1.1875rem;
}

.contact-methods {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, 0.6rem + 3vw, 2.5rem); /* keeps the email address on one line at phone width */
  line-height: 1.4;
}

.contact-methods a {
  color: var(--white);
  font-stretch: 115%;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--gold-light);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.25em;
}

.contact-methods a:hover {
  text-decoration-thickness: 5px;
}

/* Small note beside a contact link; moves to its own line as a whole when it doesn't fit */
.contact-note {
  display: inline-block;
  margin-left: 0.25em;
  color: var(--navy-tint);
  font-size: max(0.6em, 0.9375rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer .brand {
  font-size: 20px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
}

.footer-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration-color: var(--gold-light);
}

.footer-meta a:hover {
  text-decoration-thickness: 2px;
}

.copyright {
  color: var(--navy-tint);
  font-size: 0.9375rem;
}

/* 404 page */

.notfound {
  padding-top: clamp(48px, 10vw, 120px);
  padding-bottom: clamp(64px, 12vw, 140px);
}

.notfound p {
  max-width: 34rem;
  margin-top: 20px;
  font-size: 1.1875rem;
}

.notfound .hero-actions {
  margin-top: 32px;
}

/* Responsive */

@media (max-width: 1000px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .story-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 1.0625rem;
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .brand {
    font-size: 22px;
  }

  .nav-list {
    gap: 0 22px;
  }
}

@media (max-width: 520px) {
  .principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .timeline-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
