/*
 * Phone layout for the home page. The page comes from a design tool with its
 * styles written inline, so these rules find its parts by their own styles and
 * override them only on narrow screens. Kept apart from index.html: a new export
 * of the page needs only its <link> to this file again.
 */

/* The footer logo's mark sits in a square box, not a stretched one. */
footer svg[style*='width: 68px'] {
  width: 49px !important;
}

@media (max-width: 640px) {
  /* Header: the logo, the menu button and the language switch on one line. */
  header > div {
    flex-wrap: nowrap !important;
    gap: 10px !important;
    padding: 20px 16px !important;
  }
  header > div > a {
    gap: 10px !important;
  }
  header > div > a svg {
    width: 30px;
    height: 30px;
  }
  header > div > a > span {
    font-size: 22px !important;
  }
  header [data-lang-switch] {
    font-size: 12px !important;
  }
  header [data-lang-switch] a {
    padding: 4px 8px !important;
  }

  /* "Okur → Karar verir → Önerir → Sepet büyür": two even lines, no stray arrow. */
  section > div[style*='JetBrains Mono'][style*='0.16em'] {
    justify-content: flex-start !important;
    gap: 10px 12px !important;
    padding: 18px 16px !important;
    font-size: 11px !important;
    letter-spacing: 0.1em !important;
  }

  /* Sample panel: figures two by two, and a shorter chart under them. */
  div[style*='minmax(150px, 1fr)'] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }
  div[style*='minmax(150px, 1fr)'] span[style*='font-size: 40px'] {
    font-size: 30px !important;
  }
  div[style*='height: 200px'][style*='flex-end'] {
    height: 140px !important;
  }
}

/*
 * The site's menu (build-site.py writes it into every page's header and footer;
 * nav.js opens and closes it).
 */
header:has(.eb-nav) {
  position: relative;
  z-index: 30;
}
.eb-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 17px;
}
.eb-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}
.eb-link,
.eb-burger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: #a3acbf;
  text-decoration: none;
  cursor: pointer;
}
.eb-link:hover,
.eb-link:focus-visible,
.eb-link.eb-on {
  color: #f5f8ff;
}
.eb-demo {
  color: #f5f8ff;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.eb-demo:hover {
  color: #c8ff2e;
}
.eb-burger,
.eb-demo-in-menu {
  display: none;
}
/* The list is wider than the button: it hangs from the menu's right edge so it stays on screen. */
.eb-dd {
  position: static;
}
.eb-dd-btn svg {
  transition: transform 0.2s ease;
}
.eb-dd:hover .eb-dd-btn svg,
.eb-dd[data-open] .eb-dd-btn svg {
  transform: rotate(180deg);
}
/* The list hangs under the button; its top padding keeps the pointer over it on the way down. */
.eb-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  width: min(640px, calc(100vw - 32px));
  padding-top: 8px;
  gap: 4px;
}
.eb-dd-menu::before {
  content: '';
  position: absolute;
  inset: 8px 0 0;
  z-index: -1;
  border: 1px solid #263055;
  border-radius: 18px;
  background: #0b0f1c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.eb-dd:hover .eb-dd-menu,
.eb-dd[data-open] .eb-dd-menu {
  display: flex;
}
/* A short list (Integrations) hangs from its own button instead. */
.eb-dd-short {
  position: relative;
}
.eb-dd-short .eb-dd-menu {
  left: -12px;
  right: auto;
  width: 320px;
}
.eb-dd-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 8px;
}
.eb-dd-group {
  display: flex;
  flex-direction: column;
}
.eb-dd-title {
  padding: 6px 12px 4px;
  font-family: 'Geist', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5b6478;
}
.eb-dd-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 12px;
  text-decoration: none;
}
.eb-dd-item:hover,
.eb-dd-item:focus-visible,
.eb-dd-item[aria-current] {
  background: rgba(255, 255, 255, 0.06);
}
.eb-dd-name {
  font-size: 16px;
  color: #f5f8ff;
}
.eb-dd-blurb {
  font-size: 14px;
  line-height: 1.4;
  color: #8a93a8;
}

