@import "./split-flap.css";

:root {
  color-scheme: light;
  color: #432d24;
  background: #f0e3ce;
  font-family: Manrope, system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; padding-bottom: 36px; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #76271f; outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.frame { width: min(1320px, calc(100% - 62px)); margin-inline: auto; }
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "brand nav language";
  align-items: center;
  gap: 12px;
  min-height: 70px;
}
.site-brand {
  display: inline-flex;
  grid-area: brand;
  align-items: center;
  justify-self: start;
  gap: 9px;
  min-height: 44px;
  font-size: clamp(.77rem, 1.6vw, 1rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.brand-mark {
  display: grid;
  flex: 0 0 27px;
  place-items: center;
  height: 27px;
  border: 1px solid #783028;
  border-radius: 6px;
  background: #a43b30;
  box-shadow: inset 0 1px #f1957366;
}
.brand-mark::before {
  content: "";
  width: 15px;
  height: 12px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, transparent 0 4px, #a43b30 4px 5.5px),
              linear-gradient(#ffe8bd 0 46%, #ba694c 46% 55%, #f3ce9d 55% 100%);
}
.site-nav { display: flex; grid-area: nav; flex-wrap: wrap; align-items: center; gap: 4px clamp(12px, 2vw, 30px); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .79rem; font-weight: 800; }
.site-nav a:hover, .site-brand:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-actions {
  display: flex;
  grid-area: language;
  align-items: center;
  justify-self: end;
  gap: 3px;
  padding: 3px;
  border: 1px solid #bc9e7e;
  border-radius: 9px;
  background: #f9ecd5;
  box-shadow: inset 0 1px #fff8e8, 0 2px 8px #6b3d2212;
}
.site-actions-divider {
  width: 1px;
  height: 24px;
  margin-inline: 2px;
  background: #cdb08e;
}
.cart-trigger[hidden] + .site-actions-divider { display: none; }
.site-language { font-size: .76rem; font-weight: 850; }
.language-switch { display: flex; gap: 2px; flex: none; }
.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 39px;
  min-height: 36px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #694538;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.language-switch a:hover { background: #efd8b8; color: #452b21; text-decoration: none; }
.language-switch a[aria-current="true"] {
  color: #fff4df;
  background: #91362c;
  box-shadow: inset 0 1px #d8785c, 0 1px 3px #5e281e33;
}

.entry { padding: clamp(24px, 5vw, 65px) 0; }
.entry h1 { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.05em; }
.entry nav { display: flex; gap: 12px; margin-top: 18px; }
.entry a { padding: 9px 14px; border: 1px solid #bc9e7e; border-radius: 6px; background: #fff1d8; font-size: .9rem; font-weight: 800; }

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 2fr);
  gap: 28px clamp(30px, 6vw, 84px);
  margin-top: clamp(25px, 5vw, 63px);
  padding: clamp(24px, 4vw, 44px) 0 22px;
  border-top: 1px solid #bc9e7e;
}
.footer-overview p {
  max-width: 35ch;
  margin-top: 13px;
  color: #654637;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.5;
}
.footer-overview small {
  display: block;
  max-width: 38ch;
  margin-top: 9px;
  color: #80614d;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.45;
}
.footer-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.footer-group h2 {
  margin-bottom: 9px;
  color: #452b21;
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.footer-group a,
.footer-group p {
  display: block;
  color: #654637;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.45;
}
.footer-group a {
  width: fit-content;
  min-height: 30px;
  padding: 4px 0;
}
.footer-group a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-group p + p { margin-top: 7px; }
.footer-group p span { display: block; color: #86644f; font-size: .68rem; }
.footer-bottom {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  border-top: 1px solid #d1b697;
  color: #80614d;
  font-size: .68rem;
  font-weight: 700;
}

.terminal {
  padding: clamp(24px, 4.5vw, 65px);
  border: 1px solid #932a23;
  border-radius: 14px;
  background: radial-gradient(ellipse at 12% 4%, #c95436, transparent 65%), #a9372e;
  color: #fff1d6;
  box-shadow: inset 0 2px #f78c6b6e;
}
.intro h1 { font-weight: 850; font-size: clamp(2.6rem, 6.6vw, 5.65rem); line-height: .94; letter-spacing: -.075em; word-spacing: .035em; text-wrap: balance; }
.intro h1:lang(en) { font-size: clamp(2.5rem, 6.1vw, 5.45rem); }
.intro p { margin-top: 14px; max-width: 56ch; font-size: clamp(.83rem, 1.5vw, 1rem); font-weight: 750; line-height: 1.52; }

.layout {
  display: grid;
  grid-template-areas: "selection finder";
  grid-template-columns: minmax(0, 1.44fr) minmax(0, 1fr);
  gap: clamp(13px, 2.2vw, 28px);
  align-items: start;
  margin-top: clamp(26px, 4.3vw, 55px);
}
.finder {
  grid-area: finder;
  min-width: 0;
  padding: 5px;
  border: 1px solid #f7c9a3;
  border-radius: 11px;
  background: linear-gradient(147deg, #efd1aa, #e6b995);
  color: #401f17;
  box-shadow: 0 8px 20px #721a174c;
}
.finder-head { padding: 9px 9px 7px; }
.finder-title, .platform-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; }
.finder-title h2, .platform-head h3 { font-size: .94rem; font-weight: 850; letter-spacing: -.035em; }
.finder-title span, .platform-head span { font-size: .69rem; font-weight: 750; color: #694234; }
.finder label { display: block; margin: 11px 0 4px; font-size: .72rem; font-weight: 800; }
.search-box { display: flex; align-items: center; gap: 9px; padding: 0 9px 0 11px; border: 1px solid #a6674d; border-radius: 6px; background: #fff5df; }
.search-box:focus-within { border-color: #73251f; outline: 2px solid #73251f; outline-offset: 2px; }
.search-box span { position: relative; width: 12px; height: 12px; flex: none; border: 1.5px solid #6c4938; border-radius: 50%; }
.search-box span::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 5px; height: 1.5px; background: #6c4938; transform: rotate(49deg); }
.search-box input { min-width: 0; width: 100%; min-height: 44px; padding: 6px 0; border: 0; background: transparent; outline: none; font-size: .9rem; font-weight: 700; }
.search-box input::placeholder { color: #785c4a; opacity: 1; }

.region-scroll {
  max-height: 375px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #936447 #edc7a4;
  scrollbar-gutter: stable;
  padding: 4px 4px 5px;
}
.regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 5px; }
.regions li { min-width: 0; }
.regions button {
  display: grid;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  padding: 6px 7px;
  border: 1px solid #caa787;
  border-radius: 5px;
  color: #41281e;
  background: #fff1d8;
  text-align: left;
}
.regions button { grid-template-columns: auto minmax(0, 1fr) auto; height: 100%; }
.regions button:hover { background: #ffe3b8; border-color: #a9744e; }
.regions button[aria-pressed="true"] { background: #f6c788; border-color: #8b492c; }
.regions button:focus-visible { outline-offset: -3px; }
.regions strong { font-size: .72rem; font-weight: 800; overflow-wrap: anywhere; }
.iso, .display-code { min-width: 28px; padding: 3px 4px; border: 1px solid #8b654b6b; border-radius: 3px; font: 800 .66rem/1.1 ui-monospace, Consolas, monospace; text-align: center; }
.region-count { color: #72503a; font-size: .67rem; font-weight: 800; }
.empty { padding: 13px 9px; font-size: .78rem; font-weight: 700; }

.selection { grid-area: selection; min-width: 0; }
.display {
  --flap-size: clamp(.69rem, 2vw, 2rem);
  min-width: 0;
  padding: clamp(13px, 2.23vw, 28px);
  border: 1px solid #fff0cb;
  border-radius: 11px;
  color: #3c2b23;
  background: linear-gradient(#f9e7be, #e2c99d);
  box-shadow: 1px 10px 20px #711a164d, inset 0 -3px 2px #bb99616e;
}
.display-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.display-head h2 { flex: 1 1 10rem; font-size: clamp(1.03rem, 2.2vw, 1.63rem); font-weight: 850; line-height: 1.17; letter-spacing: -.04em; }
.display-code { padding: 4px 6px; }
.map-reset {
  flex: none;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid #9b7353;
  border-radius: 5px;
  background: #f8e7bf;
  color: #624331;
  font-size: .68rem;
  font-weight: 800;
}
.map-reset:hover { border-color: #723026; background: #fff0ce; }
.board { padding: clamp(3px, .55vw, 8px); border: 1px solid #3d2f23; border-radius: 7px; background: #29251f; box-shadow: inset 0 4px 10px #0c0a09, 0 1px #fff0c9; }
.board .slats { margin: 0; padding: 0; box-shadow: none; }
.board .slats + .slats { margin-top: clamp(2px, .35vw, 5px); }
.board .slats > span { height: 2.05em; padding-top: .14em; }
.atlas-board {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 760 / 360;
  min-height: 174px;
  overflow: hidden;
  border: 1px solid #ad7e57;
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 20%, #fff1d1, #eed5a9 85%);
  box-shadow: inset 0 0 0 4px #fcf0cd, inset 0 0 26px #90613e26;
}
.atlas-board::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #9c704a42;
  border-radius: 4px;
  pointer-events: none;
}
.atlas-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-grid path {
  fill: none;
  stroke: #9c704a57;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
}
.atlas-route {
  fill: none;
  stroke: #68241e;
  stroke-width: 2.5;
  stroke-dasharray: 1;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 1px #fff1cf) drop-shadow(0 0 1px #fff1cf);
}
.atlas-destination {
  position: absolute;
  z-index: 2;
  width: clamp(8px, 1vw, 11px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  border: 2px solid #7c2b24;
  border-radius: 50%;
  background: #fff1cf;
  box-shadow: 0 0 0 2px #fff1cfc2;
}
.atlas-pins { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.atlas-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
}
.atlas-pin b {
  display: grid;
  width: clamp(26px, 3vw, 34px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #702d23;
  border-radius: 50%;
  background: #9f392d;
  color: #fff3da;
  font: 800 .8rem/1 ui-monospace, Consolas, monospace;
  box-shadow: 0 0 0 3px #fff0d1da, 0 3px 8px #5a302848;
}
.atlas-pin span {
  position: absolute;
  top: calc(50% + clamp(14px, 1.7vw, 20px));
  left: 50%;
  width: max-content;
  max-width: 7.8rem;
  transform: translateX(-50%);
  padding: 2px 4px;
  border-radius: 3px;
  background: #fff0d0;
  color: #5e2c23;
  font-size: clamp(.61rem, 1.4vw, .79rem);
  font-weight: 850;
  line-height: 1.16;
  text-align: center;
}
.atlas-pin[data-map-zone="middle-east"] span { max-width: clamp(3.3rem, 10vw, 7.8rem); }
.atlas-pin:hover b, .atlas-pin:focus-visible b { background: #752920; }
.atlas-pin[aria-expanded="true"] { z-index: 1; }
.atlas-pin[aria-expanded="true"] b {
  border-color: #5b1d18;
  background: #5b1d18;
  box-shadow: 0 0 0 4px #fff5df, 0 0 0 6px #81312490;
}
.atlas-pin[aria-expanded="true"] span {
  top: auto;
  bottom: calc(50% + clamp(15px, 1.8vw, 21px));
  background: #61271f;
  color: #fff3da;
}
.atlas-pin:focus-visible { outline-offset: -1px; }
.atlas-instruction {
  margin-top: 10px;
  color: #694533;
  font-size: .82rem;
  line-height: 1.45;
}
#atlas-markets button {
  border: 1px solid #bd9472;
  border-radius: 6px;
  background: #fff2d8;
  color: #59382a;
  font-size: .82rem;
  font-weight: 750;
}
#atlas-markets button:hover { border-color: #8d4933; background: #f9d8ac; }
#atlas-markets button[aria-pressed="true"] {
  border-color: #7e3027;
  background: #8c352a;
  color: #fff4da;
}
.atlas-directory {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #bf9a73;
}
.atlas-directory h3 { margin-bottom: 7px; font-size: .92rem; }
#atlas-markets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr));
  gap: 6px;
  max-height: 10.4rem;
  overflow: auto;
  padding: 3px;
  scrollbar-color: #9a6e50 #f4deb5;
}
#atlas-markets button {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  text-align: start;
  overflow-wrap: anywhere;
}
#atlas-markets button:focus-visible { outline-offset: -3px; }
#atlas-markets button[aria-pressed="true"]:focus-visible { outline-color: #fff3da; }

.platform-panel { margin-top: 13px; padding: 8px; border: 1px solid #f7c99e; border-radius: 10px; background: #edc5a0; color: #43281d; box-shadow: 0 5px 16px #7f221c3f; }
.platform-head { padding: 2px 6px 8px; }
.platforms { display: grid; gap: 6px; }
.platform-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1.4vw, 14px);
  min-height: 58px;
  padding: 8px 11px;
  border: 1px solid #c2a07d;
  border-radius: 7px;
  background: #fff2d8;
  color: #4e2b22;
  box-shadow: 0 1px 2px #6e352318;
}
.platform-card:hover, .platform-card:focus-visible {
  border-color: #8c392a;
  background: #ffe6bd;
  text-decoration: none;
}
.platform-card[data-selected] { border-color: #8c392a; box-shadow: inset 3px 0 #9b3c2d; }
.platform-card-name { font-size: .96rem; font-weight: 850; overflow-wrap: anywhere; }
.platform-card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid #c77657;
  border-radius: 6px;
  background: #a34132;
  color: #ffedca;
}
.platform-card-icon::before {
  content: "";
  width: 14px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: repeating-linear-gradient(0deg, currentColor 0 1px, transparent 1px 4px) center / 8px 9px no-repeat;
}
.platform-card-meta { text-align: end; }
.platform-card-meta b { display: block; font-size: .9rem; white-space: nowrap; }
.platform-card-meta small { display: block; color: #6f4b3a; font-size: .76rem; }
@media (max-width: 350px) {
  .platform-card { padding-inline: 8px; }
  .platform-card-icon { width: 28px; }
}

.catalog-offers { margin-top: clamp(16px, 3vw, 36px); }
.catalog-offers h2 { margin-bottom: 10px; font-size: clamp(1.12rem, 2.1vw, 1.45rem); letter-spacing: -.045em; }
.offer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 10px; }
.offer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid #c5a27e;
  border-radius: 7px;
  background: #fff0d5;
}
.offer-card:hover { border-color: #8b492c; background: #ffe5bc; }
.offer-card small { display: block; color: #6d4a35; font-size: .72rem; font-weight: 750; }
.offer-card strong { font-size: .94rem; overflow-wrap: anywhere; }
.offer-card-meta { text-align: right; }
.offer-card-meta b { font-size: .81rem; white-space: nowrap; }
.terminal noscript p { margin-top: 12px; }

@media (max-width: 1070px) {
  .frame { width: calc(100% - 34px); }
  .layout { grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr); }
  .regions strong { font-size: .68rem; }
  .regions button { padding-inline: 5px; gap: 4px; }
}

@media (max-width: 760px) {
  .layout { grid-template-areas: "finder" "selection"; grid-template-columns: minmax(0, 1fr); }
  .region-scroll { max-height: 193px; overscroll-behavior: auto; }
  .display { --flap-size: clamp(.7rem, 3.25vw, 1.5rem); }
  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { grid-column: auto; }
}

@media (max-width: 520px) {
  .frame { width: calc(100% - 20px); }
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand language" "nav nav";
    gap: 0 8px;
    padding-top: 4px;
  }
  .site-header .site-nav { gap: 0 16px; }
  .site-header .site-nav a { min-height: 38px; font-size: .74rem; }
  .site-footer { gap: 24px; padding-bottom: 16px; }
  .footer-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .footer-bottom { flex-direction: column; }
  .terminal { padding: 17px 12px 13px; border-radius: 12px; }
  .intro h1 { font-size: clamp(2.35rem, 10.9vw, 3.7rem); }
  .intro h1:lang(en) { font-size: clamp(2.2rem, 9.8vw, 3.3rem); }
  .intro p { margin-top: 8px; }
  .layout { margin-top: 17px; }
  .finder-head { padding: 6px 6px 4px; }
  .finder-title h2 { font-size: .87rem; }
  .finder label { margin-top: 7px; }
  .finder-title span { font-size: .62rem; }
  .region-scroll { max-height: 159px; padding-inline: 2px; }
  .regions button { min-height: 43px; }
  .iso { min-width: 22px; padding: 3px 2px; font-size: .59rem; }
  .region-count { font-size: .61rem; }
  .display-head { margin-bottom: 9px; }
  .platform-panel { margin-top: 8px; }
}

@media (max-width: 350px) {
  .region-count { display: none; }
  .regions button { grid-template-columns: auto minmax(0, 1fr); }
}
