/* ==========================================================================
   TIG Trading — one-page site
   ========================================================================== */

:root {
  --navy: #0b1419;
  --navy-soft: #11212a;
  --ink: #16242c;
  --ink-soft: #55666f;
  --cream: #f4f2ec;
  --cream-deep: #eae6dc;
  --gold: #c5a46d;
  --gold-bright: #d8bb87;
  --line: rgba(22, 36, 44, 0.14);
  --line-light: rgba(255, 255, 255, 0.16);

  --shell: 1200px;
  --gutter: 32px;
  --radius: 2px;

  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-nav-open {
  overflow: hidden;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  transition: top 0.2s var(--ease);
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------- typography ---- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: #3d4c55;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow::after {
  content: "";
  width: 38px;
  height: 1px;
  background: var(--gold);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.74);
}

.h2 {
  max-width: 20ch;
  font-family: var(--serif);
  font-size: clamp(32px, 4.1vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h2 em {
  font-style: italic;
  color: var(--gold);
}

.lead {
  max-width: 60ch;
  margin-top: 26px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.85;
}

.section {
  padding: clamp(72px, 9vw, 130px) 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--gold);
  color: var(--navy);
}

.btn--gold:hover {
  background: var(--gold-bright);
}

.btn--gold:hover .icon {
  transform: translateX(4px);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 96px;
  transition: height 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(11, 20, 25, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-light);
}

.site-header.is-scrolled .site-header__inner {
  height: 72px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: #fff;
}

.brand__mark {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand__word {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.brand--footer .brand__mark {
  font-size: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav__list a {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s var(--ease);
}

.nav__list a:hover,
.nav__list a.is-active {
  color: #fff;
}

.nav__list a:hover::after,
.nav__list a.is-active::after {
  width: 100%;
}

.nav__cta {
  padding: 11px 22px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.nav__cta:hover {
  background: var(--gold);
  color: var(--navy);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 4px auto;
  background: #fff;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(100svh, 880px);
  padding-top: 140px;
  overflow: hidden;
  color: #fff;
  background: var(--navy);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      95deg,
      rgba(6, 13, 17, 0.92) 0%,
      rgba(6, 13, 17, 0.74) 42%,
      rgba(6, 13, 17, 0.24) 78%,
      rgba(6, 13, 17, 0.35) 100%
    ),
    linear-gradient(to top, rgba(5, 11, 15, 0.85), transparent 42%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 64px;
}

.hero__title {
  max-width: 17ch;
  font-family: var(--serif);
  font-size: clamp(40px, 6.4vw, 80px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__title em {
  font-style: italic;
  color: var(--gold-bright);
}

.hero__lead {
  max-width: 54ch;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16.5px;
  line-height: 1.85;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

/* ---------------------------------------------------------------- about -- */

.about__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(40px, 6vw, 86px);
  align-items: center;
}

.about__media {
  position: relative;
}

.about__media::before {
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  border: 1px solid var(--gold);
  opacity: 0.5;
}

.about__media picture {
  position: relative;
  display: block;
  box-shadow: 0 30px 70px rgba(12, 24, 31, 0.22);
}

.about__media img {
  width: 100%;
  aspect-ratio: 4 / 3.2;
  object-fit: cover;
}

.about__media figcaption {
  position: relative;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.chain {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border: 1px solid var(--line);
}

.chain li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  background: var(--cream);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background-color 0.25s var(--ease);
}

.chain li:hover {
  background: var(--cream-deep);
}

.chain .icon {
  color: var(--gold);
}

/* ---------------------------------------------------------------- value -- */

.value {
  position: relative;
  color: #fff;
  background: var(--navy);
}

.value::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 12% 0%,
    rgba(197, 164, 109, 0.16),
    transparent 58%
  );
}

.value > .shell {
  position: relative;
}

.value__head {
  max-width: 980px;
}

.value__quote {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 46px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.value__quote span {
  display: block;
  margin-top: 22px;
  color: var(--gold);
  font-style: italic;
  font-size: clamp(19px, 2.1vw, 28px);
}

.value__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(48px, 6vw, 84px);
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.card {
  padding: 36px 30px 40px;
  background: var(--navy);
  transition: background-color 0.3s var(--ease);
}

.card:hover {
  background: var(--navy-soft);
}

.card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 14.5px;
  line-height: 1.75;
}

/* ------------------------------------------------------------ expertise -- */

.expertise {
  background: var(--cream);
}

.expertise__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

/* Шесть базовых колонок: три элемента по две в первом ряду и два по три во
   втором. Так пять элементов заполняют сетку без пустой ячейки, которая иначе
   просвечивает цветом разделителей. */
.pillars {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pillars li {
  grid-column: span 2;
  padding: 30px 26px 34px;
  background: var(--cream);
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.pillars li:nth-child(4),
.pillars li:nth-child(5) {
  grid-column: span 3;
}

.pillars li:hover {
  background: #fff;
}

.pillars .icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.pillars h3 {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.pillars p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}

/* -------------------------------------------------------------- markets -- */

.markets {
  position: relative;
  color: #fff;
  background: var(--navy-soft);
  overflow: hidden;
}

.markets::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(197, 164, 109, 0.14),
    transparent 62%
  );
}

.markets > .shell {
  position: relative;
}

.markets__head .lead {
  color: rgba(255, 255, 255, 0.72);
}

.markets__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
}

.markets__map {
  margin: 0;
}

.worldmap {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.worldmap__land {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.7;
}

.worldmap__region {
  fill: rgba(213, 180, 124, 0.34);
  stroke: var(--gold);
  stroke-width: 0.9;
  transition: fill 0.3s var(--ease);
}

.worldmap__region.is-active {
  fill: rgba(216, 187, 135, 0.66);
}

.worldmap__halo {
  fill: rgba(197, 164, 109, 0.16);
  transition: fill 0.3s var(--ease), r 0.3s var(--ease);
}

.worldmap__dot {
  fill: var(--gold);
  stroke: var(--navy);
  stroke-width: 2;
}

.worldmap__pin.is-active .worldmap__halo {
  fill: rgba(197, 164, 109, 0.34);
  r: 22;
}

.worldmap__pin.is-active .worldmap__dot {
  fill: var(--gold-bright);
}

.worldmap__label {
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 500;
  fill: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: rgba(8, 16, 20, 0.75);
  stroke-width: 5;
  stroke-linejoin: round;
}

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

.footer {
  padding: clamp(72px, 8vw, 116px) 0 44px;
  color: #fff;
  background: var(--navy);
  border-top: 1px solid var(--line-light);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.footer__intro .lead {
  color: rgba(255, 255, 255, 0.7);
}

.footer__contacts {
  display: grid;
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}

.footer__contact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 18px;
  padding: 26px 28px;
  background: var(--navy);
  transition: background-color 0.25s var(--ease);
}

.footer__contact:hover {
  background: var(--navy-soft);
}

.footer__contact .icon {
  grid-row: span 2;
  width: 24px;
  height: 24px;
  color: var(--gold);
}

.footer__label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer__value {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 28px;
  border-top: 1px solid var(--line-light);
}

.footer__note,
.footer__copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Photography comes from a CDN rather than the deployment. If it cannot be
   fetched, fall back to a flat treatment instead of a broken-image icon. */

.hero__media.is-missing img,
.about__media.is-missing img {
  display: none;
}

.hero__media.is-missing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0a1317 0%, #17303d 55%, #0a1317 100%);
}

.about__media.is-missing picture {
  aspect-ratio: 4 / 3.2;
  background: linear-gradient(135deg, #dedacd 0%, #efece4 55%, #d6d0c1 100%);
}

/* --------------------------------------------------------------- reveal -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------- responsive -- */

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

  .markets__grid {
    grid-template-columns: 1fr;
  }

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

  /* Пятый элемент занимает весь последний ряд — иначе остаётся пустая ячейка. */
  .pillars li,
  .pillars li:nth-child(4),
  .pillars li:nth-child(5) {
    grid-column: auto;
  }

  .pillars li:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: 24px;
  }

  .about__grid,
  .expertise__grid,
  .footer__top {
    grid-template-columns: 1fr;
  }

  .about__media {
    order: 2;
  }

  .about__media::before {
    inset: 16px -16px -16px 16px;
  }

  .h2,
  .hero__title {
    max-width: 24ch;
  }

  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    padding: 120px var(--gutter) 60px;
    background: rgba(8, 16, 20, 0.98);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
      visibility 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
  }

  .nav__list a {
    font-size: 20px;
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .hero {
    min-height: auto;
    padding-top: 150px;
  }

  .hero__inner {
    padding-bottom: 80px;
  }

  .hero__media img {
    object-position: 68% center;
  }
}

@media (max-width: 620px) {
  .chain,
  .pillars,
  .value__grid {
    grid-template-columns: 1fr;
  }

  .pillars li:last-child {
    grid-column: auto;
  }

  .brand__mark {
    font-size: 28px;
  }

  .brand__word {
    font-size: 10px;
    letter-spacing: 0.28em;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .card {
    padding: 26px 24px 30px;
  }
}

/* Карта масштабируется вместе с viewBox, поэтому на узких экранах подписи
   набираются крупнее — иначе они становятся нечитаемыми. */
@media (max-width: 760px) {
  .worldmap__label {
    font-size: 34px;
    stroke-width: 7;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