/* Phones: the entries move into a panel the menu button opens. */
@media (max-width: 760px) {
  /* The panel spans the header, not the menu button's row. */
  .eb-nav {
    position: static;
    flex-wrap: nowrap;
    gap: 10px;
    font-size: 15px;
  }
  .eb-burger {
    display: inline-flex;
    padding: 0 14px;
    border: 1px solid #263055;
    border-radius: 999px;
    color: #f5f8ff;
  }
  .eb-nav > .eb-demo {
    display: none;
  }
  .eb-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 18px 14px;
    border: 1px solid #263055;
    border-radius: 18px;
    background: #0b0f1c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    font-size: 17px;
  }
  html[data-eb-menu] .eb-menu {
    display: flex;
  }
  .eb-dd-btn {
    pointer-events: none;
    color: #f5f8ff;
  }
  .eb-dd-btn svg {
    display: none;
  }
  .eb-dd-short {
    position: static;
  }
  .eb-dd-menu,
  .eb-dd:hover .eb-dd-menu,
  .eb-dd-short .eb-dd-menu {
    display: flex;
    position: static;
    width: auto;
    padding: 0 0 6px;
  }
  .eb-dd-menu::before {
    display: none;
  }
  .eb-dd-menu {
    flex-direction: column;
    gap: 0;
  }
  .eb-dd-col {
    padding: 0;
    gap: 4px;
  }
  .eb-dd-item {
    padding: 7px 12px;
  }
  .eb-dd-blurb {
    display: none;
  }
  .eb-menu > .eb-link {
    border-top: 1px solid #161b2c;
  }
  .eb-demo-in-menu {
    display: inline-flex;
    color: #c8ff2e;
  }
}

/* The footer, the same on every page. */
.eb-foot {
  border-top: 1px solid #161b2c;
}
.eb-foot-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.eb-foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}
.eb-foot-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
}
.eb-foot-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: #f5f8ff;
  text-decoration: none;
}
.eb-foot-brand p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #8a93a8;
}
.eb-foot-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 40px clamp(40px, 6vw, 96px);
}
.eb-foot-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 150px;
}
.eb-foot-title {
  margin-bottom: 6px;
  font-size: 16px;
  color: #f5f8ff;
}
.eb-foot-link {
  font-size: 15px;
  color: #8a93a8;
  text-decoration: none;
}
.eb-foot-link:hover,
.eb-foot-link[aria-current] {
  color: #f5f8ff;
}
.eb-foot-legal {
  border-top: 1px solid #161b2c;
  padding-top: 22px;
  font-size: 14px;
  line-height: 1.8;
  color: #8a93a8;
}
.eb-foot-mark {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 8px;
  display: flex;
  justify-content: center;
  font-size: clamp(48px, 16.2vw, 234px);
  line-height: 1.1;
  letter-spacing: -0.045em;
  color: #05070f;
  -webkit-text-stroke: 3px rgba(245, 248, 255, 0.3);
  paint-order: stroke fill;
  white-space: nowrap;
  overflow: hidden;
}

/* The blog's front page. */
body.eb-plain {
  margin: 0;
  background: #05070f;
}
.eb-blog {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 112px;
}
.eb-kicker {
  margin: 0 0 18px;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8ff2e;
}
.eb-blog h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 86px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 400;
}
.eb-lead {
  max-width: 720px;
  margin: 28px 0 0;
  font-size: 20px;
  line-height: 1.55;
  color: #a3acbf;
}
.eb-soon {
  margin: 72px 0 20px;
  font-size: 17px;
  color: #f5f8ff;
}
.eb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.eb-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid #263055;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.eb-card:hover {
  border-color: #c8ff2e;
}
.eb-card-name {
  font-size: 22px;
  color: #f5f8ff;
}
.eb-card-blurb {
  font-size: 15px;
  line-height: 1.5;
  color: #8a93a8;
}
.eb-card-more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  color: #c8ff2e;
}

/* The contact page's topic list: the design hides the browser's arrow, so it gets its own. */
#c-topic {
  padding-right: 44px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23A3ACBF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  cursor: pointer;
}

/* The design gives some sections a fixed height and a full width on top of their side
   padding, which only fits its wide canvas: on narrow screens they grow with what they
   hold (stacked cards, a picture) and keep the padding inside the screen. */
@media (max-width: 900px) {
  section[style*='width: 100%'] {
    box-sizing: border-box;
  }
  section[style*='; height: '] {
    height: auto !important;
  }
}

/* The case studies' result cards: on a phone they stack, so each is only as tall as its
   chart and figure, without the empty band the wide layout needs. */
@media (max-width: 640px) {
  .mx-card {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 32px !important;
  }
  .mx-card > div:last-child {
    margin-top: 12px !important;
  }
}
