/* ==========================================================================
   design-3-unifex overrides — kept out of the template's main.css
   ========================================================================== */

/* ---- Header: language switcher (same look as the header icon buttons) ---- */
.d3-lang-select {
  -webkit-appearance: none;
  appearance: none;
  height: 3.25rem;
  padding: 0 2.25rem 0 1rem;
  border: 0;
  background-color: #f5f5f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2302090f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  box-shadow:
    0 4px 4px 0 rgba(0, 0, 0, 0.25),
    -4px -4px 0 0 rgba(255, 255, 255, 0.25);
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: hsl(var(--heading-color));
  cursor: pointer;
  transition:
    background-color 0.3s,
    color 0.3s;
}
.d3-lang-select:hover,
.d3-lang-select:focus-visible {
  outline: none;
  background-color: var(--main-two-600);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color: hsl(var(--white));
}
.d3-lang-select option {
  color: #02090f;
  background: #ffffff;
}

/* Inline SVG icons (Kaggle has no Phosphor glyph) sized like icon fonts */
.d3-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

/* ---- Hero: real photo instead of the transparent cut-out ---- */
.banner-three-man .d3-hero-photo {
  display: block;
  width: clamp(240px, 32vw, 600px);
  aspect-ratio: 705 / 827;
  object-fit: cover;
  object-position: center top;
  border-radius: 999px 999px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

/* ---- Services: one-line description under each title ---- */
.d3-service-desc {
  max-width: 40rem;
  margin-block-end: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Portfolio: API-driven cards ---- */
.d3-project-desc {
  max-width: 34rem;
  margin-block-start: 1rem;
  font-size: 1.125rem;
  line-height: 1.5;
}
/* Placeholder thumbnail (Project has no image field yet) */
.d3-project-ph {
  --ph-accent: 237, 90, 47;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 765 / 440;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(90% 80% at 85% 15%, rgba(var(--ph-accent), 0.45), transparent 60%),
    linear-gradient(135deg, #1b1d22 0%, #0b0c0f 100%);
}
.d3-project-ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
}
.d3-project-ph i {
  position: relative;
  font-size: clamp(4rem, 8vw, 9rem);
  color: rgb(var(--ph-accent));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.portfolio-thumb:hover .d3-project-ph i {
  transform: scale(1.08) rotate(-6deg);
}
.d3-project-ph span {
  position: absolute;
  inset-inline-start: 1.5rem;
  inset-block-end: 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}
.d3-ph-bot {
  --ph-accent: 42, 171, 238;
}
.d3-ph-ml {
  --ph-accent: 155, 110, 255;
}
.d3-ph-desktop {
  --ph-accent: 45, 200, 160;
}
/* With an odd number of cards the free corner is bottom-right, not bottom-left */
@media screen and (min-width: 1200px) {
  .portfolio-three-wrapper.is-odd .portfolio-three-counter {
    left: auto !important;
    right: 0 !important;
  }
}

/* ---- Tech stack tiles (text instead of client logos) ---- */
.d3-tech {
  padding-inline: 1rem;
  font-family: var(--heading-font);
  font-size: clamp(1.125rem, 1.5vw, 1.625rem);
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  color: hsl(var(--heading-color));
}
.brand-hover-media.d3-tech--hover {
  inset-inline: 0;
  border-radius: 0;
  color: var(--main-two-600);
}

/* ---- Footer ---- */
.footer-three-top-thumb img {
  aspect-ratio: 154 / 168;
  object-fit: cover;
  object-position: center 20%;
}
/* "Shohruxmirzo" is longer than the template's name; scale it to the viewport */
.footer-three-bottom-title {
  font-size: min(300px, 15vw);
  white-space: nowrap;
}
.contact-button button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.d3-form-status {
  margin-block-start: 1rem;
  font-size: 1.125rem;
  color: #6ee7a8;
}
.d3-form-status.is-error {
  color: #ff8a70;
}

/* ---- Services: icon pills instead of the template's stock mockups ---- */
.d3-svc-ph {
  --svc-a: #ff8a4c;
  --svc-b: #d8341b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(220px, 30vw, 552px);
  max-width: 100%;
  aspect-ratio: 552 / 257;
  overflow: hidden;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--svc-a), var(--svc-b));
}
.d3-svc-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 90% at 20% 20%, rgba(255, 255, 255, 0.35), transparent 60%);
}
.d3-svc-ph i {
  position: relative;
  z-index: 1;
  font-size: clamp(56px, 6vw, 110px);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.service-three-single:hover .d3-svc-ph i {
  transform: scale(1.08) rotate(-6deg);
}
.d3-svc-ph--2 {
  --svc-a: #f6c89f;
  --svc-b: #c0622f;
}
.d3-svc-ph--3 {
  --svc-a: #ff8fc2;
  --svc-b: #6e5bff;
}
.d3-svc-ph--4 {
  --svc-a: #ffb46a;
  --svc-b: #9c4a18;
}

/* ---- Russian: Phudu has no Cyrillic glyphs -> Oswald fallback, uppercased like Phudu ---- */
:root {
  --heading-font: "Phudu", "Oswald", sans-serif;
}
html:lang(ru) h1,
html:lang(ru) h2,
html:lang(ru) h3,
html:lang(ru) h4,
html:lang(ru) h5,
html:lang(ru) .font-heading,
html:lang(ru) .d3-tech {
  text-transform: uppercase;
}

/* ---- Tablet / mobile ---- */
/* Below 1200px: big word -> photo -> tagline -> intro card, all in normal flow.
   (The template hides the intro card here; keep the name + headline visible.) */
@media screen and (max-width: 1199px) {
  .banner-three-wrapper {
    display: flex;
    flex-direction: column;
  }
  .banner-three-title {
    order: 1;
    margin-block-end: 0 !important;
  }
  .banner-three-wrapper .banner-three-man {
    order: 2;
    position: relative !important;
    left: auto !important;
    transform: none !important;
    align-self: center;
    margin-block-start: -0.5rem;
  }
  .banner-three-man .d3-hero-photo {
    width: min(420px, 72vw);
  }
  .banner-three-wrap {
    order: 3;
  }
  .banner-three-wrap {
    flex-wrap: wrap;
    justify-content: center;
  }
  .banner-three-center {
    order: 1;
    width: 100%;
  }
  .banner-three-left {
    display: block;
    order: 2;
    max-width: 560px;
    margin: 40px auto 0;
  }
}
@media screen and (max-width: 575px) {
  .header-three-logo {
    padding: 8px 12px 6px;
  }
  .header-three-logo img {
    max-width: 120px;
  }
  .header-right {
    gap: 10px !important;
  }
  .d3-lang-select {
    padding: 0 1.9rem 0 0.8rem;
    background-position: right 0.7rem center;
  }
}
