:root {
  --navy: #071522;
  --navy2: #10283b;
  --blue: #2e6da8;
  --paper: #f4f0e8;
  --ink: #17202a;
  --muted: #69717a;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Libre Franklin", Arial, sans-serif;
}

/* Base */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

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

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

h1,
h2 {
  font-family: var(--serif);
  line-height: 1.06;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}

/* Announcement */

.announcement {
  padding: 9px 20px;
  color: #dce8f2;
  background: var(--navy);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
  border-bottom: 1px solid #e5e5e5;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 82px;
}

.logo-link {
  width: 255px;
}

.main-nav {
  display: flex;
  gap: 27px;
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.header-cta {
  padding: 12px 17px;
  color: white;
  background: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.menu-button {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 0;
}

.menu-button span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px;
  background: var(--navy);
}

/* Hero */

.hero {
  position: relative;
  color: white;
  background:
    linear-gradient(
      90deg,
      rgba(7, 21, 34, 0.60) 0%,
      rgba(7, 21, 34, 0.50) 42%,
      rgba(7, 21, 34, 0.25) 70%,
      rgba(7, 21, 34, 0.35) 100%
    ),
    url("hero-weather.jpg") center center / cover no-repeat;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr;
  align-items: end;
  gap: 70px;
  min-height: 680px;
  padding: 110px 0 80px;
}

.hero-copy {
  max-width: 760px;
  padding: 20px 24px 22px 0;
  border-radius: 0;
}

.kicker {
  margin: 0 0 14px;
  color: #9fc4e2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker.dark {
  color: var(--blue);
}

.hero .kicker {
  font-size: 0.64rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
}

.hero h1 em {
  color: #d5e3ed;
}

.lead {
  max-width: 680px;
  margin: 24px 0 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 25px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary {
  color: white;
  background: #2f6fa9;
}

.secondary {
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

/* Hero panel */

.hero-panel {
  padding: 38px;
  color: var(--ink);
  background: rgba(245, 241, 233, 0.94);
}

.hero-panel > span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-panel h2 {
  margin: 12px 0;
  font-size: 2rem;
}

.hero-panel dl div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(23, 32, 42, 0.1);
  font-size: 0.78rem;
}

.hero-panel dd {
  margin: 0;
  font-weight: 700;
}

/* Shared sections */

.section {
  padding: 78px 0;
}

.section p {
  max-width: 72ch;
}

.intro h2,
.section-top h2,
.about h2,
.section-heading h2,
.why h2,
.contact h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
}

/* Introduction */

.intro {
  background: var(--paper);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
}

/* Services */

.services,
.why {
  color: white;
  background: var(--navy);
}

.section-top {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 48px;
}

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

.service-list article {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.service-list article > span {
  color: #78a8cf;
}

.service-list h3,
.why h3 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 1.55rem;
}

.service-list p,
.why p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 80px;
}

.portrait-frame {
  padding: 16px;
  background: var(--paper);
}

