:root {
  --red: #d52b1e;
  --burgundy: #981b46;
  --ink: #1c1c1c;
  --muted: #5f5f5f;
  --line: #e4e4e4;
  --soft: #f7f4f2;
  --paper: #ffffff;
  --header-h: 78px;
  --ring: 0 0 0 3px rgb(152 27 70 / 0.18);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Figtree, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

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

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

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 40;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}

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

.section-shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(12px);
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgb(32 32 32 / 0.06);
}

.header-bar {
  width: min(1120px, calc(100% - 48px));
  min-height: var(--header-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

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

.brand--inverse img {
  filter: grayscale(1) brightness(0) invert(1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(520px - var(--header-h));
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fff 0%, var(--soft) 100%);
  text-align: center;
}

.hero-sails,
.hero-sails::before,
.hero-sails::after {
  position: absolute;
  pointer-events: none;
}

.hero-sails {
  inset: auto -80px -120px auto;
  width: 420px;
  height: 420px;
  opacity: 0.14;
}

.hero-sails::before,
.hero-sails::after {
  content: "";
  width: 220px;
  height: 320px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.hero-sails::before {
  right: 48px;
  bottom: 40px;
  background: var(--burgundy);
}

.hero-sails::after {
  right: 96px;
  bottom: 40px;
  background: var(--red);
}

.hero-inner {
  position: relative;
  padding-block: 88px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--burgundy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.about h2,
.contact h2 {
  text-wrap: balance;
}

.hero h1 {
  max-width: 840px;
  margin: 0 auto;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 730px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 46px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button--primary {
  color: #fff;
  background: var(--burgundy);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #7d163a;
}

.button--ghost {
  border: 1px solid var(--line);
  background: #fff;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.ticker-section {
  position: relative;
  overflow: hidden;
  height: 46px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.ticker-section::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 118px;
  height: 100%;
  background: linear-gradient(90deg, rgb(255 255 255 / 0), #fff 28%);
  pointer-events: none;
}

.market-ticker {
  width: 100%;
  height: 74px;
  display: block;
  border: 0;
}

.ticker-static {
  display: none;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

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

  .market-ticker {
    display: none;
  }

  .ticker-static {
    display: flex;
  }

  .service-card,
  .market-grid a,
  .button,
  .menu-button span {
    transition: none;
  }
}

.services {
  padding-top: 96px;
  padding-bottom: 104px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2,
.about h2,
.contact h2 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section-heading > p:last-child,
.about-copy > p:not(.eyebrow),
.contact-copy > p:last-child {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.service-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: border-color 160ms ease, transform 160ms ease;
}

@media (min-width: 901px) {
  .service-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .service-card {
    grid-column: span 2;
  }

  .service-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .service-card:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.service-card:hover {
  border-color: #d2c4c8;
  transform: translateY(-2px);
}

.service-mark {
  width: 34px;
  height: 4px;
  margin-bottom: 36px;
  display: block;
  background: linear-gradient(90deg, var(--red) 0 55%, var(--burgundy) 55%);
}

.service-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.service-card p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.markets {
  padding: 95px 0 88px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-heading--center > p:last-child {
  margin-inline: auto;
}

.market-grid {
  max-width: 900px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.market-grid a {
  min-height: 168px;
  min-width: 0;
  padding: 24px 20px 20px;
  display: grid;
  grid-template-rows: 72px auto;
  align-items: center;
  justify-items: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  transition: border-color 160ms ease, transform 160ms ease;
}

.market-grid a:hover,
.market-grid a:focus-visible {
  border-color: var(--burgundy);
  transform: translateY(-2px);
}

.market-logo {
  width: auto;
  max-width: 86%;
  max-height: 64px;
  height: 48px;
  display: block;
  object-fit: contain;
}

.market-logo--byma {
  height: 44px;
}

.market-logo--mav {
  height: 38px;
}

.market-logo--a3 {
  height: 56px;
}

.pending-note {
  margin-top: 0;
  padding: 6px 12px;
  border-radius: 999px;
  color: #7a5a63;
  background: #f3eaee;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ticker-note {
  margin: 28px 0 0;
  color: #6b6b6b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.about,
.contact,
.services,
.markets {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.about {
  padding-top: 105px;
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 90px;
  align-items: center;
}

.about-copy > p:not(.eyebrow) {
  max-width: 510px;
}

.about-points {
  border-top: 1px solid var(--line);
}

.about-points article {
  padding: 23px 0;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.about-points article > span {
  color: var(--burgundy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.about-points h3 {
  margin: 0;
  font-size: 17px;
}

.about-points p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.contact {
  padding: 95px 0 100px;
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 90px;
  align-items: start;
}

.contact-form {
  padding: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  margin-bottom: 18px;
  display: block;
  color: #505050;
  font-size: 12px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  border-color: var(--burgundy);
  box-shadow: var(--ring);
  outline: none;
}

.contact-form input.is-invalid,
.contact-form textarea.is-invalid {
  border-color: var(--red);
}

.contact-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--burgundy);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 160ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: #7d163a;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--burgundy);
  color: #555;
  background: #f7f1f3;
  font-size: 13px;
  line-height: 1.5;
}

footer {
  padding: 68px 0 28px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  color: #d7d7d7;
  background: #222;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.7fr 0.9fr 0.9fr;
  gap: 52px;
}

.footer-identity > p {
  margin: 8px 0 0;
  color: #adadad;
  font-size: 13px;
  line-height: 1.45;
}

.footer-identity > p:first-of-type {
  margin-top: 23px;
  color: #fff;
}

.footer-grid h3 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid > div:not(.footer-identity) a,
.footer-grid > div:not(.footer-identity) p,
.footer-pending {
  margin: 0 0 10px;
  display: block;
  color: #adadad;
  font-size: 13px;
  line-height: 1.5;
}

.footer-pending {
  cursor: default;
}

.footer-grid a:hover,
.footer-grid a:focus-visible {
  color: #fff;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 50px;
  border-top: 1px solid #444;
  color: #b0b0b0;
  font-size: 12px;
  line-height: 1.55;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom p:last-child {
  max-width: 670px;
  text-align: right;
}

@media (max-width: 900px) {
  .header-bar {
    position: relative;
    width: calc(100% - 32px);
  }

  .menu-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
  }

  .menu-button span {
    width: 18px;
    height: 1.5px;
    display: block;
    background: var(--ink);
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .menu-button.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .menu-button.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-button.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .nav {
    position: absolute;
    z-index: 10;
    left: -16px;
    right: -16px;
    top: var(--header-h);
    padding: 24px;
    display: none;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }

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

  .about,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .market-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 70px;
  }

  .section-shell,
  .header-bar {
    width: calc(100% - 32px);
  }

  .brand img {
    width: 138px;
  }

  .hero-inner {
    padding-block: 64px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .services,
  .about {
    padding-top: 64px;
    padding-bottom: 68px;
  }

  .markets,
  .contact {
    padding-top: 64px;
    padding-bottom: 68px;
  }

  .market-grid,
  .form-row,
  .footer-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .contact-form {
    padding: 22px;
  }

  .footer-grid {
    gap: 35px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .footer-bottom p:last-child {
    text-align: left;
  }
}

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

  .nav a,
  .button,
  .service-card,
  .market-grid a,
  .contact-form button,
  .menu-button span {
    transition: none;
  }

  .service-card:hover,
  .market-grid a:hover {
    transform: none;
  }
}
