/* Clear language selection, shared by corporate and app pages. */
.site-header .language-switch {
  flex-shrink: 0;
  gap: 2px;
  padding: 2px;
  min-height: 30px;
  height: 30px;
  width: 72px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.2;
}

.site-header .language-switch .language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  min-height: 24px;
  height: 24px;
  width: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #bcc4d1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.site-header .language-switch .language-switch-current {
  color: #101828;
  background: #f5f5f7;
  box-shadow: 0 1px 4px #0004;
}

.site-header .language-switch a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.site-header .language-switch a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 1px;
}

.app-branded-page .language-switch {
  display: inline-flex;
  align-items: center;
}

/* Keep the corporate navigation and controls on one balanced desktop row. */
.portfolio-page .site-header {
  box-shadow: none;
  border-bottom-color: rgba(255, 255, 255, .1);
}

.portfolio-page .header-inner {
  width: min(calc(100% - 64px), 1280px);
  min-height: 72px;
  gap: 24px;
  flex-wrap: nowrap;
}

.portfolio-page .brand {
  flex: 0 0 auto;
  gap: 10px;
  white-space: nowrap;
}

.portfolio-page .brand-mark { width: 64px; }
.portfolio-page .brand-name { font-size: 17px; }
.portfolio-page .site-nav { margin-left: auto; }

.portfolio-page .nav-list {
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: flex-end;
}

.portfolio-page .nav-list > li { flex: 0 0 auto; }

.portfolio-page .nav-list a {
  min-height: 34px;
  font-size: 14px;
  white-space: nowrap;
}

.portfolio-page .nav-list .nav-contact {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .045);
}

/* Use the menu before links can wrap, keeping the page layout breakpoint intact. */
@media (max-width: 1200px) {
  .portfolio-page .header-inner {
    width: calc(100% - 32px);
    min-height: 64px;
    gap: 12px;
  }
  .portfolio-page .language-switch-mobile { display: inline-flex; margin-left: auto; }
  .portfolio-page .language-switch-desktop { display: none; }
  .portfolio-page .nav-toggle { display: inline-flex; padding: 7px 11px; }
  .portfolio-page .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    margin: 0;
  }
  .portfolio-page .site-nav[data-open="false"] { display: none; }
  .portfolio-page .site-nav[data-open="true"] { display: block; }
  .portfolio-page .site-nav .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: #081329;
    box-shadow: 0 18px 36px #0004;
  }
  .portfolio-page .nav-list a { display: flex; min-height: 40px; padding: 6px 10px; }
  .portfolio-page .nav-list .nav-contact { margin: 0; justify-content: center; }
}

@media (max-width: 420px) {
  .portfolio-page .header-inner { gap: 8px; width: calc(100% - 24px); }
  .portfolio-page .brand { gap: 6px; }
  .portfolio-page .brand-mark { width: 36px; }
  .portfolio-page .brand-name { font-size: 14px; }
  .portfolio-page .nav-toggle { padding: 6px 8px; font-size: 12px; }
}

@media (max-width: 360px) {
  .portfolio-page .brand-mark { width: 30px; }
  .portfolio-page .brand-name { font-size: 13px; }
}

/* Recognizable app identity from the browser tab through the landing page. */
.app-branded-page .brand { min-width: 0; }
.app-branded-page .brand-text { min-width: 0; }
.app-branded-page .brand img.app-brand-icon {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 13px;
}

.app-branded-page .app-identity {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 0 28px;
}

.app-branded-page .app-hero-icon {
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: 0 12px 32px #0004;
}

.app-branded-page .app-identity-name {
  margin: 0;
  font-family: inherit;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: #fff;
}

.app-branded-page .hero h1 {
  max-width: 26ch;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.12;
}

.app-branded-page .hero { padding-top: 3rem; }

@media (max-width: 920px) {
  .app-branded-page .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand language" "nav nav";
    gap: 14px;
    padding-block: 14px;
  }
  .app-branded-page .brand { grid-area: brand; }
  .app-branded-page .language-switch { grid-area: language; margin: 0; justify-self: end; }
  .app-branded-page .site-header nav { grid-area: nav; }
  .app-branded-page .nav-list { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .app-branded-page .app-identity { gap: 18px; margin-bottom: 24px; }
  .app-branded-page .app-hero-icon { width: 96px; height: 96px; flex-basis: 96px; border-radius: 22px; }
  .app-branded-page .app-identity-name { font-size: 2rem; }
  .app-branded-page .hero { padding-top: 1.5rem; }
  .app-branded-page .hero h1 { font-size: 2rem; }
}

@media (max-width: 420px) {
  .app-branded-page .app-identity { flex-direction: column; align-items: center; text-align: center; }
}