.portrait-placeholder {
  display: grid;
  place-items: center;
  height: 470px;
  color: #d6e0e8;
  background: linear-gradient(145deg, #172637, #050b11);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portrait-photo {
  width: 100%;
  height: 470px;
  object-fit: cover;
  object-position: center 34%;
  filter: saturate(0.9) contrast(1.03);
}

.portrait-caption {
  padding: 18px 6px;
}

.portrait-caption strong,
.portrait-caption span {
  display: block;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 34px;
  border-top: 1px solid rgba(23, 32, 42, 0.16);
}

.credential-grid div {
  padding: 23px 18px 0 0;
}

.credential-grid strong,
.credential-grid span {
  display: block;
}

.credential-grid strong {
  color: var(--blue);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.credential-grid span {
  color: var(--muted);
  font-size: 0.73rem;
  text-transform: uppercase;
}

/* Representative applications */

.matters {
  background: var(--paper);
}

.section-heading {
  max-width: 780px;
  margin: 0 auto 50px;
  text-align: center;
}

.matter-carousel {
  position: relative;
}

.matter-viewport {
  overflow: hidden;
}

.matter-track {
  display: flex;
  gap: 24px;
  transition: transform 650ms ease;
}

.matter-card {
  display: flex;
  flex: 0 0 calc((100% - 48px) / 3);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: white;
  box-shadow: 0 15px 40px rgba(24, 32, 42, 0.08);
}

.matter-card > div {
  flex: 1;
  padding: 25px;
}

.matter-card > img.matter-image {
  display: block;
  flex: 0 0 225px;
  width: 100%;
  max-width: none;
  height: 225px;
  object-fit: cover;
  object-position: center;
}

.matter-card span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.matter-card h3 {
  margin: 10px 0;
  font-family: var(--serif);
  font-size: 1.45rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
}

.carousel-arrow {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--navy);
  background: white;
  border: 1px solid rgba(23, 32, 42, 0.16);
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  color: white;
  background: var(--navy);
  border-color: var(--navy);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(23, 32, 42, 0.22);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .matter-track {
    transition: none;
  }
}

/* Why METLOGIC */

.why-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}

.why-points article {
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 18px;
  padding: 21px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}

.contact address {
  margin-top: 24px;
  font-style: normal;
  line-height: 1.7;
}

.contact form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 34px;
  background: var(--paper);
}

.contact label {
  display: grid;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cfd4d8;
}

.full {
  grid-column: 1 / -1;
}

/* Footer */

.footer {
  padding: 60px 0 24px;
  color: white;
  background: #050e16;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr 1fr;
  gap: 70px;
}

.footer-grid > div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer img {
  width: 265px;
}

.footer-logo {
  padding: 0;
  background: transparent;
}

.footer p,
.footer span,
.footer a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-legal {
  display: flex;
  gap: 18px;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.8rem;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: white;
}

.mobile-contact-link {
  display: none;
}

/* Tablet */

@media (max-width: 1120px) {
  .header-cta {
    display: none;
  }

  .mobile-contact-link {
    display: block;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 92px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    padding: 24px 30px;
    background: white;
  }

  .main-nav.open {
    display: flex;
  }

  .hero-inner,
  .intro-grid,
  .section-top,
  .about-grid,
  .why-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .matter-card {
    flex-basis: calc((100% - 24px) / 2);
  }
  

  .portrait-frame {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }

  .portrait-photo {
    height: auto;
    aspect-ratio: 4 / 5;
    object-position: center 30%;
  }


  .footer-grid {
    gap: 35px;
  }

}

/* Mobile */

@media (max-width: 650px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .intro-grid {
    gap: 36px;
  }

  .section-top,
  .why-grid {
    gap: 34px;
  }

  .service-list article {
    padding: 24px 0;
  }

  .why-points article {
    padding: 18px 0;
  }

  .footer {
    padding: 42px 0 20px;
  }

  .footer-grid {
    gap: 34px;
  }

  .footer-bottom {
    margin-top: 32px;
    padding-top: 18px;
  }

  .logo-link {
    width: 195px;
  }

  .hero-inner {
    min-height: auto;
    padding: 62px 0 54px;
    gap: 34px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-panel {
    padding: 28px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 9vw, 3rem);
  }

  .intro h2,
  .section-top h2,
  .about h2,
  .section-heading h2,
  .why h2,
  .contact h2 {
    line-height: 1.12;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .credential-grid,
  .contact form,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid > div:last-child {
    grid-column: auto;
  }

  .matter-card {
    flex-basis: 100%;
  }

  .portrait-placeholder {
    height: 360px;
  }

  .portrait-photo {
    height: auto;
    aspect-ratio: 4 / 5;
    object-position: center 30%;
  }

  .footer-bottom {
    display: grid;
    gap: 8px;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
}
